Activity 启动流程 api 25

Activity 生命周期的处理:

schedule
handle
perform

onCreate 的调用流程:

startActivity【Activity】
startActivityForResult
    mInstrumentation.execStartActivity【Instrumentation】
        ActivityManagerNative.getDefault().startActivity【AMS】
        startActivityAsUser
            mActivityStarter.startActivityMayWait【ActivityStarter】
            startActivityLocked
            startActivityUnChecked
                mSupervisor.resumeFocusedStackTopActivityLocked()【ActivityStackSupervisor】(在最后,比较难找)
                    targetStack.resumeTopActivityUncheckedLocked【ActivityStack】
                    resumeTopActivityInnerLocked
                mStackSupervisor.startSpecificActivityLocked【ActivityStackSupervisor】
                realStartActivityLocked
                    app.thread.scheduleLaunchActivity【ApplicationThread】
                        handleLaunchActivity【ActivityThread】
                        performLaunchActivity
    mInstrum

你可能感兴趣的:(Android,源码,启动流程,Activity,经验)