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

Commit 99302b55 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Revert "Push chooser targets to the shortcut manager."

This reverts commit 58fc95dc.

Bug 36186790
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutHostTestCases
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases

Also all unit tests, except for the known failrues.
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Change-Id: I733ee7e12a419ee7ea17ca67c56afe7b039d189a
parent 9220ff1f
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -10350,12 +10350,12 @@ package android.content.pm {
    ctor public LauncherApps.ShortcutQuery();
    method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
    method public android.content.pm.LauncherApps.ShortcutQuery setChangedSince(long);
    method public android.content.pm.LauncherApps.ShortcutQuery setIntent(android.content.Intent);
    method public deprecated android.content.pm.LauncherApps.ShortcutQuery setIntent(android.content.Intent);
    method public android.content.pm.LauncherApps.ShortcutQuery setPackage(java.lang.String);
    method public android.content.pm.LauncherApps.ShortcutQuery setQueryFlags(int);
    method public android.content.pm.LauncherApps.ShortcutQuery setShortcutIds(java.util.List<java.lang.String>);
    field public static final int FLAG_GET_KEY_FIELDS_ONLY = 4; // 0x4
    field public static final int FLAG_MATCH_CHOOSER = 16; // 0x10
    field public static final deprecated int FLAG_MATCH_CHOOSER = 16; // 0x10
    field public static final int FLAG_MATCH_DYNAMIC = 1; // 0x1
    field public static final int FLAG_MATCH_MANIFEST = 8; // 0x8
    field public static final int FLAG_MATCH_PINNED = 2; // 0x2
@@ -10905,9 +10905,9 @@ package android.content.pm {
    method public int describeContents();
    method public android.content.ComponentName getActivity();
    method public java.util.Set<java.lang.String> getCategories();
    method public android.content.ComponentName[] getChooserComponentNames();
    method public android.os.PersistableBundle getChooserExtras();
    method public android.content.IntentFilter[] getChooserIntentFilters();
    method public deprecated android.content.ComponentName[] getChooserComponentNames();
    method public deprecated android.os.PersistableBundle getChooserExtras();
    method public deprecated android.content.IntentFilter[] getChooserIntentFilters();
    method public java.lang.CharSequence getDisabledMessage();
    method public android.os.PersistableBundle getExtras();
    method public java.lang.String getId();
@@ -10920,7 +10920,7 @@ package android.content.pm {
    method public java.lang.CharSequence getShortLabel();
    method public android.os.UserHandle getUserHandle();
    method public boolean hasKeyFieldsOnly();
    method public boolean isChooser();
    method public deprecated boolean isChooser();
    method public boolean isDeclaredInManifest();
    method public boolean isDynamic();
    method public boolean isEnabled();
@@ -10933,11 +10933,11 @@ package android.content.pm {
  public static class ShortcutInfo.Builder {
    ctor public ShortcutInfo.Builder(android.content.Context, java.lang.String);
    method public android.content.pm.ShortcutInfo.Builder addChooserIntentFilter(android.content.IntentFilter, android.content.ComponentName);
    method public deprecated android.content.pm.ShortcutInfo.Builder addChooserIntentFilter(android.content.IntentFilter, android.content.ComponentName);
    method public android.content.pm.ShortcutInfo build();
    method public android.content.pm.ShortcutInfo.Builder setActivity(android.content.ComponentName);
    method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.Set<java.lang.String>);
    method public android.content.pm.ShortcutInfo.Builder setChooserExtras(android.os.PersistableBundle);
    method public deprecated android.content.pm.ShortcutInfo.Builder setChooserExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setDisabledMessage(java.lang.CharSequence);
    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
+8 −8
Original line number Diff line number Diff line
@@ -10972,12 +10972,12 @@ package android.content.pm {
    ctor public LauncherApps.ShortcutQuery();
    method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
    method public android.content.pm.LauncherApps.ShortcutQuery setChangedSince(long);
    method public android.content.pm.LauncherApps.ShortcutQuery setIntent(android.content.Intent);
    method public deprecated android.content.pm.LauncherApps.ShortcutQuery setIntent(android.content.Intent);
    method public android.content.pm.LauncherApps.ShortcutQuery setPackage(java.lang.String);
    method public android.content.pm.LauncherApps.ShortcutQuery setQueryFlags(int);
    method public android.content.pm.LauncherApps.ShortcutQuery setShortcutIds(java.util.List<java.lang.String>);
    field public static final int FLAG_GET_KEY_FIELDS_ONLY = 4; // 0x4
    field public static final int FLAG_MATCH_CHOOSER = 16; // 0x10
    field public static final deprecated int FLAG_MATCH_CHOOSER = 16; // 0x10
    field public static final int FLAG_MATCH_DYNAMIC = 1; // 0x1
    field public static final int FLAG_MATCH_MANIFEST = 8; // 0x8
    field public static final int FLAG_MATCH_PINNED = 2; // 0x2
@@ -11621,9 +11621,9 @@ package android.content.pm {
    method public int describeContents();
    method public android.content.ComponentName getActivity();
    method public java.util.Set<java.lang.String> getCategories();
    method public android.content.ComponentName[] getChooserComponentNames();
    method public android.os.PersistableBundle getChooserExtras();
    method public android.content.IntentFilter[] getChooserIntentFilters();
    method public deprecated android.content.ComponentName[] getChooserComponentNames();
    method public deprecated android.os.PersistableBundle getChooserExtras();
    method public deprecated android.content.IntentFilter[] getChooserIntentFilters();
    method public java.lang.CharSequence getDisabledMessage();
    method public android.os.PersistableBundle getExtras();
    method public java.lang.String getId();
@@ -11636,7 +11636,7 @@ package android.content.pm {
    method public java.lang.CharSequence getShortLabel();
    method public android.os.UserHandle getUserHandle();
    method public boolean hasKeyFieldsOnly();
    method public boolean isChooser();
    method public deprecated boolean isChooser();
    method public boolean isDeclaredInManifest();
    method public boolean isDynamic();
    method public boolean isEnabled();
@@ -11649,11 +11649,11 @@ package android.content.pm {
  public static class ShortcutInfo.Builder {
    ctor public ShortcutInfo.Builder(android.content.Context, java.lang.String);
    method public android.content.pm.ShortcutInfo.Builder addChooserIntentFilter(android.content.IntentFilter, android.content.ComponentName);
    method public deprecated android.content.pm.ShortcutInfo.Builder addChooserIntentFilter(android.content.IntentFilter, android.content.ComponentName);
    method public android.content.pm.ShortcutInfo build();
    method public android.content.pm.ShortcutInfo.Builder setActivity(android.content.ComponentName);
    method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.Set<java.lang.String>);
    method public android.content.pm.ShortcutInfo.Builder setChooserExtras(android.os.PersistableBundle);
    method public deprecated android.content.pm.ShortcutInfo.Builder setChooserExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setDisabledMessage(java.lang.CharSequence);
    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
+8 −8
Original line number Diff line number Diff line
@@ -10386,12 +10386,12 @@ package android.content.pm {
    ctor public LauncherApps.ShortcutQuery();
    method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
    method public android.content.pm.LauncherApps.ShortcutQuery setChangedSince(long);
    method public android.content.pm.LauncherApps.ShortcutQuery setIntent(android.content.Intent);
    method public deprecated android.content.pm.LauncherApps.ShortcutQuery setIntent(android.content.Intent);
    method public android.content.pm.LauncherApps.ShortcutQuery setPackage(java.lang.String);
    method public android.content.pm.LauncherApps.ShortcutQuery setQueryFlags(int);
    method public android.content.pm.LauncherApps.ShortcutQuery setShortcutIds(java.util.List<java.lang.String>);
    field public static final int FLAG_GET_KEY_FIELDS_ONLY = 4; // 0x4
    field public static final int FLAG_MATCH_CHOOSER = 16; // 0x10
    field public static final deprecated int FLAG_MATCH_CHOOSER = 16; // 0x10
    field public static final int FLAG_MATCH_DYNAMIC = 1; // 0x1
    field public static final int FLAG_MATCH_MANIFEST = 8; // 0x8
    field public static final int FLAG_MATCH_PINNED = 2; // 0x2
@@ -10945,9 +10945,9 @@ package android.content.pm {
    method public int describeContents();
    method public android.content.ComponentName getActivity();
    method public java.util.Set<java.lang.String> getCategories();
    method public android.content.ComponentName[] getChooserComponentNames();
    method public android.os.PersistableBundle getChooserExtras();
    method public android.content.IntentFilter[] getChooserIntentFilters();
    method public deprecated android.content.ComponentName[] getChooserComponentNames();
    method public deprecated android.os.PersistableBundle getChooserExtras();
    method public deprecated android.content.IntentFilter[] getChooserIntentFilters();
    method public java.lang.CharSequence getDisabledMessage();
    method public android.os.PersistableBundle getExtras();
    method public java.lang.String getId();
@@ -10960,7 +10960,7 @@ package android.content.pm {
    method public java.lang.CharSequence getShortLabel();
    method public android.os.UserHandle getUserHandle();
    method public boolean hasKeyFieldsOnly();
    method public boolean isChooser();
    method public deprecated boolean isChooser();
    method public boolean isDeclaredInManifest();
    method public boolean isDynamic();
    method public boolean isEnabled();
@@ -10973,11 +10973,11 @@ package android.content.pm {
  public static class ShortcutInfo.Builder {
    ctor public ShortcutInfo.Builder(android.content.Context, java.lang.String);
    method public android.content.pm.ShortcutInfo.Builder addChooserIntentFilter(android.content.IntentFilter, android.content.ComponentName);
    method public deprecated android.content.pm.ShortcutInfo.Builder addChooserIntentFilter(android.content.IntentFilter, android.content.ComponentName);
    method public android.content.pm.ShortcutInfo build();
    method public android.content.pm.ShortcutInfo.Builder setActivity(android.content.ComponentName);
    method public android.content.pm.ShortcutInfo.Builder setCategories(java.util.Set<java.lang.String>);
    method public android.content.pm.ShortcutInfo.Builder setChooserExtras(android.os.PersistableBundle);
    method public deprecated android.content.pm.ShortcutInfo.Builder setChooserExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setDisabledMessage(java.lang.CharSequence);
    method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle);
    method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon);
+1 −2
Original line number Diff line number Diff line
@@ -55,8 +55,7 @@ interface ILauncherApps {
            String callingPackage, String packageName, int flags, in UserHandle user);

    ParceledListSlice getShortcuts(String callingPackage, long changedSince, String packageName,
            in List shortcutIds, in ComponentName componentName, in Intent intent, int flags,
            in UserHandle user);
            in List shortcutIds, in ComponentName componentName, int flags, in UserHandle user);
    void pinShortcuts(String callingPackage, String packageName, in List<String> shortcutIds,
            in UserHandle user);
    boolean startShortcut(String callingPackage, String packageName, String id,
+5 −14
Original line number Diff line number Diff line
@@ -275,11 +275,8 @@ public class LauncherApps {
        @Deprecated
        public static final int FLAG_GET_MANIFEST = FLAG_MATCH_MANIFEST;

        /**
         * Include chooser shortcuts in the result.
         * STOPSHIP TODO: Unless explicitly requesting chooser fields, we should strip out chooser
         *           relevant fields from the Shortcut. This should also be adequately documented.
         */
        /** @deprecated punted, don't use. */
        @Deprecated
        public static final int FLAG_MATCH_CHOOSER = 1 << 4;

        /**
@@ -319,7 +316,6 @@ public class LauncherApps {
                        FLAG_MATCH_DYNAMIC,
                        FLAG_MATCH_PINNED,
                        FLAG_MATCH_MANIFEST,
                        FLAG_MATCH_CHOOSER,
                        FLAG_GET_KEY_FIELDS_ONLY,
                })
        @Retention(RetentionPolicy.SOURCE)
@@ -336,9 +332,6 @@ public class LauncherApps {
        @Nullable
        ComponentName mActivity;

        @Nullable
        Intent mIntent;

        @QueryFlags
        int mQueryFlags;

@@ -382,11 +375,9 @@ public class LauncherApps {
            return this;
        }

        /**
         * If non-null, returns only shortcuts with intent filters that match this intent.
         */
        /** @deprecated punted, don't use. */
        @Deprecated
        public ShortcutQuery setIntent(@Nullable Intent intent) {
            mIntent = intent;
            return this;
        }

@@ -704,7 +695,7 @@ public class LauncherApps {
        try {
            return mService.getShortcuts(mContext.getPackageName(),
                    query.mChangedSince, query.mPackage, query.mShortcutIds, query.mActivity,
                    query.mIntent, query.mQueryFlags, user)
                    query.mQueryFlags, user)
                    .getList();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
Loading