From d4a44ff149bd74c7b4fe4532051fc531c2074f4e Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Tue, 21 Nov 2017 16:38:22 -0500 Subject: [PATCH] Use SystemUIDialog.setWindowOnTop to make user-switching dialogs not steal focus There is still the problem that the dialogs show up under QS, but this change stops the dialog from stealing focus and thus deadlocking the UI Test: Add new user. Remove guest user. Note that you can then collapse QS Bug: 69591927 Change-Id: I489a094848c32d58e2bed4769bb249fbbef91ab5 --- .../systemui/statusbar/policy/UserSwitcherController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java index 700c01a55ad66..0f498bcfbd58c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java @@ -910,6 +910,7 @@ public class UserSwitcherController { context.getString(android.R.string.cancel), this); setButton(DialogInterface.BUTTON_POSITIVE, context.getString(R.string.guest_exit_guest_dialog_remove), this); + SystemUIDialog.setWindowOnTop(this); setCanceledOnTouchOutside(false); mGuestId = guestId; mTargetId = targetId; @@ -937,6 +938,7 @@ public class UserSwitcherController { context.getString(android.R.string.cancel), this); setButton(DialogInterface.BUTTON_POSITIVE, context.getString(android.R.string.ok), this); + SystemUIDialog.setWindowOnTop(this); } @Override