summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Kozynski <kozynski@google.com>2022-01-18 10:26:15 -0500
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-01-20 00:46:29 +0000
commit467b282eae1e6f25bbf3ecd6f0038d6ad69318ac (patch)
tree925c54d26733811abd016aabbeee26d586f165dd
parentc3eaf662257919343210b96f5d5aef161df0723e (diff)
downloadbase-467b282eae1e6f25bbf3ecd6f0038d6ad69318ac.tar.gz
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 Change-Id: I937678a5d8ee91902c324aa063e48610de7b0f74 (cherry picked from commit c5bd57337074eaccfda57a62612c77c26ed71e97) Merged-In:I937678a5d8ee91902c324aa063e48610de7b0f74
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java
index 66c51d278dab..e2716e992c48 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();