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

@@ -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()) {