From 55efb13603a8d144c9558a326b698b9713370725 Mon Sep 17 00:00:00 2001 From: Michael Mikhail Date: Mon, 5 Jun 2023 17:19:07 +0000 Subject: [PATCH] Reschedule timeout when accessibility event occurs Fix setting up the accessibility delegate of dialog view. We need to set the accessibility delegate of volume dialog whenever we assign a new value to volume dialog. So we need to call Accessibilty.init everytime we initialize the dialog. Fixes: 201730401 Test: atest VolumeDialogImplTest Test: Checked the timeout is rescheduled when there is an a11y event. Change-Id: Ia8c807b5831559505813f4b81610c8e05a1bb41f --- .../src/com/android/systemui/volume/VolumeDialogImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java index b848d2e84faf0..93622200ad46b 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java @@ -390,8 +390,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, public void init(int windowType, Callback callback) { initDialog(mActivityManager.getLockTaskModeState()); - mAccessibility.init(); - mController.addCallback(mControllerCallbackH, mHandler); mController.getState(); @@ -677,6 +675,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable, initRingerH(); initSettingsH(lockTaskModeState); initODICaptionsH(); + mAccessibility.init(); } private boolean isWindowGravityLeft() {