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

Commit f303903a authored by Bryce Lee's avatar Bryce Lee
Browse files

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
parent bbb13e73
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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();
+11 −0
Original line number Diff line number Diff line
@@ -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();
    }
}