美文网首页
Android 应用启动流程

Android 应用启动流程

作者: tiger桂 | 来源:发表于2017-04-27 17:44 被阅读0次

一、Android 应用启动调用的方法如下,稍后更新时序图:

startActivity(Activity) ---> startActivityForResult(Activity)--->execStartActivity(Instrumentation) --->

startActivity(AMS) ---> startActivityMayWait(ActivityStackSuperVisor) ---> startActivityLocked(ActivityStackSuperVisor) --->

startActivityUncheckedLocked(ActivityStackSuperVisor) launchMode ---> startActivityLocked(ActivityStack) --->  resumeTopActivitiesLocked(ActivityStackSuperVisor)  --->resumeTopActivityLocked(ActivityStack)  ---> resumeTopActivityInnerLocked(ActivityStack) finish stack options ---> startPausingLocked(ActivityStack)

---> schedulePauseActivity(ActivityThread) ---> handlePauseActivity(ActivityThread) ---> activityPaused(AMS) --->completePauseLocked(AMS)

---> resumeTopActivitiesLocked(ActivityStackSuperVisor) ---> startSpecificActivityLocked(ActivityStackSuperVisor) ---> startProcessLocked(AMS) ---> newProcessRecordLocked()

---> Process.start() ---> main(ActivityThread) ---> attach(ActivityThread) ---> attachApplication(AMS)  ---> attachApplicationLocked(AMS)  --->attachApplicationLocked(ActivityStackSuperVisor) ---> realStartActivityLocked(ActivityStackSuperVisor) ---> scheduleLaunchActivity(ActivityThread) ---> handleLaunchActivity(ActivityThread)

---> performLaunchActivity ---> handleResumeActivity  ---> performResumeActivity

相关文章

网友评论

      本文标题:Android 应用启动流程

      本文链接:https://www.haomeiwen.com/subject/fnrnzttx.html