diff options
| author | 2021-01-28 17:43:09 -0500 | |
|---|---|---|
| committer | 2021-01-28 17:43:09 -0500 | |
| commit | 1cd139faec6828dff7abd27e88f2fdc86c9ed6a4 (patch) | |
| tree | 8b73a7ed94b3bb373bcdf2f9731e8baddbf6d407 | |
| parent | 8f046c76d7a93e8b343f65ccd480fb065e2e50e2 (diff) | |
Fix NPE in StatusBar
StatusBar was trying to call a method on the StatusBarView before
the view had been set. There was actually a null check in part of
the corrected method already. This extends the null check.
Fixes: 176216370
Test: manual
Change-Id: I7c576d1018f15557fd787dc74897ed6946b38076
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index d4a2b4157338..b20c45780183 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -2331,11 +2331,11 @@ public class StatusBar extends SystemUI implements DemoMode, && mStatusBarWindowState != state) { mStatusBarWindowState = state; if (DEBUG_WINDOW_STATE) Log.d(TAG, "Status bar " + windowStateToString(state)); - if (!showing && mState == StatusBarState.SHADE) { - mStatusBarView.collapsePanel(false /* animate */, false /* delayed */, - 1.0f /* speedUpFactor */); - } if (mStatusBarView != null) { + if (!showing && mState == StatusBarState.SHADE) { + mStatusBarView.collapsePanel(false /* animate */, false /* delayed */, + 1.0f /* speedUpFactor */); + } mStatusBarWindowHidden = state == WINDOW_STATE_HIDDEN; updateHideIconsForBouncer(false /* animate */); } |