summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetector.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt10
2 files changed, 10 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetector.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetector.kt
index b72801d3b5fe..8edccf166efe 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetector.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetector.kt
@@ -21,7 +21,7 @@ constructor(
fun enable(onPanelInteraction: Runnable) {
if (action == null) {
action = Action(onPanelInteraction)
- shadeExpansionStateManager.addExpansionListener(this::onPanelExpansionChanged)
+ shadeExpansionStateManager.addShadeExpansionListener(this::onPanelExpansionChanged)
} else {
Log.e(TAG, "Already enabled")
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt
index 20313c3df465..a048f543d476 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt
@@ -54,12 +54,20 @@ class ShadeExpansionStateManager @Inject constructor() : ShadeStateEvents {
* Listener will also be immediately notified with the current values.
*/
fun addExpansionListener(listener: ShadeExpansionListener) {
- expansionListeners.add(listener)
+ addShadeExpansionListener(listener)
listener.onPanelExpansionChanged(
ShadeExpansionChangeEvent(fraction, expanded, tracking, dragDownPxAmount)
)
}
+ /**
+ * Adds a listener that will be notified when the panel expansion fraction has changed.
+ * @see #addExpansionListener
+ */
+ fun addShadeExpansionListener(listener: ShadeExpansionListener) {
+ expansionListeners.add(listener)
+ }
+
/** Removes an expansion listener. */
fun removeExpansionListener(listener: ShadeExpansionListener) {
expansionListeners.remove(listener)