OSDN Git Service

Use SystemUIDialog.setWindowOnTop to make user-switching dialogs not steal focus
authorEvan Laird <evanlaird@google.com>
Tue, 21 Nov 2017 21:38:22 +0000 (16:38 -0500)
committerEvan Laird <evanlaird@google.com>
Tue, 21 Nov 2017 21:48:41 +0000 (16:48 -0500)
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

packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java

index 700c01a..0f498bc 100644 (file)
@@ -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