Merge "Don't NPE in PanelView"

This commit is contained in:
TreeHugger Robot
2019-03-02 01:10:51 +00:00
committed by Android (Google) Code Review

View File

@@ -1172,9 +1172,11 @@ public abstract class PanelView extends FrameLayout {
}
protected void notifyBarPanelExpansionChanged() {
mBar.panelExpansionChanged(mExpandedFraction, mExpandedFraction > 0f
|| mPeekAnimator != null || mInstantExpanding || isPanelVisibleBecauseOfHeadsUp()
|| mTracking || mHeightAnimator != null);
if (mBar != null) {
mBar.panelExpansionChanged(mExpandedFraction, mExpandedFraction > 0f
|| mPeekAnimator != null || mInstantExpanding
|| isPanelVisibleBecauseOfHeadsUp() || mTracking || mHeightAnimator != null);
}
if (mExpansionListener != null) {
mExpansionListener.accept(mExpandedFraction, mTracking);
}