Android      aosp启动流程8-SystemServer启动framework层的一堆服务   
文章目录  [隐藏]

参考:
https://blog.csdn.net/xichangbao/article/details/53104810
https://blog.csdn.net/wjky2014/article/details/100942423
https://blog.csdn.net/TQLSDLWSL/article/details/121291966
https://www.jianshu.com/p/9912a556734f
https://xiaozhuanlan.com/topic/3068175429
https://www.jianshu.com/p/233507e0564d
前文:
http://www.gaohaiyan.com/4093.html


frameworks/base/services/java/com/android/server/SystemServer.java

1. 入口main()

上一篇梳理到,ZygoteInit.zygoteInit --> RuntimeInit.applicationInit 返回的是一个Runnable,其中记录了反射SystemServer的信息,启动时会执行main方法。


2. SystemServer构造方法

记录几个开始运行的时间。


3. 开始启动各个服务run()

配置一些基本属性和资源,逐个启动服务。


3.1. createSystemContext

调用ActivityThread提取上下文。


4. startBootstrapServices

运行启动系统过程中所须的一小部分关键服务。系统引导服务。二十来个。


5. startCoreServices

启动一些硬件相关的基本服务。系统核心服务。十个。


6. startOtherServices

启动framework层的服务。应用相关服务。一百四十多个。


6.1 startContentCaptureService

启动内容监听服务。


6.2 startAttentionService

注意力服务?


6.3 startSystemCaptionsManagerService

系统标题管理器服务


7. startSystemUi

通过Intent启动SystemUIService。下一篇看一下服务内部的流程。



- end

承接App定制、企业web站点、办公系统软件 设计开发,外包项目,毕设