Fix java standards - introduced in CL: ag/17182687
Java constructors should not mix parameter orders. This has been introduced in CL: ag/17182687 Do: void myFunction(Foo param1); void myFunction(Foo param1, Bar param2); void myFunction(Foo param1, Bar param2, Doe param3); Don't mix parameters: void myFunction(Foo param1); void myFunction(Foo param1, Bar param2); void myFunction(Foo param1, Doe param3); Bug: 199768843 Test: atest SystemUIDialogTest Change-Id: Id8ac603717d30a61c14aeb5a6365a581d97feb0c
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user