summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-10-17 18:03:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-17 18:03:35 +0000
commit2106c79bc28324aa2bb3658b19c58551ddc1cc14 (patch)
tree22f91d473454e61b45c11c62131c6985e5cb3d46
parent27334dbe75c131103606e455eb75c55804fe93de (diff)
parentea2810ad0f0d9562d0c8764b10a258b4f4dc869e (diff)
downloadpackages_apps_Settings-2106c79bc28324aa2bb3658b19c58551ddc1cc14.zip
packages_apps_Settings-2106c79bc28324aa2bb3658b19c58551ddc1cc14.tar.gz
packages_apps_Settings-2106c79bc28324aa2bb3658b19c58551ddc1cc14.tar.bz2
Merge "Prevent NPE when no accessibility services are enabled" into lmp-mr1-dev
-rw-r--r--src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
index f38d482..51b5ca9 100644
--- a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
@@ -194,9 +194,10 @@ public class ToggleAccessibilityServicePreferenceFragment
}
private void updateSwitchBarToggleSwitch() {
- String settingValue = Settings.Secure.getString(getContentResolver(),
+ final String settingValue = Settings.Secure.getString(getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
- final boolean checked = settingValue.contains(mComponentName.flattenToString());
+ final boolean checked = settingValue != null
+ && settingValue.contains(mComponentName.flattenToString());
mSwitchBar.setCheckedInternal(checked);
}