Merge "Do not filter MediaDreamComplication." into tm-qpr-dev
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user