diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2010-02-18 17:20:10 -0800 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2010-02-18 17:20:10 -0800 |
commit | 80d6c74bb94569e6a7830c664724a6bef4c14d2d (patch) | |
tree | a39c172030e306773917319f0418c0aa3de13582 /src | |
parent | fae5ed1eeb70cb5c3af3baf978c45e896cbd9133 (diff) | |
download | packages_apps_Settings-80d6c74bb94569e6a7830c664724a6bef4c14d2d.tar.gz packages_apps_Settings-80d6c74bb94569e6a7830c664724a6bef4c14d2d.tar.bz2 packages_apps_Settings-80d6c74bb94569e6a7830c664724a6bef4c14d2d.zip |
Fixing bug 2455152 - Enabled accessibility services are disabled upon restarting accessibility
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/AccessibilitySettings.java | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java index 1d6db2099..276a22f1a 100644 --- a/src/com/android/settings/AccessibilitySettings.java +++ b/src/com/android/settings/AccessibilitySettings.java @@ -105,8 +105,6 @@ public class AccessibilitySettings extends PreferenceActivity { if (!accessibilityServices.isEmpty()) { if (serviceState == 1) { mToggleCheckBox.setChecked(true); - } else { - setAccessibilityServicePreferencesState(false); } mToggleCheckBox.setEnabled(true); } else { @@ -114,7 +112,6 @@ public class AccessibilitySettings extends PreferenceActivity { // no service and accessibility is enabled => disable Settings.Secure.putInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_ENABLED, 0); - setAccessibilityServicePreferencesState(false); } mToggleCheckBox.setEnabled(false); // Notify user that they do not have any accessibility apps @@ -130,26 +127,6 @@ public class AccessibilitySettings extends PreferenceActivity { persistEnabledAccessibilityServices(); } - /** - * Sets the state of the preferences for enabling/disabling AccessibilityServices. - * - * @param isEnabled If to enable or disable the preferences. - */ - private void setAccessibilityServicePreferencesState(boolean isEnabled) { - if (mAccessibilityServicesCategory == null) { - return; - } - - int count = mAccessibilityServicesCategory.getPreferenceCount(); - for (int i = 0; i < count; i++) { - Preference pref = mAccessibilityServicesCategory.getPreference(i); - pref.setEnabled(isEnabled); - if (!isEnabled){ - ((CheckBoxPreference) pref).setChecked(false); - } - } - } - @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { final String key = preference.getKey(); @@ -173,7 +150,6 @@ public class AccessibilitySettings extends PreferenceActivity { if (preference.isChecked()) { Settings.Secure.putInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_ENABLED, 1); - setAccessibilityServicePreferencesState(true); } else { final CheckBoxPreference checkBoxPreference = preference; AlertDialog dialog = (new AlertDialog.Builder(this)) @@ -186,7 +162,6 @@ public class AccessibilitySettings extends PreferenceActivity { public void onClick(DialogInterface dialog, int which) { Settings.Secure.putInt(getContentResolver(), Settings.Secure.ACCESSIBILITY_ENABLED, 0); - setAccessibilityServicePreferencesState(false); } }) .setNegativeButton(android.R.string.cancel, |