Activity启动流程
2022-06-15 22:26:15 1 举报
11
作者其他创作
大纲/内容
startActivityForResult
startActivity
ScheduleTransaction执行在Binder线程
execStartActivity
BInder
excute
LaunchActivityItem
ActivityStack
是
ActivityThread
realStartActivityLocked
attach
handleMessafe切换到主线程
Handler
ActivityStarter
start
Instrumentation
excuteLifecycleState
execute
Launcher
是否有进程
Zygote
scheduleTransaction
Binder
ApplicationThread
resumeTopActivityUncheckedLocked
startActivityUnchecked
excuteCallbacks
否
startActivitySafely
startProcessAsync
APP
startProcessLocked
SystemServer
attachApplication
ActivityStackSuperVisor
Activity
handleResumeActivity
socket
performLaunchActivity
resumeTopActivityInnerLocked
TransactionExecutor
Launcher(Activity)
1.通过Zygote进程fork孵化子进程2.创建binder线程池,通过talkWithDevices方法监听binder事件3.通过反射获取到ActivityThread的class,并执行main方法
startSpecificActivity
handleLauncherActivity
attachApplicationLocked
ActivityManagerService
ResumeActivityItem
ActivityTaskManagerService
startActivityAsUser
Prcocess
收藏
0 条评论
下一页