Do not filter MediaDreamComplication.

This changelist removes the type filter for MediaDreamComplication,
allowing it to show over any dream.

Test: atest DreamOverlayStateControllerTest#testComplicationWithNoTypeNotFiltered
Fixes: 236080038
Change-Id: Idbfbd59b1277705a1e67aeff900d860681ca53cb
This commit is contained in:
Bryce Lee
2022-06-22 16:08:05 -07:00
parent bbb13e732f
commit f303903a45
2 changed files with 11 additions and 5 deletions

View File

@@ -36,11 +36,6 @@ public class MediaDreamComplication implements Complication {
mComponentFactory = componentFactory;
}
@Override
public int getRequiredTypeAvailability() {
return COMPLICATION_TYPE_CAST_INFO;
}
@Override
public ViewHolder createView(ComplicationViewModel model) {
return mComponentFactory.create().getViewHolder();

View File

@@ -207,4 +207,15 @@ public class DreamOverlayStateControllerTest extends SysuiTestCase {
assertThat(complications.contains(weatherComplication)).isFalse();
}
}
@Test
public void testComplicationWithNoTypeNotFiltered() {
final Complication complication = Mockito.mock(Complication.class);
final DreamOverlayStateController stateController =
new DreamOverlayStateController(mExecutor);
stateController.addComplication(complication);
mExecutor.runAllReady();
assertThat(stateController.getComplications(true).contains(complication))
.isTrue();
}
}