Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1cebe69d authored by Peter Kalauskas's avatar Peter Kalauskas
Browse files

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 6514025c)
parent e41ec01a
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -186,12 +186,14 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable {
     * @param notifyListeners Whether the listener should be informed about the change.
     */
    public void setActualHeight(int actualHeight, boolean notifyListeners) {
        if (mActualHeight != actualHeight) {
            mActualHeight = actualHeight;
            updateClipping();
            if (notifyListeners) {
                notifyHeightChanged(false  /* needsAnimation */);
            }
        }
    }

    public void setActualHeight(int actualHeight) {
        setActualHeight(actualHeight, true /* notifyListeners */);