From bf934d220197b3307ab6f20688e443448f6b2277 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Fri, 7 May 2021 08:24:01 -0400 Subject: [PATCH] Smartspace - Next alarm Support next alarm appearing next to DnD. If weather is showing, show inline, otherwise below the smartspace content. Next alarm will not fade out but DnD will. Fixes: 185678563 Test: atest KeyguardZenAlarmViewControllerTest Change-Id: I21e95470d0013bfb6900c1c228dda69f5707c9e6 --- .../systemui/plugins/BcSmartspaceDataPlugin.java | 11 ++++++++--- .../keyguard/KeyguardClockSwitchControllerTest.java | 6 ++++-- 2 files changed, 12 insertions(+), 5 deletions(-) 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 69ce2754ca43b..32def0309aaa1 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 @@ -20,7 +20,7 @@ import android.app.PendingIntent; import android.app.smartspace.SmartspaceAction; import android.app.smartspace.SmartspaceTarget; import android.content.Intent; -import android.graphics.drawable.Icon; +import android.graphics.drawable.Drawable; import android.os.Parcelable; import android.view.View; import android.view.ViewGroup; @@ -93,9 +93,14 @@ public interface BcSmartspaceDataPlugin extends Plugin { void setFalsingManager(com.android.systemui.plugins.FalsingManager falsingManager); /** - * Set or clear any Do Not Disturb information. + * Set or clear Do Not Disturb information. */ - void setDnd(@Nullable Icon dndIcon, @Nullable String description); + void setDnd(@Nullable Drawable image, @Nullable String description); + + /** + * Set or clear next alarm information + */ + void setNextAlarm(@Nullable Drawable image, @Nullable String description); } /** Interface for launching Intents, which can differ on the lockscreen */ diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java index 495489f1ab6ed..8c5f74dc7c93f 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java @@ -32,7 +32,7 @@ import android.app.smartspace.SmartspaceTarget; import android.content.Context; import android.content.pm.UserInfo; import android.content.res.Resources; -import android.graphics.drawable.Icon; +import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.UserHandle; import android.test.suitebuilder.annotation.SmallTest; @@ -394,6 +394,8 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase { public void setFalsingManager(FalsingManager falsingManager) { } - public void setDnd(@Nullable Icon dndIcon, @Nullable String description) { } + public void setDnd(@Nullable Drawable dndIcon, @Nullable String description) { } + + public void setNextAlarm(@Nullable Drawable dndIcon, @Nullable String description) { } } }