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
This commit is contained in:
Fabian Kozynski
2022-01-18 10:26:15 -05:00
parent 99f9addc90
commit c5bd573370

View File

@@ -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();