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
This commit is contained in:
committed by
Yoshinori Hirano
parent
9465abf8af
commit
8dd4d35aa3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user