Merge "Support for "not the home app you're looking for" metadata" into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9c5cc571e5
@@ -2944,6 +2944,7 @@ package android.app {
|
||||
method public void moveTaskToFront(int, int);
|
||||
method public void moveTaskToFront(int, int, android.os.Bundle);
|
||||
method public deprecated void restartPackage(java.lang.String);
|
||||
field public static final java.lang.String META_HOME_ALTERNATE = "android.app.home.alternate";
|
||||
field public static final int MOVE_TASK_NO_USER_ACTION = 2; // 0x2
|
||||
field public static final int MOVE_TASK_WITH_HOME = 1; // 0x1
|
||||
field public static final int RECENT_IGNORE_UNAVAILABLE = 2; // 0x2
|
||||
|
||||
@@ -67,6 +67,13 @@ public class ActivityManager {
|
||||
private final Context mContext;
|
||||
private final Handler mHandler;
|
||||
|
||||
/**
|
||||
* <meta-data> string for a 'home' Activity that names a package that is to be
|
||||
* uninstalled in lieu of the declaring one. The package named here must be
|
||||
* signed with the same certificate as the one declaring the <meta-data>.
|
||||
*/
|
||||
public static final String META_HOME_ALTERNATE = "android.app.home.alternate";
|
||||
|
||||
/**
|
||||
* Result for IActivityManager.startActivity: an error where the
|
||||
* start had to be canceled.
|
||||
|
||||
@@ -9883,7 +9883,8 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
intent.addCategory(Intent.CATEGORY_HOME);
|
||||
|
||||
final int callingUserId = UserHandle.getCallingUserId();
|
||||
List<ResolveInfo> list = queryIntentActivities(intent, null, 0, callingUserId);
|
||||
List<ResolveInfo> list = queryIntentActivities(intent, null,
|
||||
PackageManager.GET_META_DATA, callingUserId);
|
||||
ResolveInfo preferred = findPreferredActivity(intent, null, 0, list, 0,
|
||||
true, false, callingUserId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user