diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-15 14:26:46 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-07-15 14:26:53 -0700 |
commit | 37d04f748f6c6ebc26c21337a82848c84489a2c9 (patch) | |
tree | f639c4a67f7ab31ff2c94b25d344b87237b5ec89 /src/com/android/settings/AccessibilitySettings.java | |
parent | 6c21377ff7e857e88a110e12eda98a6c30cba740 (diff) | |
download | packages_apps_settings-37d04f748f6c6ebc26c21337a82848c84489a2c9.zip packages_apps_settings-37d04f748f6c6ebc26c21337a82848c84489a2c9.tar.gz packages_apps_settings-37d04f748f6c6ebc26c21337a82848c84489a2c9.tar.bz2 |
Adding temporary setting for enabling touch exploration.
Change-Id: I81cef6f3bf4e533da1082bf836a74e38fe718af3
Diffstat (limited to 'src/com/android/settings/AccessibilitySettings.java')
-rw-r--r-- | src/com/android/settings/AccessibilitySettings.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java index bbb3678..52d5e92 100644 --- a/src/com/android/settings/AccessibilitySettings.java +++ b/src/com/android/settings/AccessibilitySettings.java @@ -74,6 +74,9 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements private static final String POWER_BUTTON_ENDS_CALL_CHECKBOX = "power_button_ends_call"; + private static final String TOUCH_EXPLORATION_ENABLED_CHECKBOX = + "touch_exploration_enabled"; + private static final String KEY_TOGGLE_ACCESSIBILITY_SERVICE_CHECKBOX = "key_toggle_accessibility_service_checkbox"; @@ -92,6 +95,7 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements private PreferenceCategory mPowerButtonCategory; private CheckBoxPreference mPowerButtonEndsCallCheckBox; + private CheckBoxPreference mTouchExplorationEnabledCheckBox; private PreferenceGroup mAccessibilityServicesCategory; @@ -127,6 +131,9 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements mPowerButtonEndsCallCheckBox = (CheckBoxPreference) findPreference( POWER_BUTTON_ENDS_CALL_CHECKBOX); + mTouchExplorationEnabledCheckBox = (CheckBoxPreference) findPreference( + TOUCH_EXPLORATION_ENABLED_CHECKBOX); + mLongPressTimeoutListPreference = (ListPreference) findPreference( KEY_LONG_PRESS_TIMEOUT_LIST_PREFERENCE); @@ -154,6 +161,10 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements getPreferenceScreen().removePreference(mPowerButtonCategory); } + boolean touchExplorationEnabled = (Settings.Secure.getInt(getContentResolver(), + Settings.Secure.TOUCH_EXPLORATION_REQUESTED, 0) == 1); + mTouchExplorationEnabledCheckBox.setChecked(touchExplorationEnabled); + mLongPressTimeoutListPreference.setOnPreferenceChangeListener(this); } @@ -295,6 +306,10 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR, (isChecked ? Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP : Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF)); + } else if (TOUCH_EXPLORATION_ENABLED_CHECKBOX.equals(key)) { + final int touchExplorationState = ((CheckBoxPreference) preference).isChecked() ? 1 : 0; + Settings.Secure.putInt(getContentResolver(), + Settings.Secure.TOUCH_EXPLORATION_REQUESTED, touchExplorationState); } else if (TOGGLE_ACCESSIBILITY_SCRIPT_INJECTION_CHECKBOX.equals(key)) { handleToggleAccessibilityScriptInjection((CheckBoxPreference) preference); } else if (preference instanceof CheckBoxPreference) { |