From 669d886cdc8b577f318152712c6b3b10c8a82599 Mon Sep 17 00:00:00 2001 From: Varun Shah Date: Wed, 4 Sep 2019 12:04:02 -0700 Subject: [PATCH] Fix bootloop issue with UsageStatsService. When the configurations are being read from the proto file, if a duplicate locale is found in the list, an exception is thrown from LocaleList which causes the UsageStatsService to crash. Instead, we'll now log a WTF if duplicate locales are found when parsing the configuration proto and not add the duplicate locale to the list. Bug: 140197723 Test: atest UsageStatsDatabaseTest Change-Id: Ie178b3cfdd45e6771a7c0e4bb42e47f79b5c30cc (cherry picked from commit 5d9031dbee2fad9b29e6477f5d7af8b622f2b456) --- core/java/android/content/res/Configuration.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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