diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-09-07 16:20:36 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-07 16:20:37 -0700 |
commit | d4b711e60361a2a05ffa11a4199cceea54d3ea96 (patch) | |
tree | 5481e4698820594f141e30caababc0602928ce8f /src/com/android/settings/DevelopmentSettings.java | |
parent | 6c0841412e3ddf03d7b9ad56e398a20f6b6cf3fd (diff) | |
parent | decf36e6a50d81ef0955235da99001e500e7cbe2 (diff) | |
download | packages_apps_Settings-d4b711e60361a2a05ffa11a4199cceea54d3ea96.zip packages_apps_Settings-d4b711e60361a2a05ffa11a4199cceea54d3ea96.tar.gz packages_apps_Settings-d4b711e60361a2a05ffa11a4199cceea54d3ea96.tar.bz2 |
Merge "Settings for the screen magnification feature." into jb-mr1-dev
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index 09d7f9b..f590ea6 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -98,6 +98,8 @@ public class DevelopmentSettings extends PreferenceFragment private static final String TRANSITION_ANIMATION_SCALE_KEY = "transition_animation_scale"; private static final String ANIMATOR_DURATION_SCALE_KEY = "animator_duration_scale"; private static final String OVERLAY_DISPLAY_DEVICES_KEY = "overlay_display_devices"; + private static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE_KEY = + "accessibility_display_magnification_auto_update"; private static final String ENABLE_TRACES_KEY = "enable_traces"; @@ -142,6 +144,7 @@ public class DevelopmentSettings extends PreferenceFragment private CheckBoxPreference mShowHwScreenUpdates; private CheckBoxPreference mShowHwLayersUpdates; private CheckBoxPreference mDebugLayout; + private CheckBoxPreference mDisplayMangificationAutoUpdate; private ListPreference mWindowAnimationScale; private ListPreference mTransitionAnimationScale; private ListPreference mAnimatorDurationScale; @@ -237,6 +240,9 @@ public class DevelopmentSettings extends PreferenceFragment mAllPrefs.add(hdcpChecking); } removeHdcpOptionsForProduction(); + + mDisplayMangificationAutoUpdate = findAndInitCheckboxPref( + ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE_KEY); } private CheckBoxPreference findAndInitCheckboxPref(String key) { @@ -370,6 +376,7 @@ public class DevelopmentSettings extends PreferenceFragment updateImmediatelyDestroyActivitiesOptions(); updateAppProcessLimitOptions(); updateShowAllANRsOptions(); + updateDisplayMagnificationAutoUpdate(); } private void resetDangerousOptions() { @@ -623,6 +630,12 @@ public class DevelopmentSettings extends PreferenceFragment pokeSystemProperties(); } + private void writeDisplayMagnificationAutoUpdate() { + Settings.Secure.putInt(getActivity().getContentResolver(), + Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE, + mDisplayMangificationAutoUpdate.isChecked() ? 1 : 0); + } + private void updateCpuUsageOptions() { updateCheckBox(mShowCpuUsage, Settings.System.getInt(getActivity().getContentResolver(), Settings.System.SHOW_PROCESSES, 0) != 0); @@ -756,6 +769,12 @@ public class DevelopmentSettings extends PreferenceFragment getActivity().getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0); } + private void updateDisplayMagnificationAutoUpdate() { + updateCheckBox(mDisplayMangificationAutoUpdate, + Settings.Secure.getInt(getActivity().getContentResolver(), + Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE, 0) != 0); + } + private void updateEnableTracesOptions() { long flags = SystemProperties.getLong(Trace.PROPERTY_TRACE_TAG_ENABLEFLAGS, 0); String[] values = mEnableTracesPref.getEntryValues(); @@ -909,6 +928,8 @@ public class DevelopmentSettings extends PreferenceFragment writeShowHwLayersUpdatesOptions(); } else if (preference == mDebugLayout) { writeDebugLayoutOptions(); + } else if (preference == mDisplayMangificationAutoUpdate) { + writeDisplayMagnificationAutoUpdate(); } return false; |