summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java19
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt3
3 files changed, 14 insertions, 11 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index b466bf02387f..b171e8768d57 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -1160,11 +1160,13 @@ public class NotificationStackScrollLayout
@Override
public void addHeadsUpHeightChangedListener(@NonNull Runnable runnable) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mHeadsUpHeightChangedListeners.addIfAbsent(runnable);
}
@Override
public void removeHeadsUpHeightChangedListener(@NonNull Runnable runnable) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mHeadsUpHeightChangedListeners.remove(runnable);
}
@@ -1240,11 +1242,13 @@ public class NotificationStackScrollLayout
@Override
public void setScrolledToTop(boolean scrolledToTop) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mScrollViewFields.setScrolledToTop(scrolledToTop);
}
@Override
public void setStackTop(float stackTop) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
if (mAmbientState.getStackTop() != stackTop) {
mAmbientState.setStackTop(stackTop);
onTopPaddingChanged(/* animate = */ isAddOrRemoveAnimationPending());
@@ -1253,51 +1257,54 @@ public class NotificationStackScrollLayout
@Override
public void setStackCutoff(float stackCutoff) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mAmbientState.setStackCutoff(stackCutoff);
}
@Override
public void setHeadsUpTop(float headsUpTop) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mAmbientState.setHeadsUpTop(headsUpTop);
requestChildrenUpdate();
}
@Override
public void setHeadsUpBottom(float headsUpBottom) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mAmbientState.setHeadsUpBottom(headsUpBottom);
mStateAnimator.setHeadsUpAppearHeightBottom(Math.round(headsUpBottom));
}
@Override
public void closeGutsOnSceneTouch() {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mController.closeControlsDueToOutsideTouch();
}
@Override
public void setSyntheticScrollConsumer(@Nullable Consumer<Float> consumer) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mScrollViewFields.setSyntheticScrollConsumer(consumer);
}
@Override
public void setCurrentGestureOverscrollConsumer(@Nullable Consumer<Boolean> consumer) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mScrollViewFields.setCurrentGestureOverscrollConsumer(consumer);
}
@Override
public void setCurrentGestureInGutsConsumer(@Nullable Consumer<Boolean> consumer) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mScrollViewFields.setCurrentGestureInGutsConsumer(consumer);
}
@Override
public void setRemoteInputRowBottomBoundConsumer(@Nullable Consumer<Float> consumer) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
mScrollViewFields.setRemoteInputRowBottomBoundConsumer(consumer);
}
- @Override
- public void setHeadsUpHeightConsumer(@Nullable Consumer<Float> consumer) {
- mScrollViewFields.setHeadsUpHeightConsumer(consumer);
- }
-
/**
* @param listener to be notified after the location of Notification children might have
* changed.
@@ -2621,11 +2628,13 @@ public class NotificationStackScrollLayout
@Override
public int getTopHeadsUpHeight() {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return 0;
return getTopHeadsUpIntrinsicHeight();
}
@Override
public int getHeadsUpInset() {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return 0;
return mHeadsUpInset;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt
index c08ed6120832..f6e8b8f0166b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt
@@ -86,9 +86,6 @@ class ScrollViewFields {
fun sendRemoteInputRowBottomBound(bottomY: Float?) =
remoteInputRowBottomBoundConsumer?.accept(bottomY)
- /** send the [headsUpHeight] to the [headsUpHeightConsumer], if present. */
- fun sendHeadsUpHeight(headsUpHeight: Float) = headsUpHeightConsumer?.accept(headsUpHeight)
-
fun dump(pw: IndentingPrintWriter) {
pw.printSection("StackViewStates") {
pw.println("scrimClippingShape", scrimClippingShape)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt
index dbe81c10e2fd..6ad9f01ca4ff 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt
@@ -77,9 +77,6 @@ interface NotificationScrollView {
/** Set a consumer for current remote input notification row bottom bound events */
fun setRemoteInputRowBottomBoundConsumer(consumer: Consumer<Float?>?)
- /** Set a consumer for heads up height changed events */
- fun setHeadsUpHeightConsumer(consumer: Consumer<Float>?)
-
/** sets that scrolling is allowed */
fun setScrollingEnabled(enabled: Boolean)