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

Commit 8dd4d35a authored by Kensuke Matsui's avatar Kensuke Matsui Committed by Yoshinori Hirano
Browse files

Fix NPE in StatusBar#onBackPressed()

StatusBar.mKeyguardUserSwitcher is instantiated
only if multi user function is enabled.
But mKeyguardUserSwitcher.hideIfNotSimple() is invoked
without null check in StatusBar#onBackPressed().
This causes NPE on multi user disabled devices.

Fixes: 65391930
Test: manual - tap Back key on lockscreen

Change-Id: I528823fa832ee5096d73dea660997fc276d86c5c
parent 9465abf8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4486,7 +4486,7 @@ public class StatusBar extends SystemUI implements DemoMode,
            animateCollapsePanels();
            return true;
        }
        if (mKeyguardUserSwitcher.hideIfNotSimple(true)) {
        if (mKeyguardUserSwitcher != null && mKeyguardUserSwitcher.hideIfNotSimple(true)) {
            return true;
        }
        return false;