Loading packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -158,7 +158,7 @@ public class GuestResumeSessionReceiver extends BroadcastReceiver { UserSwitcherController userSwitcherController, UserSwitcherController userSwitcherController, UiEventLogger uiEventLogger, UiEventLogger uiEventLogger, @Assisted int userId) { @Assisted int userId) { super(context, false /* dismissOnDeviceLock */); super(context, DEFAULT_THEME, false /* dismissOnDeviceLock */); setTitle(context.getString(R.string.guest_wipe_session_title)); setTitle(context.getString(R.string.guest_wipe_session_title)); setMessage(context.getString(R.string.guest_wipe_session_message)); setMessage(context.getString(R.string.guest_wipe_session_message)); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java +2 −5 Original line number Original line Diff line number Diff line Loading @@ -61,10 +61,10 @@ import java.util.List; * and dismisses itself when it receives the broadcast. * and dismisses itself when it receives the broadcast. */ */ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigChangedCallback { 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. // TODO(b/203389579): Remove this once the dialog width on large screens has been agreed on. private static final String FLAG_TABLET_DIALOG_WIDTH = private static final String FLAG_TABLET_DIALOG_WIDTH = "persist.systemui.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 static final boolean DEFAULT_DISMISS_ON_DEVICE_LOCK = true; private final Context mContext; private final Context mContext; Loading @@ -88,10 +88,6 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh this(context, theme, DEFAULT_DISMISS_ON_DEVICE_LOCK); 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) { public SystemUIDialog(Context context, int theme, boolean dismissOnDeviceLock) { super(context, theme); super(context, theme); mContext = context; mContext = context; Loading Loading @@ -436,4 +432,5 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh mDialog.dismiss(); mDialog.dismiss(); } } } } } } packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/SystemUIDialogTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -76,7 +76,7 @@ public class SystemUIDialogTest extends SysuiTestCase { @Test @Test public void testNoRegisterReceiver() { public void testNoRegisterReceiver() { final SystemUIDialog dialog = new SystemUIDialog(mContext, false); final SystemUIDialog dialog = new SystemUIDialog(mContext, 0, false); dialog.show(); dialog.show(); verify(mBroadcastDispatcher, never()).registerReceiver(any(), any(), eq(null), any()); verify(mBroadcastDispatcher, never()).registerReceiver(any(), any(), eq(null), any()); Loading Loading
packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -158,7 +158,7 @@ public class GuestResumeSessionReceiver extends BroadcastReceiver { UserSwitcherController userSwitcherController, UserSwitcherController userSwitcherController, UiEventLogger uiEventLogger, UiEventLogger uiEventLogger, @Assisted int userId) { @Assisted int userId) { super(context, false /* dismissOnDeviceLock */); super(context, DEFAULT_THEME, false /* dismissOnDeviceLock */); setTitle(context.getString(R.string.guest_wipe_session_title)); setTitle(context.getString(R.string.guest_wipe_session_title)); setMessage(context.getString(R.string.guest_wipe_session_message)); setMessage(context.getString(R.string.guest_wipe_session_message)); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java +2 −5 Original line number Original line Diff line number Diff line Loading @@ -61,10 +61,10 @@ import java.util.List; * and dismisses itself when it receives the broadcast. * and dismisses itself when it receives the broadcast. */ */ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigChangedCallback { 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. // TODO(b/203389579): Remove this once the dialog width on large screens has been agreed on. private static final String FLAG_TABLET_DIALOG_WIDTH = private static final String FLAG_TABLET_DIALOG_WIDTH = "persist.systemui.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 static final boolean DEFAULT_DISMISS_ON_DEVICE_LOCK = true; private final Context mContext; private final Context mContext; Loading @@ -88,10 +88,6 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh this(context, theme, DEFAULT_DISMISS_ON_DEVICE_LOCK); 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) { public SystemUIDialog(Context context, int theme, boolean dismissOnDeviceLock) { super(context, theme); super(context, theme); mContext = context; mContext = context; Loading Loading @@ -436,4 +432,5 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh mDialog.dismiss(); mDialog.dismiss(); } } } } } }
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/SystemUIDialogTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -76,7 +76,7 @@ public class SystemUIDialogTest extends SysuiTestCase { @Test @Test public void testNoRegisterReceiver() { public void testNoRegisterReceiver() { final SystemUIDialog dialog = new SystemUIDialog(mContext, false); final SystemUIDialog dialog = new SystemUIDialog(mContext, 0, false); dialog.show(); dialog.show(); verify(mBroadcastDispatcher, never()).registerReceiver(any(), any(), eq(null), any()); verify(mBroadcastDispatcher, never()).registerReceiver(any(), any(), eq(null), any()); Loading