diff --git a/systemUI/plugin/Android.bp b/systemUI/plugin/Android.bp index 2cd3346934..1061bc285a 100644 --- a/systemUI/plugin/Android.bp +++ b/systemUI/plugin/Android.bp @@ -57,6 +57,7 @@ java_library { "androidx.annotation_annotation", "androidx.compose.ui_ui", "androidx.compose.runtime_runtime", + "monet", ], } diff --git a/systemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java b/systemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java index d7b4cba101..0730bb908c 100644 --- a/systemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java +++ b/systemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java @@ -61,21 +61,17 @@ public interface BcSmartspaceDataPlugin extends Plugin { throw new UnsupportedOperationException("Not implemented by " + getClass()); } - /** Register a SmartspaceEventNotifier. */ - default void registerSmartspaceEventNotifier(SmartspaceEventNotifier notifier) { - throw new UnsupportedOperationException("Not implemented by " + getClass()); - } + /** Sets the event dispatcher for smart space targets. */ + void setEventDispatcher(SmartspaceEventDispatcher eventDispatcher); - /** Push a SmartspaceTargetEvent to the SmartspaceEventNotifier. */ - default void notifySmartspaceEvent(SmartspaceTargetEvent event) { - throw new UnsupportedOperationException("Not implemented by " + getClass()); - } + /** + * Overrides how Intents/PendingIntents gets launched. Mostly to support auth from + * the lockscreen. + */ + void setIntentStarter(IntentStarter intentStarter); - /** Allows for notifying the SmartspaceSession of SmartspaceTargetEvents. */ - interface SmartspaceEventNotifier { - /** Pushes a given SmartspaceTargetEvent to the SmartspaceSession. */ - void notifySmartspaceEvent(SmartspaceTargetEvent event); - } + /** Returns the smartspace event notifier */ + SmartspaceEventNotifier getEventNotifier(); /** * Create a view to be shown within the parent. Do not add the view, as the parent @@ -171,12 +167,6 @@ public interface BcSmartspaceDataPlugin extends Plugin { */ default void setKeyguardBypassEnabled(boolean enabled) {} - /** - * Overrides how Intents/PendingIntents gets launched. Mostly to support auth from - * the lockscreen. - */ - void setIntentStarter(IntentStarter intentStarter); - /** * When on the lockscreen, use the FalsingManager to help detect errant touches */ @@ -259,6 +249,19 @@ public interface BcSmartspaceDataPlugin extends Plugin { void startPendingIntent(View v, PendingIntent pi, boolean showOnLockscreen); } + /** SmartspaceEventDispatcher which also controls controlling intent launching behavior */ + interface SmartspaceEventNotifier extends SmartspaceEventDispatcher { + + /** The intent starter for controlling activity launches */ + @Nullable IntentStarter getIntentStarter(); + } + + /** Allows for notifying the SmartspaceSession of SmartspaceTargetEvents. */ + interface SmartspaceEventDispatcher { + /** Pushes a given SmartspaceTargetEvent to the SmartspaceSession. */ + void notifySmartspaceEvent(SmartspaceTargetEvent event); + } + /** Interface for delegating time updates */ interface TimeChangedDelegate { /** Register the callback to be called when time is updated **/ diff --git a/systemUI/plugin/src/com/android/systemui/plugins/ActivityStarter.java b/systemUI/plugin/src/com/android/systemui/plugins/ActivityStarter.java index 18891dba4b..fc56b35d72 100644 --- a/systemUI/plugin/src/com/android/systemui/plugins/ActivityStarter.java +++ b/systemUI/plugin/src/com/android/systemui/plugins/ActivityStarter.java @@ -177,6 +177,13 @@ public interface ActivityStarter { boolean dismissShade, @Nullable String customMessage); + /** Starts an activity and dismisses keyguard. */ + void startActivityDismissingKeyguard(Intent intent, + boolean onlyProvisioned, + boolean dismissShade, + @Nullable String customMessage, + Callback callback); + /** Starts an activity and dismisses keyguard. */ void startActivityDismissingKeyguard(Intent intent, boolean onlyProvisioned, diff --git a/systemUI/plugin/src/com/android/systemui/plugins/NavigationEdgeBackPlugin.java b/systemUI/plugin/src/com/android/systemui/plugins/NavigationEdgeBackPlugin.java index 5f6f11c16d..d0243cfd8b 100644 --- a/systemUI/plugin/src/com/android/systemui/plugins/NavigationEdgeBackPlugin.java +++ b/systemUI/plugin/src/com/android/systemui/plugins/NavigationEdgeBackPlugin.java @@ -36,9 +36,6 @@ public interface NavigationEdgeBackPlugin extends Plugin { /** Specifies if the UI should be rendered on the left side of the screen. */ void setIsLeftPanel(boolean isLeftPanel); - /** Sets the insets for the gesture handling area. */ - void setInsets(int leftInset, int rightInset); - /** Sets the display size. */ void setDisplaySize(Point displaySize); @@ -52,7 +49,7 @@ public interface NavigationEdgeBackPlugin extends Plugin { void onMotionEvent(MotionEvent motionEvent); /** Dumps info about the back gesture plugin. */ - void dump(PrintWriter pw); + void dump(String prefix, PrintWriter pw); /** Callback to let the system react to the detected back gestures. */ interface BackCallback { diff --git a/systemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java b/systemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java index c09509d869..898c949207 100644 --- a/systemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java +++ b/systemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java @@ -41,8 +41,8 @@ import com.android.systemui.plugins.annotations.ProvidesInterface; public interface VolumeDialogController { int VERSION = 1; - void setActiveStream(int stream); - void setStreamVolume(int stream, int userLevel); + void setActiveStream(int stream, boolean sync); + void setStreamVolume(int stream, int userLevel, boolean sync); void setRingerMode(int ringerModeNormal, boolean external); boolean hasVibrator(); diff --git a/systemUI/plugin/src/com/android/systemui/plugins/qs/QS.java b/systemUI/plugin/src/com/android/systemui/plugins/qs/QS.java index d3218ad8c9..a0918ec707 100644 --- a/systemUI/plugin/src/com/android/systemui/plugins/qs/QS.java +++ b/systemUI/plugin/src/com/android/systemui/plugins/qs/QS.java @@ -203,6 +203,12 @@ public interface QS extends FragmentBase { */ void setIsNotificationPanelFullWidth(boolean isFullWidth); + default void setPanelExpanded(boolean panelExpanded) {} + + default void setQqsHeightListener(QqsHeightListener listener) {} + + default void setQSContentPaddingBottom(int padding) {} + /** * Callback for when QSPanel container is scrolled */ @@ -218,4 +224,10 @@ public interface QS extends FragmentBase { void onQsHeightChanged(); } + @ProvidesInterface(version = HeightListener.VERSION) + interface QqsHeightListener { + int VERSION = 1; + void onQqsHeightChanged(); + } + } diff --git a/systemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationMenuRowPlugin.java b/systemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationMenuRowPlugin.java index 9b961d2535..0b5d3ba774 100644 --- a/systemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationMenuRowPlugin.java +++ b/systemUI/plugin/src/com/android/systemui/plugins/statusbar/NotificationMenuRowPlugin.java @@ -17,7 +17,6 @@ package com.android.systemui.plugins.statusbar; import android.annotation.Nullable; import android.content.Context; import android.graphics.Point; -import android.service.notification.StatusBarNotification; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; @@ -59,9 +58,22 @@ public interface NotificationMenuRowPlugin extends Plugin { public View getMenuView(); - public View getGutsView(); + /** + * The guts content that provides the [View] to be displayed. + * + * @return Object of type [NotificationGuts.GutsContent]. The interface is not known in this + * module, therefore only the implementation returns the proper type. + */ + Object getGutsContent(); public String getContentDescription(); + + /** + * Set the name of the app for this menuitem. + * + * @param appName App name. + */ + void setAppName(String appName); } /**