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

Commit 257b3d48 authored by Steve Kondik's avatar Steve Kondik
Browse files

systemui: Fix race condition in setting notification panel height

 * setExpandedHeightInternal has multiple entry points, including from
   an animator. A very subtle race condition exists which was causing
   the blur effect to flicker. So subtle in fact that a heisenbug was
   created when logging to debug the issue.
 * Make the damn thing synchronized so this can't happen for good.

Change-Id: I14a4cd3824a5665e4c7198fb7f61bf0ca9ab2b79
parent ba656ff8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -611,7 +611,7 @@ public abstract class PanelView extends FrameLayout {
        }
    }

    public void setExpandedHeightInternal(float h) {
    public synchronized void setExpandedHeightInternal(float h) {
        float fhWithoutOverExpansion = getMaxPanelHeight() - getOverExpansionAmount();
        if (mHeightAnimator == null) {
            float overExpansionPixels = Math.max(0, h - fhWithoutOverExpansion);