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

Commit 0de26b05 authored by Evan Laird's avatar Evan Laird
Browse files

Don't NPE in PanelView

AUPT seems to have found that this can happen sometimes;
PanelView#notifyBarPanelExpansionChanged() gets called before mBar is
set. So just don't call methods on it in that case

Fixes: 124002167
Test: atest SystemUITests
Change-Id: I137b416c3cfabd8f041c4867b4a4f25a483f00d4
parent ae3b4c44
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1172,9 +1172,11 @@ public abstract class PanelView extends FrameLayout {
    }

    protected void notifyBarPanelExpansionChanged() {
        if (mBar != null) {
            mBar.panelExpansionChanged(mExpandedFraction, mExpandedFraction > 0f
                || mPeekAnimator != null || mInstantExpanding || isPanelVisibleBecauseOfHeadsUp()
                || mTracking || mHeightAnimator != null);
                    || mPeekAnimator != null || mInstantExpanding
                    || isPanelVisibleBecauseOfHeadsUp() || mTracking || mHeightAnimator != null);
        }
        if (mExpansionListener != null) {
            mExpansionListener.accept(mExpandedFraction, mTracking);
        }