问题提出:
当系统存在多个Launcher时,开机完成并解锁后,系统会弹出一个选择框让用户选择
进入哪一个Launcher,如果不想选择,而是想直接进入某一个默认的Launcher,并且
用户在设置->应用程序->管理应用程序->所有应用程序列表,找到之前设置的那个默
认的Launcher,并且取消了默认值,可以重新弹出launcher选框。
解决方法:
下面以设置Google Launcher2作为默认启动的Launcher为例,
其package name 为 com.android.launcher
launcher activity name 为 com.android.launcher2.Launcher
需要以下两个修改点
1)修改Provision应用
编辑packages/apps/Provision/src/com/android/DefaultActivity.java文件
- /*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- package com.android.provision;
- import android.app.Activity;
- import android.content.ComponentName;
- import android.content.Intent;
- import android.content.IntentFilter;
- import android.content.pm.PackageManager;