diff --git a/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java b/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java index 76a7cad154195..9a8d53228e3fd 100644 --- a/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java +++ b/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java @@ -158,7 +158,7 @@ public class GuestResumeSessionReceiver extends BroadcastReceiver { UserSwitcherController userSwitcherController, UiEventLogger uiEventLogger, @Assisted int userId) { - super(context, false /* dismissOnDeviceLock */); + super(context, DEFAULT_THEME, false /* dismissOnDeviceLock */); setTitle(context.getString(R.string.guest_wipe_session_title)); setMessage(context.getString(R.string.guest_wipe_session_message)); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java index 36a045637a87f..6e331bc132942 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java @@ -61,10 +61,10 @@ import java.util.List; * and dismisses itself when it receives the broadcast. */ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigChangedCallback { + protected static final int DEFAULT_THEME = R.style.Theme_SystemUI_Dialog; // TODO(b/203389579): Remove this once the dialog width on large screens has been agreed on. private static final String FLAG_TABLET_DIALOG_WIDTH = "persist.systemui.flag_tablet_dialog_width"; - private static final int DEFAULT_THEME = R.style.Theme_SystemUI_Dialog; private static final boolean DEFAULT_DISMISS_ON_DEVICE_LOCK = true; private final Context mContext; @@ -88,10 +88,6 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh this(context, theme, DEFAULT_DISMISS_ON_DEVICE_LOCK); } - public SystemUIDialog(Context context, boolean dismissOnDeviceLock) { - this(context, DEFAULT_THEME, dismissOnDeviceLock); - } - public SystemUIDialog(Context context, int theme, boolean dismissOnDeviceLock) { super(context, theme); mContext = context; @@ -436,4 +432,5 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh mDialog.dismiss(); } } + } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/SystemUIDialogTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/SystemUIDialogTest.java index 6c83e9f88d63c..4506e4142784c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/SystemUIDialogTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/SystemUIDialogTest.java @@ -76,7 +76,7 @@ public class SystemUIDialogTest extends SysuiTestCase { @Test public void testNoRegisterReceiver() { - final SystemUIDialog dialog = new SystemUIDialog(mContext, false); + final SystemUIDialog dialog = new SystemUIDialog(mContext, 0, false); dialog.show(); verify(mBroadcastDispatcher, never()).registerReceiver(any(), any(), eq(null), any());