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
This commit is contained in:
Chun-Ku Lin
2024-03-10 06:30:40 +00:00
parent 85cc4cd821
commit 3aee92e2e8
20 changed files with 831 additions and 217 deletions

View File

@@ -484,6 +484,7 @@ public class ToggleScreenMagnificationPreferenceFragment extends
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
MAGNIFICATION_CONTROLLER_NAME);
// LINT.IfChange(shortcut_type_ui_order)
final List<CharSequence> list = new ArrayList<>();
if (android.view.accessibility.Flags.a11yQsShortcut()) {
if (hasShortcutType(shortcutTypes, UserShortcutType.QUICK_SETTINGS)) {
@@ -500,18 +501,19 @@ public class ToggleScreenMagnificationPreferenceFragment extends
R.string.accessibility_shortcut_hardware_keyword);
list.add(hardwareTitle);
}
if (Flags.enableMagnificationMultipleFingerMultipleTapGesture()) {
if (hasShortcutType(shortcutTypes, UserShortcutType.TWOFINGER_DOUBLETAP)) {
final CharSequence twoFingerDoubleTapTitle = context.getString(
R.string.accessibility_shortcut_two_finger_double_tap_keyword, 2);
list.add(twoFingerDoubleTapTitle);
}
}
if (hasShortcutType(shortcutTypes, UserShortcutType.TRIPLETAP)) {
final CharSequence tripleTapTitle = context.getText(
R.string.accessibility_shortcut_triple_tap_keyword);
list.add(tripleTapTitle);
}
if (Flags.enableMagnificationMultipleFingerMultipleTapGesture()) {
if (hasShortcutType(shortcutTypes, UserShortcutType.TWOFINGER_DOUBLETAP)) {
final CharSequence twoFingerTripleTapTitle = context.getText(
R.string.accessibility_shortcut_two_finger_double_tap_keyword);
list.add(twoFingerTripleTapTitle);
}
}
// LINT.ThenChange(/res/xml/accessibility_edit_shortcuts.xml:shortcut_type_ui_order)
// Show software shortcut if first time to use.
if (list.isEmpty()) {