Merge "Fix ShortcutService handling of locale change during device setup."

am: 742048924f

Change-Id: I091a439fd5adc8bd3693af25bcef781bcaf7e2f6
This commit is contained in:
Sudheer Shanka
2018-11-27 23:26:29 -08:00
committed by android-build-merger

View File

@@ -294,13 +294,14 @@ class ShortcutUser {
*/
public void detectLocaleChange() {
final String currentLocales = mService.injectGetLocaleTagsForUser(mUserId);
if (getKnownLocales().equals(currentLocales)) {
if (!TextUtils.isEmpty(mKnownLocales) && mKnownLocales.equals(currentLocales)) {
return;
}
if (ShortcutService.DEBUG) {
Slog.d(TAG, "Locale changed from " + currentLocales + " to " + mKnownLocales
Slog.d(TAG, "Locale changed from " + mKnownLocales + " to " + currentLocales
+ " for user " + mUserId);
}
mKnownLocales = currentLocales;
forAllPackages(pkg -> {