diff options
| author | 2022-06-23 15:51:43 +0000 | |
|---|---|---|
| committer | 2022-06-23 15:51:43 +0000 | |
| commit | debc6589a3b96a971491251e730ec17747c5ee1b (patch) | |
| tree | e0686628966b5d74c003b9c8f639ba0d6a22cf0e | |
| parent | cbc645383f3a549e76000354250cc1a0c2ef4e5f (diff) | |
| parent | 22a220c664b3c3b159106db23f3825e1a19826a3 (diff) | |
Merge "Do not filter MediaDreamComplication." into tm-qpr-dev am: 38df5710bc am: 22a220c664
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19040232
Change-Id: I7d042082ecc373e63524580f0718d04b15f35902
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/media/dream/MediaDreamComplication.java | 5 | ||||
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/dreams/DreamOverlayStateControllerTest.java | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/media/dream/MediaDreamComplication.java b/packages/SystemUI/src/com/android/systemui/media/dream/MediaDreamComplication.java index 7c0481049098..2c35db337cda 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dream/MediaDreamComplication.java +++ b/packages/SystemUI/src/com/android/systemui/media/dream/MediaDreamComplication.java @@ -37,11 +37,6 @@ public class MediaDreamComplication implements Complication { } @Override - public int getRequiredTypeAvailability() { - return COMPLICATION_TYPE_CAST_INFO; - } - - @Override public ViewHolder createView(ComplicationViewModel model) { return mComponentFactory.create().getViewHolder(); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/dreams/DreamOverlayStateControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/dreams/DreamOverlayStateControllerTest.java index fb64c7b58aac..2adf2857a385 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/dreams/DreamOverlayStateControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/dreams/DreamOverlayStateControllerTest.java @@ -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(); + } } |