diff options
author | Makoto Onuki <omakoto@google.com> | 2016-10-31 15:32:17 -0700 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-10-31 18:14:11 -0700 |
commit | 30b7bd5cafc3462727bfbd5b030a26135fa32893 (patch) | |
tree | 8863d968f594b22476e184bbcc8a799a113aed6e | |
parent | 9af3e25f77ed6a7a638eebcac35a290d613c3889 (diff) | |
download | base-30b7bd5cafc3462727bfbd5b030a26135fa32893.tar.gz |
Always scan the Settings app for updated shortcuts.
The setting apps' version code is 25 for both DR and MR1, so the
shortcut manager will not notice when it's changed.
Let's just always scan this app.
Bug 32554059
Change-Id: Ia05363b30a5eeb989dc4c44cf5dbd71cde96de96
(cherry picked from commit ac2898228edea493c76287338adf6dd8ca21303a)
-rw-r--r-- | services/core/java/com/android/server/pm/ShortcutPackage.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java index d558b07a7a70..38d69ed287e1 100644 --- a/services/core/java/com/android/server/pm/ShortcutPackage.java +++ b/services/core/java/com/android/server/pm/ShortcutPackage.java @@ -635,7 +635,11 @@ class ShortcutPackage extends ShortcutPackageItem { return false; // Shouldn't happen. } - if (!isNewApp && !forceRescan) { + // Always scan the settings app, since its version code is the same for DR and MR1. + // TODO Fix it properly: b/32554059 + final boolean isSettings = "com.android.settings".equals(getPackageName()); + + if (!isNewApp && !forceRescan && !isSettings) { // Return if the package hasn't changed, ie: // - version code hasn't change // - lastUpdateTime hasn't change @@ -652,6 +656,11 @@ class ShortcutPackage extends ShortcutPackageItem { return false; } } + if (isSettings) { + if (ShortcutService.DEBUG) { + Slog.d(TAG, "Always scan settings."); + } + } } finally { s.logDurationStat(Stats.PACKAGE_UPDATE_CHECK, start); } |