Merge "Fix bootloop issue with UsageStatsService." into qt-qpr1-dev
am: eff156093c
Change-Id: Iece7adc8dd9a3cb5c704e917b22337cf8339f460
This commit is contained in:
@@ -1222,7 +1222,15 @@ public final class Configuration implements Parcelable, Comparable<Configuration
|
|||||||
.setVariant(variant)
|
.setVariant(variant)
|
||||||
.setScript(script)
|
.setScript(script)
|
||||||
.build();
|
.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) {
|
} catch (IllformedLocaleException e) {
|
||||||
Slog.e(TAG, "readFromProto error building locale with: "
|
Slog.e(TAG, "readFromProto error building locale with: "
|
||||||
+ "language-" + language + ";country-" + country
|
+ "language-" + language + ";country-" + country
|
||||||
|
|||||||
Reference in New Issue
Block a user