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

Commit 3aee92e2 authored by Chun-Ku Lin's avatar Chun-Ku Lin
Browse files

Update a11y edit shortcut screen's text and tutorial text

Bug: 323792194

Test: manual
Test: atest com.android.settings.accessibility
Test: atest com.android.settings.accessibility.shortcuts

Flag: N/A simple string changes

NO_IFTTT=Introduce new IfThisThenThat lint

Change-Id: I7ba4096d669453c33257880407e85ffe76d358f8
parent 85cc4cd8
Loading
Loading
Loading
Loading
+62 −25
Original line number Diff line number Diff line
@@ -4865,33 +4865,45 @@
    <!-- Accessibility label for paging indicator in accessibility tutorial page. [CHAR LIMIT=NONE] -->
    <string name="accessibility_tutorial_pager">Page <xliff:g id="current_page" example="2">%1$d</xliff:g> of <xliff:g id="num_pages" example="3">%2$d</xliff:g></string>
    <!-- Title for the accessibility tutorial dialog in accessibility service with button. [CHAR LIMIT=50] -->
    <string name="accessibility_tutorial_dialog_title_button">Use accessibility button to open</string>
    <string name="accessibility_tutorial_dialog_title_button">Accessibility button shortcut</string>
    <!-- Title for the accessibility tutorial dialog in accessibility service with volume keys. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_title_volume">Hold volume keys to open</string>
    <string name="accessibility_tutorial_dialog_title_volume">Volume keys shortcut</string>
    <!-- Title for the accessibility tutorial dialog in accessibility service with triple tap. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_title_triple">Triple tap screen to open</string>
    <string name="accessibility_tutorial_dialog_title_triple">Triple tap shortcut</string>
    <!-- Title for the accessibility tutorial dialog in accessibility service with two finger double tap. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_title_two_finger_double">Two finger double tap screen to open</string>
    <string name="accessibility_tutorial_dialog_title_two_finger_double">%1$d-finger double tap shortcut</string>
    <!-- Title for the accessibility tutorial dialog in accessibility service with quick setting shortcut. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_title_quick_setting">Quick Settings shortcut</string>
    <!-- Title for the accessibility tutorial dialog in accessibility service with gesture. [CHAR LIMIT=50] -->
    <string name="accessibility_tutorial_dialog_title_gesture">Use gesture to open</string>
    <string name="accessibility_tutorial_dialog_title_gesture">Accessibility gesture shortcut</string>
    <!-- Title for the accessibility tutorial dialog in gesture navigation settings. [CHAR LIMIT=50] -->
    <string name="accessibility_tutorial_dialog_title_gesture_settings">Use accessibility gesture</string>
    <!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using the 3-button nav bar. [CHAR LIMIT=NONE] -->
    <string name="accessibility_tutorial_dialog_message_button">To use this feature, tap the accessibility button <xliff:g id="accessibility_icon" example="[Icon]">%s</xliff:g> on the bottom of your screen.\n\nTo switch between features, touch &amp; hold the accessibility button.</string>
    <string name="accessibility_tutorial_dialog_message_button">To use this feature, tap the accessibility button <xliff:g id="accessibility_icon" example="[Icon]">%s</xliff:g> at the bottom of your screen.\n\nTo switch between features, touch &amp; hold the accessibility button.</string>
    <!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using the accessibility floating button. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_message_floating_button">To use this feature, tap the accessibility button on your screen.</string>
    <string name="accessibility_tutorial_dialog_message_floating_button">To use this feature, tap the accessibility button on your screen</string>
    <!-- Instruction for the accessibility tutorial dialog in accessibility service with volume keys. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_message_volume">To use this feature, press &amp; hold both volume keys.</string>
    <!-- Instruction for the accessibility tutorial dialog in accessibility service with triple tap. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_message_volume">To use this feature, press &amp; hold both volume keys</string>
    <!-- Instruction for the accessibility tutorial dialog for the screen magnification feature with triple tap. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_message_triple">To start and stop magnification, triple-tap anywhere on your screen.</string>
    <!-- Instruction for the accessibility tutorial dialog in accessibility service with two finger double tap. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_message_two_finger_triple">To start and stop magnification, double-tap anywhere on your screen with two fingers.</string>
    <!-- Instruction for the accessibility tutorial dialog in accessibility service with triple tap. [CHAR LIMIT=NONE]-->
    <string name="accessibility_tutorial_dialog_message_quick_setting">To use this feature, swipe down from the top of your screen.</string>
    <!-- Instruction for the accessibility tutorial dialog for the screen magnification feature with triple tap shortcut. [CHAR LIMIT=NONE] -->
    <string name="accessibility_tutorial_dialog_tripletap_instruction">To start and stop magnification, quickly tap the screen %1$d times</string>
    <!-- Instruction for the accessibility tutorial dialog for the screen magnification feature with two finger double tap. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_twofinger_doubletap_instruction">To start and stop magnification, quickly tap the screen twice with %1$d fingers</string>
    <!-- Instruction for the accessibility tutorial dialog in accessibility service with quick settings shortcut. [CHAR LIMIT=NONE]-->
    <string name="accessibility_tutorial_dialog_message_quick_setting">{count, plural,
      =1    {To use this feature, swipe down from the top of your screen. Then, find the {featureName} tile.}
      other {To use this feature, swipe down from the top of your screen with # fingers. Then, find the {featureName} tile.}
    }</string>
    <!-- Warning for the accessibility shortcut type that is not available immediately during device setup when chosen, but will be available after setup. [CHAR LIMIT=NONE]-->
    <string name="accessibility_tutorial_dialog_shortcut_unavailable_in_suw">This shortcut will be available after you finish device setup.</string>
    <!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using gesture navigation and touch exploration is not enabled. [CHAR LIMIT=NONE] -->
    <string name="accessibility_tutorial_dialog_message_gesture">To use this feature, swipe up from the bottom of the screen with 2 fingers.\n\nTo switch between features, swipe up with 2 fingers and hold.</string>
    <!-- Instruction for the accessibility tutorial dialog when user enables an accessibility service while using gesture navigation. [CHAR LIMIT=NONE] -->
    <string name="accessibility_tutorial_dialog_gesture_shortcut_instruction">{count, plural,
      =1    {To use this feature, swipe up from the bottom of your screen}
      other {To use this feature, swipe up with # fingers from the bottom of your screen}
    }</string>
    <!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using gesture navigation and touch exploration is enabled. [CHAR LIMIT=NONE] -->
    <string name="accessibility_tutorial_dialog_message_gesture_talkback">To use this feature, swipe up from the bottom of the screen with 3 fingers.\n\nTo switch between features, swipe up with 3 fingers and hold.</string>
    <!-- Message for the accessibility tutorial dialog when user chooses gesture navigation in navigation settings, an accessibility service is using the accessibility button, and touch exploration is disabled. [CHAR LIMIT=NONE] -->
@@ -4901,7 +4913,9 @@
    <!-- Button for the accessibility tutorial dialog to dismiss the dialog when user clicks it. [CHAR LIMIT=10] -->
    <string name="accessibility_tutorial_dialog_button">Got it</string>
    <!-- Button for the accessibility tutorial dialog to open the Accessibility button settings page. [CHAR LIMIT=30] -->
    <string name="accessibility_tutorial_dialog_link_button">Button settings</string>
    <string name="accessibility_tutorial_dialog_link_button">Customize button</string>
    <!-- Button for the accessibility tutorial dialog to open a page to select the different software shortcut type. [CHAR LIMIT=30] -->
    <string name="accessibility_tutorial_dialog_configure_software_shortcut_type">More options</string>
    <!-- Title for accessibility shortcut preference for accessibility apps. [CHAR LIMIT=40] -->
    <string name="accessibility_shortcut_title"><xliff:g id="service" example="Select to Speak">%1$s</xliff:g> shortcut</string>
    <!-- Shown as one of the item in the chosen accessibility shortcut types list presented as a label next to the shortcut toggle. [CHAR LIMIT=NONE] -->
@@ -4912,16 +4926,23 @@
    <string name="accessibility_shortcut_edit_dialog_title_software_gesture">Swipe up with 2 fingers</string>
    <!-- Title for software shortcut in gesture mode in accessibility edit shortcut dialog while using gesture navigation and touch exploration are enabled. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_software_gesture_talkback">Swipe up with 3 fingers</string>
    <!-- Summary for accessibility shortcut preference for software shortcut type. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_software">Tap accessibility button</string>
    <!-- Summary for accessibility shortcut preference for software shortcut gesture type. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_software_by_gesture">Use accessibility gesture</string>
    <!-- Title for accessibility shortcut preference for software shortcut type. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_software">Accessibility button</string>
    <!-- Summary for accessibility shortcut preference for floating button shortcut type. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_floating_button">Tap the floating button</string>
    <!-- Title for accessibility shortcut preference for software shortcut gesture type. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_software_by_gesture">Accessibility gesture</string>
    <!-- Summary for software shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_software">Tap the accessibility button <xliff:g id="accessibility_icon" example="[Icon]">%s</xliff:g> at the bottom of your screen.\n\nTo switch between features, touch &amp; hold the accessibility button.</string>
    <string name="accessibility_shortcut_edit_dialog_summary_software">Tap the accessibility button <xliff:g id="accessibility_icon" example="[Icon]">%s</xliff:g> at the bottom of your screen. To switch between features, touch &amp; hold the accessibility button.</string>
    <!-- Summary for software shortcut in gesture mode in accessibility edit shortcut dialog while using gesture navigation is enabled. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_software_gesture">Swipe up from the bottom of the screen with 2 fingers.\n\nTo switch between features, swipe up with 2 fingers and hold.</string>
    <!-- Summary for software shortcut in gesture mode in accessibility edit shortcut dialog while using gesture navigation and touch exploration are enabled [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_software_gesture_talkback">Swipe up from the bottom of the screen with 3 fingers.\n\nTo switch between features, swipe up with 3 fingers and hold.</string>
    <!-- Summary for gesture shortcut option -->
    <string name="accessibility_shortcut_edit_dialog_summary_gesture">{count, plural,
      =1      {Swipe up from the bottom of your screen. To switch between features, swipe up and hold.}
      other   {Swipe up with # fingers from the bottom of your screen. To switch between features, swipe up with # fingers and hold.}
    }</string>
    <!-- Summary for software shortcut in accessibility edit shortcut dialog when user had enabled the accessibility floating button mode (Floating over other apps). [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_software_floating"><annotation id="link">More options</annotation></string>
    <!-- Footer to show help link content description. [CHAR LIMIT=NONE] -->
@@ -4929,25 +4950,41 @@
    <!-- Title for quick settings shortcut option in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_quick_settings">Quick Settings</string>
    <!-- Summary for quick settings shortcut option in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_quick_settings">Swipe down from the top of your screen</string>
    <string name="accessibility_shortcut_edit_dialog_summary_quick_settings">{count, plural,
      =1      {Swipe down from the top of your screen}
      other   {Swipe down with # fingers from the top of your screen}
    }</string>
    <!-- Summary for quick settings shortcut option in accessibility edit shortcut dialog in Setup Wizard. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_quick_settings_suw">{count, plural,
      =1      {Swipe down from the top of your screen. This shortcut will be available after you finish device setup.}
      other   {Swipe down with # fingers from the top of your screen. This shortcut will be available after you finish device setup.}
    }</string>
    <!-- Shown as one of the item in the chosen accessibility shortcut types list presented as a label next to the shortcut toggle. [CHAR LIMIT=NONE] -->
    <string name="accessibility_feature_shortcut_setting_summary_quick_settings">Quick Settings</string>
    <!-- Title for hardware shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_hardware">Hold volume keys</string>
    <string name="accessibility_shortcut_edit_dialog_title_hardware">Volume keys</string>
    <!-- Part of list to compose user's accessibility shortcut list. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_hardware_keyword">hold volume keys</string>
    <string name="accessibility_shortcut_hardware_keyword">volume keys</string>
    <!-- Summary for hardware shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_hardware">Press &amp; hold both volume keys</string>
    <!-- Title for two finger double tap shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_two_finger_double_tap">Two-finger double-tap screen</string>
    <!-- Part of list to compose user's accessibility shortcut list. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_two_finger_double_tap_keyword">two-finger double-tap screen</string>
    <!-- Title for 2-finger double tap shortcut in accessibility edit shortcut screen. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_screen_title_two_finger_double_tap">%1$d-finger double tap</string>
    <!-- Summary for 2-finger double tap shortcut in accessibility edit shortcut screen. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_screen_summary_two_finger_double_tap">Quickly tap the screen twice with %1$d fingers</string>
    <!-- Title for triple tap shortcut in accessibility edit shortcut screen. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_screen_title_triple_tap">Triple tap</string>
    <!-- Summary for triple tap shortcut in accessibility edit shortcut screen. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_screen_summary_triple_tap">Quickly tap the screen %1$d times. This may slow down your device.</string>
    <!-- 2-finger double tap is shown as part of list to compose user's accessibility shortcut list. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_two_finger_double_tap_keyword">%1$d-finger double tap</string>
    <!-- Summary for two finger double tap shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_two_finger_double_tap">Quickly tap screen {0,number,integer} times with two fingers</string>
    <!-- Title for triple tap shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_triple_tap">Triple-tap screen</string>
    <!-- Part of list to compose user's accessibility shortcut list. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_triple_tap_keyword">triple-tap screen</string>
    <string name="accessibility_shortcut_triple_tap_keyword">triple tap</string>
    <!-- Summary for triple tap shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_triple_tap">Quickly tap screen {0,number,integer} times. This shortcut may slow down your device</string>
    <!-- Title for the accessibility edit shortcut dialog to save the preference when user clicks it. [CHAR LIMIT=20] -->
+8 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
        android:selectable="false"
        settings:allowDividerAbove="false"
        settings:allowDividerBelow="false"/>

    <!-- LINT.IfChange(shortcut_type_ui_order) -->
    <com.android.settings.accessibility.shortcuts.ShortcutOptionPreference
        android:key="@string/accessibility_shortcut_quick_settings_pref"
        android:persistent="false"
@@ -90,4 +90,11 @@
        settings:allowDividerAbove="false"
        settings:allowDividerBelow="false"
        settings:controller="com.android.settings.accessibility.shortcuts.TripleTapShortcutOptionController" />
    <!--
        LINT.ThenChange(
            /src/com/android/settings/accessibility/AccessibilityGestureNavigationTutorial.java:shortcut_type_ui_order,
            /src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java:shortcut_type_ui_order,
            /src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java:shortcut_type_ui_order
        )
    -->
</PreferenceScreen>
 No newline at end of file
+89 −44

File changed.

Preview size limit exceeded, changes collapsed.

+4 −2
Original line number Diff line number Diff line
@@ -223,12 +223,12 @@ public abstract class AccessibilityShortcutPreferenceFragment extends Restricted
                    mDialog = AccessibilityGestureNavigationTutorial
                            .createAccessibilityTutorialDialogForSetupWizard(
                                    getPrefContext(), getUserShortcutTypes(),
                                    this::callOnTutorialDialogButtonClicked);
                                    this::callOnTutorialDialogButtonClicked, getLabelName());
                } else {
                    mDialog = AccessibilityGestureNavigationTutorial
                            .createAccessibilityTutorialDialog(
                                    getPrefContext(), getUserShortcutTypes(),
                                    this::callOnTutorialDialogButtonClicked);
                                    this::callOnTutorialDialogButtonClicked, getLabelName());
                }
                mDialog.setCanceledOnTouchOutside(false);
                return mDialog;
@@ -454,6 +454,7 @@ public abstract class AccessibilityShortcutPreferenceFragment extends Restricted
        final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
                getComponentName().flattenToString());

        // LINT.IfChange(shortcut_type_ui_order)
        final List<CharSequence> list = new ArrayList<>();
        if (android.view.accessibility.Flags.a11yQsShortcut()) {
            if (hasShortcutType(shortcutTypes, AccessibilityUtil.UserShortcutType.QUICK_SETTINGS)) {
@@ -470,6 +471,7 @@ public abstract class AccessibilityShortcutPreferenceFragment extends Restricted
                    R.string.accessibility_shortcut_hardware_keyword);
            list.add(hardwareTitle);
        }
        // LINT.ThenChange(/res/xml/accessibility_edit_shortcuts.xml:shortcut_type_ui_order)

        // Show software shortcut if first time to use.
        if (list.isEmpty()) {
+4 −2
Original line number Diff line number Diff line
@@ -228,12 +228,12 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
                    mDialog = AccessibilityGestureNavigationTutorial
                            .createAccessibilityTutorialDialogForSetupWizard(
                                    getPrefContext(), getUserShortcutTypes(),
                                    this::callOnTutorialDialogButtonClicked);
                                    this::callOnTutorialDialogButtonClicked, mPackageName);
                } else {
                    mDialog = AccessibilityGestureNavigationTutorial
                            .createAccessibilityTutorialDialog(
                                    getPrefContext(), getUserShortcutTypes(),
                                    this::callOnTutorialDialogButtonClicked);
                                    this::callOnTutorialDialogButtonClicked, mPackageName);
                }
                mDialog.setCanceledOnTouchOutside(false);
                return mDialog;
@@ -711,6 +711,7 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
            return context.getText(R.string.accessibility_shortcut_state_off);
        }

        // LINT.IfChange(shortcut_type_ui_order)
        final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(
                context, mComponentName.flattenToString(), getDefaultShortcutTypes());

@@ -730,6 +731,7 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
                    R.string.accessibility_shortcut_hardware_keyword);
            list.add(hardwareTitle);
        }
        // LINT.ThenChange(/res/xml/accessibility_edit_shortcuts.xml:shortcut_type_ui_order)

        // Show software shortcut if first time to use.
        if (list.isEmpty()) {
Loading