commit | 1cebe69db13ce9a1f31e8d514f03e97858a0adcc | [log] [tgz] |
---|---|---|
author | Peter Kalauskas <peskal@google.com> | Tue Jun 14 00:26:13 2022 +0000 |
committer | Peter Kalauskas <peskal@google.com> | Tue Jun 14 17:03:07 2022 +0000 |
tree | d949195e4aa622d4717aaadcb61321e06a531c34 | |
parent | e41ec01aba6d1b433f3f096e84c7fdbe113f9ac0 [diff] |
Only notify listeners when actual height changes In ExpandableView, only update clipping and notify listeners when actual height changes. Test: atest com.android.systemui.statusbar.notification.row Bug: 231054525 Change-Id: I6a27411738281b3f8ae61f78a000c4bd8e03f3bb Merged-In: I6a27411738281b3f8ae61f78a000c4bd8e03f3bb (cherry picked from commit 6514025cecdb0e07cb92d1c4c5d8620ea15c13fc)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java index e042e9c..8f73b80 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java
@@ -186,10 +186,12 @@ * @param notifyListeners Whether the listener should be informed about the change. */ public void setActualHeight(int actualHeight, boolean notifyListeners) { - mActualHeight = actualHeight; - updateClipping(); - if (notifyListeners) { - notifyHeightChanged(false /* needsAnimation */); + if (mActualHeight != actualHeight) { + mActualHeight = actualHeight; + updateClipping(); + if (notifyListeners) { + notifyHeightChanged(false /* needsAnimation */); + } } }