a11y volume slider focus

With TalkBack on, the accessibility slider used to quickly drop
focus. Both on tap and on touch-and-explore.

Bug: b/285018188, b/201382499

Test: Manual. Turn on TalkBack. Press a physical volume button. Touch-and-explore to accessibility slider. The green rectangle signifying focus should stay on the slider.

Test: Manual. After step 2 above, touch-and-explore to background app,
should be able to interact with the background without Volume Dialog
taking over focus. Eventually (<= 16000ms) the dialog should dismiss.

Test: atest VolumeDialogImplTest

Change-Id: I2f5190a99a1b84ca4461b32ad1ba0d07460c9649
This commit is contained in:
Behnam Heydarshahi
2023-06-07 18:15:11 +00:00
parent 7ba24097ed
commit 61131c1052

View File

@@ -478,8 +478,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
mWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
mWindow.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND
| WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
mWindow.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
mWindow.addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
| WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);