From 44ad78711fb70c83848a95cc988a8d59093e5732 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Fri, 21 May 2021 08:05:54 -0400 Subject: [PATCH] AOD Media Add media back into smartspace content when the new plugin is enabled. Only show media on AOD when no other content is displayed, other than the default weather/date card. Fixes: 185373132 Test: atest KeyguardMediaViewControllerTest Change-Id: I9a1ff4eaeb4e13ed30c7796c1e9d2d5d46916737 --- .../com/android/systemui/plugins/BcSmartspaceDataPlugin.java | 5 +++++ .../lockscreen/LockscreenSmartspaceControllerTest.kt | 3 +++ 2 files changed, 8 insertions(+) diff --git a/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java b/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java index b3c437480af7f..989010e8730c0 100644 --- a/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java +++ b/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java @@ -114,6 +114,11 @@ public interface BcSmartspaceDataPlugin extends Plugin { * Set or clear next alarm information */ void setNextAlarm(@Nullable Drawable image, @Nullable String description); + + /** + * Set or clear device media playing + */ + void setMediaTarget(@Nullable SmartspaceTarget target); } /** Interface for launching Intents, which can differ on the lockscreen */ diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt index 9b5c33d64eb95..116f807a888d3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt @@ -511,6 +511,9 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { override fun setNextAlarm(image: Drawable?, description: String?) { } + + override fun setMediaTarget(target: SmartspaceTarget?) { + } }) }