Activity启动流程笔记

Activity -> startActivity - >

  Instrumentation

->execStartActivity

->ActivityManager.getService()

->binder->ActivityManagerService

->IBinder b = ServiceManager.getService(Context.ACTIVITY_SERVICE);

->IActivityManager am = IActivityManager.Stub.asInterface(b)

->ActivityManagerService:

->startActivity

-> startActivityAsUser

->ActivityStarter

->execute()->startActivity->startActivityUnchecked

-> computeLaunchingTaskFlags->computeSourceStack->getReusableIntentActivity

->ActivityStack(作用,结合TaskRecord,ActivityRecord)

->startActivityLocked()

->createWindowContainer()

->showStartingWindow()

你可能感兴趣的:(Activity启动流程笔记)