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

This commit is contained in:
Sudheer Shanka
2018-11-28 07:07:38 +00:00
committed by Gerrit Code Review

View File

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