Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 654aad21 authored by Christopher Tate's avatar Christopher Tate Committed by Android Git Automerger
Browse files

am 9c5cc571: Merge "Support for "not the home app you\'re looking for" metadata" into klp-dev

* commit '9c5cc571':
  Support for "not the home app you're looking for" metadata
parents cc8dc013 9c5cc571
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+7 −0
Original line number Diff line number Diff line
@@ -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.
+2 −1
Original line number Diff line number Diff line
@@ -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);