Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1406eb5 authored by Anna Bauza's avatar Anna Bauza Committed by Android (Google) Code Review
Browse files

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

parents c9946781 c9942aa6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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));
+2 −5
Original line number Original line Diff line number Diff line
@@ -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;
@@ -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;
@@ -436,4 +432,5 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
            mDialog.dismiss();
            mDialog.dismiss();
        }
        }
    }
    }

}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -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());