diff options
| author | 2024-10-07 14:52:59 +0000 | |
|---|---|---|
| committer | 2024-10-07 14:52:59 +0000 | |
| commit | 46227c3393723b65dd4811a75c4443321c6548db (patch) | |
| tree | 8bce15d09b4405ce1e751c17150229fa09d7572a | |
| parent | 55b183e7be555b191ebe600416d3cf6ef834d735 (diff) | |
| parent | 3d21f63dbb4b3da84b912f5782b2d8e6591ba4b2 (diff) | |
Merge changes Id046ca42,I2dc80993 into main
* changes:
[flexiglass] Verify flexi only NSSL methods are not called in legacy
[flexiglass] Remove ScrollViewFields#headsupHeightConsumer
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) |