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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user