資源描述:
《android系統(tǒng)從systemserver開(kāi)始地launcher啟動(dòng)詳細(xì)流程》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、實(shí)用標(biāo)準(zhǔn)文檔android系統(tǒng)啟動(dòng)流程——從systemserver開(kāi)始的launcher目錄1概述:22systemserver工作內(nèi)容分析32.1SystemServer類簡(jiǎn)述42.2ServerThread類簡(jiǎn)述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)用startRunning103.
2、2ActivityManagerService之setSystemProcess113.3.ActivityManagerService之setWindowManager123.4ActivityManagerService之systemready123.4.1啟動(dòng)所有Persistent屬性的APK133.4.2啟動(dòng)launcher14文案大全實(shí)用標(biāo)準(zhǔn)文檔4ActivityStackSupervisor啟動(dòng)launcher154.1首先回顧一下ActivityStackSupervisor實(shí)例的初始化154.2進(jìn)入ActivityStackSupervisor.resumeTopAc
3、tivitiesLocked164.3進(jìn)入ActivityStack.resumeTopActivityLocked164.4回到ActivityStackSupervisor.resumeHomeActivity。174.5ActivityStackSupervisor.mProbeThread174.6ActivityStackSupervisor.mProbeHandler184.7回到ActivityManagerService.startHomeActivityLocked184.8ActivityStackSupervisor.startHomeActivity194.9A
4、ctivityStackSupervisor.startActivityUncheckedLocked204.10ActivityStack.startActivityLocked214.11ActivityStackSupervisor.resumeTopActivitiesLocked224.12ActivityStack.resumeTopActivityLocked224.13ActivityStackSupervisor.startSpecificActivityLocked244.14ActivityStackSupervisor.realStartActivityLock
5、ed244.15ActivityManagerService.startProcessLocked255Process類管理創(chuàng)建activity進(jìn)程275.1Process.start:275.2Process.startViaZygote285.3zygoteSendArgsAndGetResult和openZygoteSocketIfNeeded286ActivityThread線程類分析306.1ActivityThread.main分析306.1.1創(chuàng)建了looper對(duì)象和本線程綁定。306.1.2創(chuàng)建了ActivityThread對(duì)象實(shí)例306.1.3進(jìn)行attach回調(diào)31
6、6.1.4ActivityStackSupervisor.attachApplicationLocked346.1.5ActivityStackSupervisor.ensureActivitiesVisibleLocked34文案大全實(shí)用標(biāo)準(zhǔn)文檔6.2ApplicationThread內(nèi)部類346.2.1ActivityThread.ApplicationThread.scheduleLaunchActivity356.2.2ActivityThread.ApplicationThread.scheduleResumeActivity376.2.3發(fā)出開(kāi)機(jī)完成通知387總結(jié)407.1
7、luancher啟動(dòng)流程總結(jié)407.2luancher黑屏問(wèn)題分析411概述:android系統(tǒng)啟動(dòng)到zygote后,系統(tǒng)就真正進(jìn)入java世界了;而zygote啟動(dòng)的第一個(gè)進(jìn)程是systemserver.而用戶看到的第一個(gè)程序是launcher.本文要分析的正是從systemserver道launcher的啟動(dòng)流程.分析過(guò)程涉及到PowerManagerService,ActivityManagerService,PackageManager