WEB开发网
开发学院手机开发Android 开发 Android 启动过程总结 阅读

Android 启动过程总结

 2010-06-01 18:42:00 来源:WEB开发网   
核心提示:8. Starting Search Service9. Starting Clipboard Service10. Starting Checkin Service11. Starting Wallpaper Service12. Starting Audio Service13. Starting HeadsetO

8. Starting Search Service

9. Starting Clipboard Service

10. Starting Checkin Service

11. Starting Wallpaper Service

12. Starting Audio Service

13. Starting HeadsetObserver

14. Starting AdbSettingsObserver

Finally SystemServer::init2 will call ActivityManagerService.systemReady to launch the first activity by senting Intent.CATEGORY_HOME intent.

There is another way to start system server, which is through a program named system_server whose source is device/servers/system/system_main.cpp. It also calls system_init to start system services. So there is a question: why does Android have two methods to start system services? My guess is that directly start system_server may have synchronous problem with zygote because system_server will call JNI to start SystemServer::init2, while at that time zygote may not start JAVA VM yet. So Android uses another method. After zynote is initialized, fork a new process to start system services.

本文来自CSDN博客,转载请标明出处:http://blog.chinaunix.net/u3/93670/showart_2083902.html

上一页  4 5 6 7 8 9 

Tags:Android 启动 过程

编辑录入:coldstar [复制链接] [打 印]
赞助商链接