Loading packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -307,7 +307,7 @@ public class MediaProjectionPermissionActivity extends Activity { private void setUpDialog(AlertDialog dialog) { SystemUIDialog.registerDismissListener(dialog); SystemUIDialog.applyFlags(dialog); SystemUIDialog.applyFlags(dialog, /* showWhenLocked= */ false); SystemUIDialog.setDialogSize(dialog); dialog.setOnCancelListener(this::onDialogDismissedOrCancelled); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java +8 −2 Original line number Diff line number Diff line Loading @@ -480,10 +480,16 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh } public static AlertDialog applyFlags(AlertDialog dialog) { return applyFlags(dialog, true); } public static AlertDialog applyFlags(AlertDialog dialog, boolean showWhenLocked) { final Window window = dialog.getWindow(); window.setType(WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL); window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); if (showWhenLocked) { window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); } window.getAttributes().setFitInsetsTypes( window.getAttributes().getFitInsetsTypes() & ~Type.statusBars()); return dialog; Loading Loading
packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -307,7 +307,7 @@ public class MediaProjectionPermissionActivity extends Activity { private void setUpDialog(AlertDialog dialog) { SystemUIDialog.registerDismissListener(dialog); SystemUIDialog.applyFlags(dialog); SystemUIDialog.applyFlags(dialog, /* showWhenLocked= */ false); SystemUIDialog.setDialogSize(dialog); dialog.setOnCancelListener(this::onDialogDismissedOrCancelled); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java +8 −2 Original line number Diff line number Diff line Loading @@ -480,10 +480,16 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh } public static AlertDialog applyFlags(AlertDialog dialog) { return applyFlags(dialog, true); } public static AlertDialog applyFlags(AlertDialog dialog, boolean showWhenLocked) { final Window window = dialog.getWindow(); window.setType(WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL); window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); if (showWhenLocked) { window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); } window.getAttributes().setFitInsetsTypes( window.getAttributes().getFitInsetsTypes() & ~Type.statusBars()); return dialog; Loading