1.前言
在10.0的系统中,systemserver进程也是非常重要的,system_server 进程承载着整个framework的核心服务,
例如创建 ActivityManagerService、PowerManagerService、DisplayManagerService、PackageManagerService、WindowManagerService、
LauncherAppsService等80多个核心系统服务。这些服务以不同的线程方式存在于system_server这个进程中,接下来简单分析下启动的相关的
服务的源码
2. framework中开机启动之SystemServer相关源码分析的核心类
/frameworks/base/services/java/com/android/server/SystemServer.java
3. framework中开机启动之SystemServer相关源码分析
private void run() {
try {
traceBeginAndSlog("InitBeforeStartServices");
.....
//准备主线程lopper
// Prepare the main looper thread (this thread).
android.os.Process.setThreadPriority(
android.os.Process.THREAD_PRIORITY_FOREGROUND);
android.os.Process.setCanSelfBackground(false);
Looper.prepareMainLooper();
Looper.getMainLooper().setSlo