Remove mentions of "gesture" on the Accessibility Button settings page

Configures page to hide/replace elements that would mention gesture.
Also, provides context when necessary if a setting is disabled by the current button mode.

Demonstration video:
https://x20web.corp.google.com/users/jo/jonesriley/splitShortcut/a11yShortcutSettingsCleanup.mp4

Test: manual, navigate to the Accessibility Button "more options" page in gesture navigation mode. Verify there are no references to gesture.
Bug: 349178639
Flag: android.provider.a11y_standalone_gesture_enabled
Change-Id: I067738d23e74c00bab4010d187820d09013809ad
This commit is contained in:
Riley Jones
2024-09-06 18:19:10 +00:00
parent c43be041f5
commit 28e10455a1
5 changed files with 45 additions and 4 deletions

View File

@@ -50,8 +50,12 @@ public class AccessibilityButtonGesturePreferenceController extends BasePreferen
@Override
public int getAvailabilityStatus() {
return AccessibilityUtil.isGestureNavigateEnabled(mContext)
? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
if (android.provider.Flags.a11yStandaloneGestureEnabled()) {
return CONDITIONALLY_UNAVAILABLE;
} else {
return AccessibilityUtil.isGestureNavigateEnabled(mContext)
? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
}
}
@Override