資源描述:
《android系統(tǒng)從systemserver開始的launcher啟動詳細(xì)流程》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、android系統(tǒng)啟動流程android系統(tǒng)啟動流程——從systemserver開始的launcher目錄1概述:22systemserver工作內(nèi)容分析32.1SystemServer類簡述42.2ServerThread類簡述43ActivityManagerService工作內(nèi)容分析63.1ActivityManagerService之main73.1.1創(chuàng)建ActivityManagerService實(shí)例73.1.2創(chuàng)建ActivityThread實(shí)例,獲取全局Context83.1.3創(chuàng)建ActivityStackSupervisor實(shí)例103.1.4調(diào)用st
2、artRunning103.2ActivityManagerService之setSystemProcess113.3.ActivityManagerService之setWindowManager123.4ActivityManagerService之systemready123.4.1啟動所有Persistent屬性的APK133.4.2啟動launcher144ActivityStackSupervisor啟動launcher154.1首先回顧一下ActivityStackSupervisor實(shí)例的初始化154.2進(jìn)入ActivityStackSupervisor.
3、resumeTopActivitiesLocked164.3進(jìn)入ActivityStack.resumeTopActivityLocked164.4回到ActivityStackSupervisor.resumeHomeActivity。174.5ActivityStackSupervisor.mProbeThread174.6ActivityStackSupervisor.mProbeHandler184.7回到ActivityManagerService.startHomeActivityLocked184.8ActivityStackSupervisor.start
4、HomeActivity194.9ActivityStackSupervisor.startActivityUncheckedLocked204.10ActivityStack.startActivityLocked2141/41android系統(tǒng)啟動流程4.11ActivityStackSupervisor.resumeTopActivitiesLocked224.12ActivityStack.resumeTopActivityLocked224.13ActivityStackSupervisor.startSpecificActivityLocked244.14Ac
5、tivityStackSupervisor.realStartActivityLocked244.15ActivityManagerService.startProcessLocked255Process類管理創(chuàng)建activity進(jìn)程275.1Process.start:275.2Process.startViaZygote285.3zygoteSendArgsAndGetResult和openZygoteSocketIfNeeded286ActivityThread線程類分析306.1ActivityThread.main分析306.1.1創(chuàng)建了looper對象和本線程
6、綁定。306.1.2創(chuàng)建了ActivityThread對象實(shí)例306.1.3進(jìn)行attach回調(diào)316.1.4ActivityStackSupervisor.attachApplicationLocked346.1.5ActivityStackSupervisor.ensureActivitiesVisibleLocked346.2ApplicationThread內(nèi)部類346.2.1ActivityThread.ApplicationThread.scheduleLaunchActivity356.2.2ActivityThread.ApplicationThread.
7、scheduleResumeActivity376.2.3發(fā)出開機(jī)完成通知387總結(jié)407.1luancher啟動流程總結(jié)407.2luancher黑屏問題分析411概述:android系統(tǒng)啟動到zygote后,系統(tǒng)就真正進(jìn)入java世界了;而zygote啟動的第一個(gè)進(jìn)程是systemserver.而用戶看到的第一個(gè)程序是launcher.本文要分析的正是從systemserver道launcher的啟動流程.分析過程涉及到PowerManagerService,ActivityManagerService,PackageMa