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
This commit is contained in:
Evan Laird
2017-11-21 16:38:22 -05:00
parent 8afa38b8b9
commit d4a44ff149

View 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