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
This commit is contained in:
Makoto Onuki
2016-10-31 15:32:17 -07:00
parent e97969b4d0
commit ac2898228e

View File

@@ -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);
}