Android 启动 Launcher

在 ActivityManagerService 里启动 Launcher

Lollipop/frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java

    Intent getHomeIntent() {
        Intent intent = new Intent(mTopAction, mTopData != null ? Uri.parse(mTopData) : null);
        intent.setComponent(mTopComponent);
        if (mFactoryTest != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
            intent.addCategory(Intent.CATEGORY_HOME);
        }
        return intent;
    }

    boolean startHomeActivityLocked(int userId, String reason) {
        // ... 
        Intent intent = getHomeIntent();
        // ... 
    }

参考文章

Android系统默认Home应用程序(Launcher)的启动过程源代码分析

你可能感兴趣的:(Android 启动 Launcher)