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 M应用启动流程分析 更新:2016-10-29:更新handleBindApplication部分...
    Jtag特工阅读 1,830评论 0 4
  • Launcher的启动过程 前言 Launcher即桌面,是Android智能设备的窗口,用户使用最频繁的软件之一...
    FamilyYuan阅读 4,198评论 1 0
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,455评论 25 708
  • 这两天天气仿佛让人捉摸不透,像极了小孩子的脸,明明刚刚还是晴空万里,过一会却没商量似的下起大雨,因为房间东面的窗户...
    shannice阅读 302评论 0 0
  • 2017年7月7日 1.感恩爸妈的养育之恩,帮助照顾孩子。 2.感恩儿子让我享受到幸福。 3.感恩先生为家努力付出...
    冯梓源阅读 213评论 0 0