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

Commit f57924ea authored by Darrell Shi's avatar Darrell Shi Committed by Automerger Merge Worker
Browse files

Merge "Change default showClockAndComplications to false." into tm-dev am: 485e5e22

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17127504

Change-Id: I566cd48197d0bd16ebe828e54c84cb3db7238d92
parents 6c1a2051 485e5e22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ public class DreamService extends Service implements Window.Callback {
     * The default value for whether to show complications on the overlay.
     * @hide
     */
    public static final boolean DEFAULT_SHOW_COMPLICATIONS = true;
    public static final boolean DEFAULT_SHOW_COMPLICATIONS = false;

    private final IDreamManager mDreamManager;
    private final Handler mHandler = new Handler(Looper.getMainLooper());
+4 −4
Original line number Diff line number Diff line
@@ -174,19 +174,19 @@ public class DreamOverlayServiceTest extends SysuiTestCase {
    }

    @Test
    public void testShouldShowComplicationsTrueByDefault() {
    public void testShouldShowComplicationsFalseByDefault() {
        mService.onBind(new Intent());

        assertThat(mService.shouldShowComplications()).isTrue();
        assertThat(mService.shouldShowComplications()).isFalse();
    }

    @Test
    public void testShouldShowComplicationsSetByIntentExtra() {
        final Intent intent = new Intent();
        intent.putExtra(DreamService.EXTRA_SHOW_COMPLICATIONS, false);
        intent.putExtra(DreamService.EXTRA_SHOW_COMPLICATIONS, true);
        mService.onBind(intent);

        assertThat(mService.shouldShowComplications()).isFalse();
        assertThat(mService.shouldShowComplications()).isTrue();
    }

    @Test
+1 −0
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ public class DreamOverlayStateControllerTest extends SysuiTestCase {
    public void testComplicationFilteringWhenShouldShowComplications() {
        final DreamOverlayStateController stateController =
                new DreamOverlayStateController(mExecutor);
        stateController.setShouldShowComplications(true);

        final Complication alwaysAvailableComplication = Mockito.mock(Complication.class);
        final Complication weatherComplication = Mockito.mock(Complication.class);