From 4dd032d5a66916920c3a5dac7bd9959e307f7316 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Tue, 2 Aug 2016 11:39:19 -0700 Subject: [PATCH] ShortcutManager: rescan all apps after next OTA - Normally when a user is unlocked, SM scans all updated apps since the last scan to see if their manifest shortcuts have changed. - There was a known issue that's been fixed already that'd result in all shortcuts being removed. - To work around this issue, let's scan all packages after the next user unlock. - This can be done by just renaming the XML attribute name to persist the last app scan time. Bug 30591723 Change-Id: Ie9f723ef30a1c991990d981193841cb203c094ad --- services/core/java/com/android/server/pm/ShortcutUser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/pm/ShortcutUser.java b/services/core/java/com/android/server/pm/ShortcutUser.java index 21e4165e6a674..ce3ed9c7deef2 100644 --- a/services/core/java/com/android/server/pm/ShortcutUser.java +++ b/services/core/java/com/android/server/pm/ShortcutUser.java @@ -57,7 +57,9 @@ class ShortcutUser { private static final String ATTR_VALUE = "value"; private static final String ATTR_KNOWN_LOCALES = "locales"; - private static final String ATTR_LAST_APP_SCAN_TIME = "last-app-scan-time"; + + // Suffix "2" was added to force rescan all packages after the next OTA. + private static final String ATTR_LAST_APP_SCAN_TIME = "last-app-scan-time2"; private static final String KEY_USER_ID = "userId"; private static final String KEY_LAUNCHERS = "launchers"; private static final String KEY_PACKAGES = "packages";