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

Commit 99b98845 authored by Charles Chen's avatar Charles Chen
Browse files

Fix NPE when calling updateStateLw

In multi-display environment, the existance of status bar and navigation
bar may differ per disply. In other words, we may not have status bar or
navigation bar on a external displays. Add null check to prevent this
NPE happens.

Test: WmTests
Fixes: 120779126

Change-Id: I805a061733cdbe09c5c1941a0f44e2e49964671a
parent 919cad6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ public class BarController {
    }

    private boolean updateStateLw(final int state) {
        if (state != mState) {
        if (mWin != null && state != mState) {
            mState = state;
            if (DEBUG) Slog.d(mTag, "mState: " + StatusBarManager.windowStateToString(state));
            mHandler.post(new Runnable() {