diff --git a/res/values/strings.xml b/res/values/strings.xml index a0cd983a168..2fc7c87de69 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4093,6 +4093,8 @@ Magnify with triple-tap Magnify with button + + Magnify with button & triple-tap Zoom in on screen @@ -4100,7 +4102,7 @@ Tap a button to zoom - To zoom, quickly tap the screen 3 times with one finger.\n\n\nTo zoom temporarily, quickly tap the screen 3 times and hold down your finger on the third tap.\n\n\nYou can\'t zoom in on the keyboard and navigation bar. + To zoom, quickly tap the screen 3 times.\n\n\nTo zoom temporarily, quickly tap the screen 3 times and hold down your finger on the third tap.\n\n\nYou can\'t zoom in on the keyboard and navigation bar. When magnification is turned on, use the Accessibility button at the bottom of the screen to quickly magnify.\n\nTo zoom, tap the Accessibility button, then tap anywhere on the screen.\n\n\nTo zoom temporarily, tap the Accessibility button, then touch & hold anywhere on the screen.\n\n\nYou can’t zoom in on the keyboard or navigation bar. diff --git a/src/com/android/settings/accessibility/AccessibilitySettings.java b/src/com/android/settings/accessibility/AccessibilitySettings.java index 5fb6bbe42ac..6680d7fdf43 100644 --- a/src/com/android/settings/accessibility/AccessibilitySettings.java +++ b/src/com/android/settings/accessibility/AccessibilitySettings.java @@ -587,6 +587,8 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements updateFeatureSummary(Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, mDisplayDaltonizerPreferenceScreen); + updateMagnificationSummary(mDisplayMagnificationPreferenceScreen); + updateFontSizeSummary(mFontSizePreferenceScreen); updateAutoclickSummary(mAutoclickPreferenceScreen); @@ -594,6 +596,25 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements updateAccessibilityShortcut(mAccessibilityShortcutPreferenceScreen); } + private void updateMagnificationSummary(Preference pref) { + final boolean tripleTapEnabled = Settings.Secure.getInt(getContentResolver(), + Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, 0) == 1; + final boolean buttonEnabled = Settings.Secure.getInt(getContentResolver(), + Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, 0) == 1; + + int summaryResId = 0; + if (!tripleTapEnabled && !buttonEnabled) { + summaryResId = R.string.accessibility_feature_state_off; + } else if (!tripleTapEnabled && buttonEnabled) { + summaryResId = R.string.accessibility_screen_magnification_navbar_title; + } else if (tripleTapEnabled && !buttonEnabled) { + summaryResId = R.string.accessibility_screen_magnification_gestures_title; + } else { + summaryResId = R.string.accessibility_screen_magnification_state_navbar_gesture; + } + pref.setSummary(summaryResId); + } + private void updateFeatureSummary(String prefKey, Preference pref) { final boolean enabled = Settings.Secure.getInt(getContentResolver(), prefKey, 0) == 1; pref.setSummary(enabled ? R.string.accessibility_feature_state_on