From e86dacf6ea2543c0f19bfcb01dd05fe4a4c1a7d1 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Tue, 18 Jan 2022 10:26:15 -0500 Subject: [PATCH] Change window type of Media Projection dialog With the dialog changes of not closing QS, the dialog type needs to change to present on top of the shade. This CL changes it to match that of the dialog launched by CastTile. Fixes: 209532003 Test: manual (cherry picked from commit c5bd57337074eaccfda57a62612c77c26ed71e97) (cherry picked from commit 467b282eae1e6f25bbf3ecd6f0038d6ad69318ac) Merged-In: I937678a5d8ee91902c324aa063e48610de7b0f74 Change-Id: I937678a5d8ee91902c324aa063e48610de7b0f74 --- .../systemui/media/MediaProjectionPermissionActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java index 66c51d278dabf..e2716e992c48d 100644 --- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java +++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java @@ -159,7 +159,9 @@ public class MediaProjectionPermissionActivity extends Activity mDialog.getButton(DialogInterface.BUTTON_POSITIVE).setFilterTouchesWhenObscured(true); final Window w = mDialog.getWindow(); - w.setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); + // QS is not closed when pressing CastTile. Match the type of the dialog shown from the + // tile. + w.setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); w.addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS); mDialog.show();