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

Commit 013626eb authored by Jean Chen's avatar Jean Chen Committed by Android (Google) Code Review
Browse files

Merge "feat(MultiFingerMultiTap): Update shortcut string to double tap from triple tap" into main

parents 4ed55488 097d8a89
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -4646,8 +4646,8 @@
    <string name="accessibility_tutorial_dialog_title_volume">Hold volume keys to open</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>
    <!-- Title for the accessibility tutorial dialog in accessibility service with two finger triple tap. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_title_two_finger_triple">Two finger triple tap screen to open</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>
    <!-- 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>
    <!-- Title for the accessibility tutorial dialog in gesture navigation settings. [CHAR LIMIT=50] -->
@@ -4660,8 +4660,8 @@
    <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_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 triple tap. [CHAR LIMIT=100] -->
    <string name="accessibility_tutorial_dialog_message_two_finger_triple">To start and stop magnification, triple-tap anywhere on your screen with two fingers.</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>
    <!-- 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>
    <!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using gesture navigation and touch exploration is enabled. [CHAR LIMIT=NONE] -->
@@ -4704,12 +4704,12 @@
    <string name="accessibility_shortcut_hardware_keyword">hold 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 triple tap shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_title_two_finger_triple_tap">Two-finger triple-tap screen</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_triple_tap_keyword">two-finger triple-tap screen</string>
    <!-- Summary for two finger triple tap shortcut in accessibility edit shortcut dialog. [CHAR LIMIT=NONE] -->
    <string name="accessibility_shortcut_edit_dialog_summary_two_finger_triple_tap">Quickly tap screen {0,number,integer} times with two fingers</string>
    <string name="accessibility_shortcut_two_finger_double_tap_keyword">two-finger double-tap screen</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] -->
+7 −7
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ public class AccessibilityDialogUtils {
                initSoftwareShortcut(context, contentView);
                initHardwareShortcut(context, contentView);
                if (Flags.enableMagnificationMultipleFingerMultipleTapGesture()) {
                    initTwoFingerTripleTapMagnificationShortcut(context, contentView);
                    initTwoFingerDoubleTapMagnificationShortcut(context, contentView);
                }
                initMagnifyShortcut(context, contentView);
                initAdvancedWidget(contentView);
@@ -260,7 +260,7 @@ public class AccessibilityDialogUtils {
                initSoftwareShortcutForSUW(context, contentView);
                initHardwareShortcut(context, contentView);
                if (Flags.enableMagnificationMultipleFingerMultipleTapGesture()) {
                    initTwoFingerTripleTapMagnificationShortcut(context, contentView);
                    initTwoFingerDoubleTapMagnificationShortcut(context, contentView);
                }
                initMagnifyShortcut(context, contentView);
                initAdvancedWidget(contentView);
@@ -365,15 +365,15 @@ public class AccessibilityDialogUtils {
                R.raw.a11y_shortcut_type_triple_tap);
    }

    private static void initTwoFingerTripleTapMagnificationShortcut(Context context, View view) {
    private static void initTwoFingerDoubleTapMagnificationShortcut(Context context, View view) {
        // TODO(b/306153204): Update shortcut string and image when UX provides them
        final View dialogView = view.findViewById(R.id.two_finger_triple_tap_shortcut);
        final CharSequence title = context.getText(
                R.string.accessibility_shortcut_edit_dialog_title_two_finger_triple_tap);
                R.string.accessibility_shortcut_edit_dialog_title_two_finger_double_tap);
        String summary = context.getString(
                R.string.accessibility_shortcut_edit_dialog_summary_two_finger_triple_tap);
        // Format the number '3' in the summary.
        final Object[] arguments = {3};
                R.string.accessibility_shortcut_edit_dialog_summary_two_finger_double_tap);
        // Format the number '2' in the summary.
        final Object[] arguments = {2};
        summary = MessageFormat.format(summary, arguments);

        setupShortcutWidgetWithImageRawResource(context, dialogView, title, summary,
+1 −1
Original line number Diff line number Diff line
@@ -416,7 +416,7 @@ public final class AccessibilityGestureNavigationTutorial {
        // TODO(b/308088945): Update tutorial string and image when UX provides them
        final int type = UserShortcutType.TWOFINGERTRIPLETAP;
        final CharSequence title =
                context.getText(R.string.accessibility_tutorial_dialog_title_two_finger_triple);
                context.getText(R.string.accessibility_tutorial_dialog_title_two_finger_double);
        final View image =
                createIllustrationViewWithImageRawResource(context,
                        R.raw.a11y_shortcut_type_triple_tap);
+1 −1
Original line number Diff line number Diff line
@@ -477,7 +477,7 @@ public class ToggleScreenMagnificationPreferenceFragment extends
        if (Flags.enableMagnificationMultipleFingerMultipleTapGesture()) {
            if (hasShortcutType(shortcutTypes, UserShortcutType.TWOFINGERTRIPLETAP)) {
                final CharSequence twoFingerTripleTapTitle = context.getText(
                        R.string.accessibility_shortcut_two_finger_triple_tap_keyword);
                        R.string.accessibility_shortcut_two_finger_double_tap_keyword);
                list.add(twoFingerTripleTapTitle);
            }
        }