diff options
| author | 2024-03-15 19:24:53 +0000 | |
|---|---|---|
| committer | 2024-03-15 19:24:53 +0000 | |
| commit | b39f70cee098695b9087ac45bdaa8baaa3a51bbf (patch) | |
| tree | 66ed3acc6d3b820dbaf72d487e5cae54d907713d | |
| parent | 9616f567cb2e9fedd0840cb9991cbe8f6ece965f (diff) | |
| parent | 4e7bb3a1bd821cd9a714309bb080aeaf67a1ae61 (diff) | |
Merge "Cleanup of a11yMenuHideBeforeTakingAction" into main
| -rw-r--r-- | packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/AccessibilityMenuService.java | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/AccessibilityMenuService.java b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/AccessibilityMenuService.java index 88181e7e2a52..4dd029c038bb 100644 --- a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/AccessibilityMenuService.java +++ b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/AccessibilityMenuService.java @@ -280,10 +280,8 @@ public class AccessibilityMenuService extends AccessibilityService return; } - if (Flags.a11yMenuHideBeforeTakingAction()) { - // Hide the a11y menu UI before performing the following shortcut actions. - mA11yMenuLayout.hideMenu(); - } + // Hide the a11y menu UI before performing the following shortcut actions. + mA11yMenuLayout.hideMenu(); if (viewTag == ShortcutId.ID_ASSISTANT_VALUE.ordinal()) { // Always restart the voice command activity, so that the UI is reloaded. @@ -299,31 +297,18 @@ public class AccessibilityMenuService extends AccessibilityService } else if (viewTag == ShortcutId.ID_RECENT_VALUE.ordinal()) { performGlobalActionInternal(GLOBAL_ACTION_RECENTS); } else if (viewTag == ShortcutId.ID_LOCKSCREEN_VALUE.ordinal()) { - if (Flags.a11yMenuHideBeforeTakingAction()) { - // Delay before locking the screen to give time for the UI to close. - mHandler.postDelayed( - () -> performGlobalActionInternal(GLOBAL_ACTION_LOCK_SCREEN), - HIDE_UI_DELAY_MS); - } else { - performGlobalActionInternal(GLOBAL_ACTION_LOCK_SCREEN); - } + // Delay before locking the screen to give time for the UI to close. + mHandler.postDelayed( + () -> performGlobalActionInternal(GLOBAL_ACTION_LOCK_SCREEN), + HIDE_UI_DELAY_MS); } else if (viewTag == ShortcutId.ID_QUICKSETTING_VALUE.ordinal()) { performGlobalActionInternal(GLOBAL_ACTION_QUICK_SETTINGS); } else if (viewTag == ShortcutId.ID_NOTIFICATION_VALUE.ordinal()) { performGlobalActionInternal(GLOBAL_ACTION_NOTIFICATIONS); } else if (viewTag == ShortcutId.ID_SCREENSHOT_VALUE.ordinal()) { - if (Flags.a11yMenuHideBeforeTakingAction()) { - // Delay before taking a screenshot to give time for the UI to close. - mHandler.postDelayed( - () -> performGlobalActionInternal(GLOBAL_ACTION_TAKE_SCREENSHOT), - HIDE_UI_DELAY_MS); - } else { - performGlobalActionInternal(GLOBAL_ACTION_TAKE_SCREENSHOT); - } - } - - if (!Flags.a11yMenuHideBeforeTakingAction()) { - mA11yMenuLayout.hideMenu(); + mHandler.postDelayed( + () -> performGlobalActionInternal(GLOBAL_ACTION_TAKE_SCREENSHOT), + HIDE_UI_DELAY_MS); } } |