Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6075d46e authored by Casey Burkhardt's avatar Casey Burkhardt Committed by Android (Google) Code Review
Browse files

Merge "Updates to Magnification Settings"

parents dedc8f18 9c7143c3
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -4079,12 +4079,22 @@
    <string name="accessibility_captioning_title">Captions</string>
    <!-- Title for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=35] -->
    <string name="accessibility_screen_magnification_title">Magnification</string>
    <!-- Title for the accessibility preference screen to enable triple-tap gesture screen magnification. [CHAR LIMIT=35] -->
    <string name="accessibility_screen_magnification_gestures_title">Magnify with triple-tap</string>
    <!-- Title for the accessibility preference screen to enable navigation bar screen magnification. [CHAR LIMIT=35] -->
    <string name="accessibility_screen_magnification_navbar_title">Magnify with button</string>
    <!-- Summary for the accessibility preference to enable screen magnification. [CHAR LIMIT=25] -->
    <string name="accessibility_preference_magnification_summary">Zoom in on screen</string>
    <!-- Short summary for Magnification gesture. Tells the user that this feature allows the user to magnify the screen by tapping 3 times. Appears in accessibility portion of setup wizard -->
    <string name="accessibility_screen_magnification_short_summary">Tap 3 times to zoom</string>
    <!-- Summary for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=none] -->
    <!-- Short summary for nav bar Magnification. Tells the user that this feature allows the user to magnify the screen using a button in the nav bar -->
    <string name="accessibility_screen_magnification_navbar_short_summary">Tap a button to zoom</string>
    <!-- Summary for the accessibility preference screen to enable screen magnification gestures. [CHAR LIMIT=none] -->
    <string name="accessibility_screen_magnification_summary"><b>To zoom</b>, quickly tap the screen 3 times with one finger.\n<ul><li>Drag 2 or more fingers to scroll</li>\n<li>Pinch 2 or more fingers together or apart to adjust zoom</li></ul>\n\n<b>To zoom temporarily</b>, quickly tap the screen 3 times and hold down your finger on the third tap.\n<ul><li>Drag your finger to move around the screen</li>\n<li>Lift your finger to zoom out</li></ul>\n\nYou can\'t zoom in on the keyboard and navigation bar.</string>
    <!-- Summary for the accessibility preference screen to enable screen magnification via the nav bar. [CHAR LIMIT=none] -->
    <string name="accessibility_screen_magnification_navbar_summary">When magnification is turned on, use the Accessibility button at the bottom of the screen to quickly magnify.\n\n<b>To zoom</b>, tap the Accessibility button, then tap anywhere on the screen.\n<ul><li>Drag 2 or more fingers to scroll</li>\n<li>Pinch 2 or more fingers to adjust zoom</li></ul>\n\n<b>To zoom temporarily</b>, tap the Accessibility button, then touch &amp; hold anywhere on the screen.\n<ul><li>Drag to move around the screen</li>\n<li>Lift finger to zoom out</li></ul>\n\nYou can’t zoom in on the keyboard or navigation bar.</string>
    <!-- Summary text appearing on the accessibility preference screen to enable screen magnification from the nav bar when the feature is enabled, but the accessibility button is not configured correctly for the feature to be used [CHAR LIMIT=none] -->
    <string name="accessibility_screen_magnification_navbar_configuration_warning">The Accessibility button is set to <xliff:g id="service" example="Select to Speak">%1$s</xliff:g>. To use magnification, touch &amp; hold the Accessibility button, then select magnification.</string>
    <!-- Title for the preference to enable the global geture that turns on accessibility. [CHAR LIMIT=35] -->
    <string name="accessibility_global_gesture_preference_title">Accessibility shortcut</string>
    <!-- Title for the accessibility preference to high contrast text. [CHAR LIMIT=35] -->
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                  android:title="@string/accessibility_screen_magnification_title">
    <Preference
        android:fragment="com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragment"
        android:key="screen_magnification_gestures_preference_screen"
        android:title="@string/accessibility_screen_magnification_gestures_title"/>
    <Preference
        android:fragment="com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragment"
        android:key="screen_magnification_navbar_preference_screen"
        android:title="@string/accessibility_screen_magnification_navbar_title"/>
</PreferenceScreen>
+3 −3
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@
                android:title="@string/screen_zoom_title"/>

        <Preference
                android:fragment="com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragment"
                android:key="screen_magnification_preference_screen"
            android:fragment="com.android.settings.accessibility.MagnificationPreferenceFragment"
            android:key="magnification_preference_screen"
            android:title="@string/accessibility_screen_magnification_title"/>

        <Preference
+2 −2
Original line number Diff line number Diff line
@@ -26,10 +26,10 @@

    <Preference
        android:fragment=
                "com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragmentForSetupWizard"
                "com.android.settings.accessibility.MagnificationPreferenceFragment"
        android:key="screen_magnification_preference"
        android:title="@string/accessibility_screen_magnification_title"
        android:summary="@string/accessibility_screen_magnification_short_summary" />
        android:summary="@string/accessibility_preference_magnification_summary" />

    <Preference
        android:fragment=
+2 −16
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
    static final String EXTRA_SETTINGS_TITLE = "settings_title";
    static final String EXTRA_COMPONENT_NAME = "component_name";
    static final String EXTRA_SETTINGS_COMPONENT_NAME = "settings_component_name";
    static final String EXTRA_VIDEO_RAW_RESOURCE_ID = "video_resource";
    static final String EXTRA_LAUNCHED_FROM_SUW = "from_suw";

    // Timeout before we update the services if packages are added/removed
    // since the AccessibilityManagerService has to do that processing first
@@ -350,9 +352,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
        } else if (mToggleMasterMonoPreference == preference) {
            handleToggleMasterMonoPreferenceClick();
            return true;
        } else if (mDisplayMagnificationPreferenceScreen == preference) {
            handleDisplayMagnificationPreferenceScreenClick();
            return true;
        }
        return super.onPreferenceTreeClick(preference);
    }
@@ -387,17 +386,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
                mToggleMasterMonoPreference.isChecked() ? 1 : 0, UserHandle.USER_CURRENT);
    }

    private void handleDisplayMagnificationPreferenceScreenClick() {
        Bundle extras = mDisplayMagnificationPreferenceScreen.getExtras();
        extras.putString(EXTRA_TITLE, getString(
                R.string.accessibility_screen_magnification_title));
        extras.putCharSequence(EXTRA_SUMMARY, getActivity().getResources().getText(
                R.string.accessibility_screen_magnification_summary));
        extras.putBoolean(EXTRA_CHECKED, Settings.Secure.getInt(getContentResolver(),
                Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, 0) == 1);
        super.onPreferenceTreeClick(mDisplayMagnificationPreferenceScreen);
    }

    private void initializeAllPreferences() {
        for (int i = 0; i < CATEGORIES.length; i++) {
            PreferenceCategory prefCategory = (PreferenceCategory) findPreference(CATEGORIES[i]);
@@ -656,8 +644,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements

        updateFeatureSummary(Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED,
                mCaptioningPreferenceScreen);
        updateFeatureSummary(Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
                mDisplayMagnificationPreferenceScreen);
        updateFeatureSummary(Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED,
                mDisplayDaltonizerPreferenceScreen);

Loading