Merge "Fix java standards - introduced in CL: ag/17182687"

This commit is contained in:
Anna Bauza
2022-06-01 16:48:33 +00:00
committed by Android (Google) Code Review
3 changed files with 4 additions and 7 deletions

View File

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

View File

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

View File

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