Fix should not let users adjust a11y button settings in SuW issue

Root Cause: Users should not be able to adjust any settings of the a11y
button in the setup wizard flow, but there will be a link button to
a11y button settings page on the a11y tutorial dialog where user can
modify the settings.

Solution: Hide the link button in a11y tutorial dialog if we know the
dialog is launched from any setup wizard page.

Bug: 256084341
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityGestureNavigationTutorialTest
Change-Id: I742f9b7ba311fcd7a5105463709dc104345b9f12
This commit is contained in:
Angela Wang
2022-10-28 09:16:25 +00:00
parent 812c7d7953
commit c4f3295491
4 changed files with 67 additions and 8 deletions

View File

@@ -208,9 +208,17 @@ public abstract class AccessibilityShortcutPreferenceFragment extends DashboardF
setupEditShortcutDialog(dialog);
return dialog;
case DialogEnums.LAUNCH_ACCESSIBILITY_TUTORIAL:
dialog = AccessibilityGestureNavigationTutorial
.createAccessibilityTutorialDialog(getPrefContext(),
getUserShortcutTypes(), this::callOnTutorialDialogButtonClicked);
if (WizardManagerHelper.isAnySetupWizard(getIntent())) {
dialog = AccessibilityGestureNavigationTutorial
.createAccessibilityTutorialDialogForSetupWizard(
getPrefContext(), getUserShortcutTypes(),
this::callOnTutorialDialogButtonClicked);
} else {
dialog = AccessibilityGestureNavigationTutorial
.createAccessibilityTutorialDialog(
getPrefContext(), getUserShortcutTypes(),
this::callOnTutorialDialogButtonClicked);
}
dialog.setCanceledOnTouchOutside(false);
return dialog;
default: