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

Commit 7eb8b955 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Change "app version lower" shortcut restore error message.

Unfortunately many large apps slightly change app versions depending on DPI/etc,
meaning even if an app is the latest, its version code can still be lower than
that on the previous device.

In a near future, apps will no longer have to do this.

So for now, let's just keep this behavior as-is and instead change
the error message.

Bug: 70809608

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
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
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
Change-Id: Ia9e13a98e80b1d63660c619ac18d1b5052a51a4c
parent 64dd7468
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4811,7 +4811,7 @@
    A toast message shown when an app shortcut that was restored from a previous device is clicked,
    but it cannot be started because the shortcut was created by a newer version of the app.
    -->
    <string name="shortcut_restored_on_lower_version">This shortcut requires latest app</string>
    <string name="shortcut_restored_on_lower_version">App version downgraded, or isn\u2019t compatible with this shortcut</string>

    <!--
    A toast message shown when an app shortcut that was restored from a previous device is clicked,
+2 −1
Original line number Diff line number Diff line
@@ -5149,7 +5149,8 @@ public class ShortcutManagerTest1 extends BaseShortcutManagerTest {
                    .forAllShortcuts(si -> {
                        switch (package1DisabledReason) {
                            case ShortcutInfo.DISABLED_REASON_VERSION_LOWER:
                                assertEquals("This shortcut requires latest app",
                                assertEquals("App version downgraded, or isn’t compatible"
                                        + " with this shortcut",
                                        si.getDisabledMessage());
                                break;
                            case ShortcutInfo.DISABLED_REASON_SIGNATURE_MISMATCH: