diff options
author | Amith Yamasani <yamasani@google.com> | 2010-02-24 16:33:29 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-02-24 16:33:29 -0800 |
commit | 7fa89d9d13e7a85e11cfb16d04f064f7005819e3 (patch) | |
tree | a996527b2085a78b108a2f6d3fc96df7c2afec01 /src | |
parent | effc754719b4aa8b63af9a2ef43c11085df1abd8 (diff) | |
parent | 80d6c74bb94569e6a7830c664724a6bef4c14d2d (diff) | |
download | packages_apps_Settings-7fa89d9d13e7a85e11cfb16d04f064f7005819e3.tar.gz packages_apps_Settings-7fa89d9d13e7a85e11cfb16d04f064f7005819e3.tar.bz2 packages_apps_Settings-7fa89d9d13e7a85e11cfb16d04f064f7005819e3.zip |
Merge "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, |