Merge "Revert "Change default showClockAndComplications to false."" into tm-dev

This commit is contained in:
Bryce Lee
2022-03-04 15:28:25 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 6 deletions

View File

@@ -231,7 +231,7 @@ public class DreamService extends Service implements Window.Callback {
* The default value for whether to show complications on the overlay. * The default value for whether to show complications on the overlay.
* @hide * @hide
*/ */
public static final boolean DEFAULT_SHOW_COMPLICATIONS = false; public static final boolean DEFAULT_SHOW_COMPLICATIONS = true;
private final IDreamManager mDreamManager; private final IDreamManager mDreamManager;
private final Handler mHandler = new Handler(Looper.getMainLooper()); private final Handler mHandler = new Handler(Looper.getMainLooper());

View File

@@ -173,19 +173,19 @@ public class DreamOverlayServiceTest extends SysuiTestCase {
} }
@Test @Test
public void testShouldShowComplicationsFalseByDefault() { public void testShouldShowComplicationsTrueByDefault() {
mService.onBind(new Intent()); mService.onBind(new Intent());
assertThat(mService.shouldShowComplications()).isFalse(); assertThat(mService.shouldShowComplications()).isTrue();
} }
@Test @Test
public void testShouldShowComplicationsSetByIntentExtra() { public void testShouldShowComplicationsSetByIntentExtra() {
final Intent intent = new Intent(); final Intent intent = new Intent();
intent.putExtra(DreamService.EXTRA_SHOW_COMPLICATIONS, true); intent.putExtra(DreamService.EXTRA_SHOW_COMPLICATIONS, false);
mService.onBind(intent); mService.onBind(intent);
assertThat(mService.shouldShowComplications()).isTrue(); assertThat(mService.shouldShowComplications()).isFalse();
} }
@Test @Test

View File

@@ -158,7 +158,6 @@ public class DreamOverlayStateControllerTest extends SysuiTestCase {
public void testComplicationFilteringWhenShouldShowComplications() { public void testComplicationFilteringWhenShouldShowComplications() {
final DreamOverlayStateController stateController = final DreamOverlayStateController stateController =
new DreamOverlayStateController(mExecutor); new DreamOverlayStateController(mExecutor);
stateController.setShouldShowComplications(true);
final Complication alwaysAvailableComplication = Mockito.mock(Complication.class); final Complication alwaysAvailableComplication = Mockito.mock(Complication.class);
final Complication weatherComplication = Mockito.mock(Complication.class); final Complication weatherComplication = Mockito.mock(Complication.class);