summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-04-27 13:38:00 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-04-28 10:03:12 -0700
commit999b3c25ee4b0bda1d46f85f3654482e67ae8403 (patch)
tree74a4dec21a698ade26d1df1ac717e170ec0a94be
parent39312b1c0cc17db8c485a072c4e3b2c001c207d2 (diff)
downloadframeworks_base-999b3c25ee4b0bda1d46f85f3654482e67ae8403.zip
frameworks_base-999b3c25ee4b0bda1d46f85f3654482e67ae8403.tar.gz
frameworks_base-999b3c25ee4b0bda1d46f85f3654482e67ae8403.tar.bz2
SystemUI: Handle null keys on settings reload.
During instrumentation or through manual command line invocation, null keys can be fetched from the listening uri's causing an IllegalArgumentException within the ContentProviderProxy of CMSettingsProvider's impl. Change-Id: I4a159e838f57e6b0c32b722c72d3bb6a898f6830 TICKET: CYNGNOS-2602
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/TunerService.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
index b2c90be..3e7477c 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerService.java
@@ -132,6 +132,12 @@ public class TunerService extends SystemUI {
public void reloadSetting(Uri uri) {
String key = mListeningUris.get(uri);
+
+ // Handle possible null keys
+ if (TextUtils.isEmpty(key)) {
+ return;
+ }
+
String value;
if (uri.getAuthority().equals(CMSettings.AUTHORITY)) {
value = CMSettings.Secure.getStringForUser(mContentResolver, key, mCurrentUser);