From 1cb81f64393c494af7923bfea8f6df2fa6aa112c Mon Sep 17 00:00:00 2001 From: Alejandro Nijamkin Date: Thu, 22 Sep 2022 15:22:26 -0700 Subject: [PATCH] Dismiss action menu when item is clicked. There is a bug in the full-screen user switcher UI. The action menu (accessible from the "Add" button) does not dismiss itself when one of its items is clicked. This issue is only present in the new implementation and no in the old implementation. This CL fixes that for the new implementation. Bug: 243844359 Test: Manually verified that the dialog is now dismissed when one of its items is clicked. Change-Id: I051dad133d94d454836f7c6868d57b7085ee1412 --- .../android/systemui/user/ui/binder/UserSwitcherViewBinder.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/user/ui/binder/UserSwitcherViewBinder.kt b/packages/SystemUI/src/com/android/systemui/user/ui/binder/UserSwitcherViewBinder.kt index d7ad3cefaf069..938417f9dbe39 100644 --- a/packages/SystemUI/src/com/android/systemui/user/ui/binder/UserSwitcherViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/user/ui/binder/UserSwitcherViewBinder.kt @@ -174,6 +174,7 @@ object UserSwitcherViewBinder { setOnItemClickListener { _, _, position, _ -> val itemPositionExcludingHeader = position - 1 adapter.getItem(itemPositionExcludingHeader).onClicked() + dismiss() } show()