summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/DevelopmentSettings.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2012-08-06 10:55:11 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2012-09-07 16:07:57 -0700
commitdecf36e6a50d81ef0955235da99001e500e7cbe2 (patch)
tree0a82adda7b24f9bde896750a75d51739bbf0ff5c /src/com/android/settings/DevelopmentSettings.java
parent96c2f8c50865e823e710be4d92f1589f978f03c2 (diff)
downloadpackages_apps_settings-decf36e6a50d81ef0955235da99001e500e7cbe2.zip
packages_apps_settings-decf36e6a50d81ef0955235da99001e500e7cbe2.tar.gz
packages_apps_settings-decf36e6a50d81ef0955235da99001e500e7cbe2.tar.bz2
Settings for the screen magnification feature.
1. Screen magnification on the device has to he explicitly enabled by the user before allowing a global gesture related interactions. The feature toggle setting is in Settings->Accessibility and it is a separate screen with instructions how to use the feature and a toggle switch. 2. Added a setting in developer options for toggling the magnification auto update feature. If this features is on the screen is zoomed out or rotation or activity start. Also if the feature is enabled the magnified viewport will scroll to show popped up windows. bug:5587727 Change-Id: Ic45a21d3a3928e2f5aac034751801f090b261488
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r--src/com/android/settings/DevelopmentSettings.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 7708aa7..8ebcd1c 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;