diff options
| author | Varun Shah <varunshah@google.com> | 2019-09-06 11:25:35 -0700 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2019-09-06 11:25:35 -0700 |
| commit | ea424deee9832b3728c9f1f049c7752de190ef3e (patch) | |
| tree | a3cc06c422a762d75abf88737c091844d2a22154 /core/java/android | |
| parent | b5e96b176bc584abfb6c66f65ba83877a64f4762 (diff) | |
| parent | a5c53a01ae0aff071eefdc7cf980d48be289f527 (diff) | |
Merge "Fix bootloop issue with UsageStatsService." into qt-qpr1-dev am: eff156093c
am: a5c53a01ae
Change-Id: I9e172385ca47ee1a37986f27694b904acb22769b
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/res/Configuration.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java index 861ae7ba122e..9cf54f41a64b 100644 --- a/core/java/android/content/res/Configuration.java +++ b/core/java/android/content/res/Configuration.java @@ -1222,7 +1222,15 @@ public final class Configuration implements Parcelable, Comparable<Configuration .setVariant(variant) .setScript(script) .build(); - list.add(locale); + // Log a WTF here if a repeated locale is found to avoid throwing an + // exception in system server when LocaleList is created below + final int inListIndex = list.indexOf(locale); + if (inListIndex != -1) { + Slog.wtf(TAG, "Repeated locale (" + list.get(inListIndex) + ")" + + " found when trying to add: " + locale.toString()); + } else { + list.add(locale); + } } catch (IllformedLocaleException e) { Slog.e(TAG, "readFromProto error building locale with: " + "language-" + language + ";country-" + country |
