diff options
| author | 2025-01-08 14:22:04 +0000 | |
|---|---|---|
| committer | 2025-01-10 13:25:49 +0000 | |
| commit | 750aed45e46c300024d439bab9ce5e80a3c959eb (patch) | |
| tree | fe34441a168ff328c7fdf16d6b67c840b941942b | |
| parent | f1610effbc9c77d602e63567a49146a8f291623e (diff) | |
[flexiglass] Only update the NSSL's HUN bounds when they're changing
Only make a requesctChildrenUpdate() upon headsUpTop changes, if we
receibe a new value.
Bug: 387961133
Test: drag HUNs, see if they're still updated smoothly
Flag: com.android.systemui.scene_container
Change-Id: I450b06746bd1e1deacd721f600561ab3ad84c601
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java | 12 |
1 files changed, 8 insertions, 4 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 76591ac4e453..7b55e83a0a99 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 @@ -1245,15 +1245,19 @@ public class NotificationStackScrollLayout @Override public void setHeadsUpTop(float headsUpTop) { if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return; - mAmbientState.setHeadsUpTop(headsUpTop); - requestChildrenUpdate(); + if (mAmbientState.getHeadsUpTop() != headsUpTop) { + mAmbientState.setHeadsUpTop(headsUpTop); + requestChildrenUpdate(); + } } @Override public void setHeadsUpBottom(float headsUpBottom) { if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return; - mAmbientState.setHeadsUpBottom(headsUpBottom); - mStateAnimator.setHeadsUpAppearHeightBottom(Math.round(headsUpBottom)); + if (mAmbientState.getHeadsUpBottom() != headsUpBottom) { + mAmbientState.setHeadsUpBottom(headsUpBottom); + mStateAnimator.setHeadsUpAppearHeightBottom(Math.round(headsUpBottom)); + } } @Override |