Skip to content

Commit

Permalink
SystemUI: Handle null keys on settings reload.
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
Adnan Begovic authored and MarcLandis committed May 1, 2016
1 parent 8632ca9 commit 499cef7
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -132,6 +132,12 @@ protected void reregisterAll() {

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);
Expand Down

0 comments on commit 499cef7

Please sign in to comment.