StartActivity主体流程-api26

2020-06-08  本文已影响0人  tinyvampirepudg

主体流程

基于api26

App端:

Activity#startActivity(Intent intent)
Activity#startActivity(Intent intent, @Nullable Bundle options)
Activity#startActivityForResult(Intent intent, int requestCode)
Activity#startActivityForResult(Intent intent, int requestCod, Bundle options)
Instrumentation.ActivityResult#execStartActivity
ActivityManagerService#startActivity(IApplicationThread caller, String callingPackage...)

AMS端:
ActivityManagerService#startActivityAsUser
ActivityStarter#startActivityMayWait
ActivityStarter#startActivityLocked
ActivityStarter#startActivity(IApplicationThread caller, Intent intent, Intent ephemeralIntent,...)
ActivityStarter#startActivity(final ActivityRecord r, ActivityRecord sourceRecord,...)
ActivityStarter#startActivityUnchecked
ActivityStackSupervisor#resumeFocusedStackTopActivityLocked
ActivityStack#resumeTopActivityUncheckedLocked
ActivityStack#resumeTopActivityInnerLocked
ActivityStackSupervisor#startSpecificActivityLocked
ActivityStackSupervisor#realStartActivityLocked

App端:
ApplicationThread#scheduleLaunchActivity
ActivityThread#handleLaunchActivity
——ActivityThread#performLaunchActivity
——Activity#onCreate
——Activity#onStart
——ActivityThread#handleResumeActivity
——Activity#onResume

参考:

Activity启动流程(基于Android26)

上一篇下一篇

猜你喜欢

热点阅读