android 启动-UI

UI 也可以理解位launcher, 启动UI ,android 整个界面图标就出来了,用户可以选择启动app,如滴滴,爱奇艺...
在启动launcher 之前,pm 已经装了所有的app , 这个时候就需要launcher 启动,然后以方格多屏方式展示给用户

298:private int startActivity(IApplicationThread caller, Intent intent, Intent ephemeralIntent,
            String resolvedType, ActivityInfo aInfo, ResolveInfo rInfo,
            IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor,
            IBinder resultTo, String resultWho, int requestCode, int callingPid, int callingUid,
            String callingPackage, int realCallingPid, int realCallingUid, int startFlags,
            ActivityOptions options, boolean ignoreTargetSecurity, boolean componentSpecified,
            ActivityRecord[] outActivity, TaskRecord inTask)
       ---------------》doPendingActivityLaunchesLocked  
            
            -993----》startActivity
                   -----》startActivityUnchecked
                   -----》mTargetStack.startActivityLocked
                           ---》resumeTopActivityInnerLocked
                                ---》startPausingLocked

        startPausingLocked
           ---》prev.app.thread.schedulePauseActivity
               --ActivityThread.java--》schedulePauseActivity
                         -->发送H.PAUSE_ACTIVITY
                            ----》handlePauseActivity
                                 ------>ActivityManager.getService().activityPaused(token);      ////// stack.activityPausedLocked(
                              
                             
           ---->ActivityStack.activityPausedLocked            
        
            
          resumeTopActivityInnerLocked----> mStackSupervisor.startSpecificActivityLocked  
              ----> ActivityManagerService.startProcessLocked
                  ---->Process.start
                     ----->
                                 
                                             
                                 
                
         ActivityThread.main()
             ---》attach
                ---》attachApplication
                  ---》attachApplication
                     --》ActivityManagerService.java.attachApplicationLocked
                       -->attachApplicationLocked
                         -->realStartActivityLocked() 
                            --->app.thread.scheduleLaunchActivity 发送了LAUNCH_ACTIVITY
                              --ActivityThread--->handleLaunchActivity
                                --ActivityThread---》performLaunchActivity
                                 -->activity.attach
                                 -->mInstrumentation.callActivityOnPostCreate
                              
                     
                     
                     



















                     






你可能感兴趣的:(android 启动-UI)