diff options
author | John Spurlock <jspurlock@google.com> | 2014-06-04 11:12:30 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-06-04 11:12:30 -0400 |
commit | fe002e21a8870ece95516be99e42a130db2068c4 (patch) | |
tree | 76bcc8ee02dd92a23c1221363ad368a4535a1273 | |
parent | 5b210dd572d511c9f57012588745eb99410a7181 (diff) | |
download | packages_apps_Settings-fe002e21a8870ece95516be99e42a130db2068c4.tar.gz packages_apps_Settings-fe002e21a8870ece95516be99e42a130db2068c4.tar.bz2 packages_apps_Settings-fe002e21a8870ece95516be99e42a130db2068c4.zip |
Settings: Remove quick settings options for daltonizer.
Bug:15424806
Change-Id: I91a9cd974d9e370f899e7573d00f6d27fe2e5538
-rw-r--r-- | res/xml/accessibility_daltonizer_settings.xml | 5 | ||||
-rw-r--r-- | src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java | 14 |
2 files changed, 1 insertions, 18 deletions
diff --git a/res/xml/accessibility_daltonizer_settings.xml b/res/xml/accessibility_daltonizer_settings.xml index 2e8ad3477..30a5444bd 100644 --- a/res/xml/accessibility_daltonizer_settings.xml +++ b/res/xml/accessibility_daltonizer_settings.xml @@ -17,11 +17,6 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/accessibility_display_daltonizer_preference_title" > - <CheckBoxPreference - android:key="enable_quick_setting" - android:persistent="false" - android:title="@string/enable_quick_setting" /> - <ListPreference android:entries="@array/daltonizer_type_entries" android:entryValues="@array/daltonizer_type_values" diff --git a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java index b910f796a..54a34f256 100644 --- a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java +++ b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java @@ -17,7 +17,6 @@ package com.android.settings.accessibility; import android.os.Bundle; -import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.provider.Settings; @@ -32,11 +31,8 @@ public class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceF implements Preference.OnPreferenceChangeListener, SwitchBar.OnSwitchChangeListener { private static final String ENABLED = Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED; private static final String TYPE = Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER; - private static final String QUICK_SETTING_ENABLED = - Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_QUICK_SETTING_ENABLED; private static final int DEFAULT_TYPE = AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY; - private CheckBoxPreference mEnableQuickSetting; private ListPreference mType; @Override @@ -45,7 +41,6 @@ public class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceF addPreferencesFromResource(R.xml.accessibility_daltonizer_settings); - mEnableQuickSetting = (CheckBoxPreference) findPreference("enable_quick_setting"); mType = (ListPreference) findPreference("type"); initPreferences(); @@ -58,10 +53,7 @@ public class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceF @Override public boolean onPreferenceChange(Preference preference, Object newValue) { - if (preference == mEnableQuickSetting) { - Settings.Secure.putInt( - getContentResolver(), QUICK_SETTING_ENABLED, ((Boolean) newValue) ? 1 : 0); - } else if (preference == mType) { + if (preference == mType) { Settings.Secure.putInt(getContentResolver(), TYPE, Integer.parseInt((String) newValue)); preference.setSummary("%s"); } @@ -92,10 +84,6 @@ public class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceF } private void initPreferences() { - mEnableQuickSetting.setChecked( - Settings.Secure.getInt(getContentResolver(), QUICK_SETTING_ENABLED, 0) == 1); - mEnableQuickSetting.setOnPreferenceChangeListener(this); - final String value = Integer.toString( Settings.Secure.getInt(getContentResolver(), TYPE, DEFAULT_TYPE)); mType.setValue(value); |