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

Commit 5482a8e6 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

[API review] Add ShortcutInfo.DISABLED_REASON_UNKNOWN

Change-Id: I28a80faa223c0ce36e8b77ddbcea51c0b255c903
Fixes: 71555187
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
parent 9c3d64e6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11352,6 +11352,7 @@ package android.content.pm {
    field public static final int DISABLED_REASON_NOT_DISABLED = 0; // 0x0
    field public static final int DISABLED_REASON_OTHER_RESTORE_ISSUE = 103; // 0x67
    field public static final int DISABLED_REASON_SIGNATURE_MISMATCH = 102; // 0x66
    field public static final int DISABLED_REASON_UNKNOWN = 3; // 0x3
    field public static final int DISABLED_REASON_VERSION_LOWER = 100; // 0x64
    field public static final java.lang.String SHORTCUT_CATEGORY_CONVERSATION = "android.shortcut.conversation";
  }
+9 −0
Original line number Diff line number Diff line
@@ -180,6 +180,11 @@ public final class ShortcutInfo implements Parcelable {
     */
    public static final int DISABLED_REASON_APP_CHANGED = 2;

    /**
     * Shortcut is disabled for an unknown reason.
     */
    public static final int DISABLED_REASON_UNKNOWN = 3;

    /**
     * A disabled reason that's equal to or bigger than this is due to backup and restore issue.
     * A shortcut with such a reason wil be visible to the launcher, but not to the publisher.
@@ -214,6 +219,7 @@ public final class ShortcutInfo implements Parcelable {
            DISABLED_REASON_NOT_DISABLED,
            DISABLED_REASON_BY_APP,
            DISABLED_REASON_APP_CHANGED,
            DISABLED_REASON_UNKNOWN,
            DISABLED_REASON_VERSION_LOWER,
            DISABLED_REASON_BACKUP_NOT_SUPPORTED,
            DISABLED_REASON_SIGNATURE_MISMATCH,
@@ -272,6 +278,9 @@ public final class ShortcutInfo implements Parcelable {
            case DISABLED_REASON_OTHER_RESTORE_ISSUE:
                return res.getString(
                        com.android.internal.R.string.shortcut_restore_unknown_issue);
            case DISABLED_REASON_UNKNOWN:
                return res.getString(
                        com.android.internal.R.string.shortcut_disabled_reason_unknown);
        }
        return null;
    }
+5 −0
Original line number Diff line number Diff line
@@ -4785,6 +4785,11 @@
    -->
    <string name="shortcut_restore_unknown_issue">Couldn\u2019t restore shortcut</string>

    <!--
    A toast message shown when an app shortcut is disabled for an unknown rason.
    -->
    <string name="shortcut_disabled_reason_unknown">Shortcut is disabled</string>

    <!--Battery saver warning. STOPSHIP: Remove it eventually. -->
    <string name="battery_saver_warning" translatable="false">\"Extreme\" battery saver activated.\n\nSee the details at: go/extreme-battery-saver\n\nEBS aggressively throttles background apps and changes screen-off behavior.\n</string>

+2 −0
Original line number Diff line number Diff line
@@ -3200,4 +3200,6 @@
  <java-symbol type="array" name="config_autoBrightnessDisplayValuesNits" />
  <java-symbol type="array" name="config_screenBrightnessBacklight" />
  <java-symbol type="array" name="config_screenBrightnessNits" />

  <java-symbol type="string" name="shortcut_disabled_reason_unknown" />
</resources>