diff options
| author | 2017-07-21 17:35:10 +0900 | |
|---|---|---|
| committer | 2017-09-06 06:29:11 +0000 | |
| commit | 8dd4d35aa33652adda822919de369fbd7efbeed6 (patch) | |
| tree | 5ac7fba94527c832559321e795e4bafd95749952 | |
| parent | 9465abf8af7c35fad0d7d48fa2d6bee01a910fe5 (diff) | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | 2 |
1 files changed, 1 insertions, 1 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 f58fe8290a43..55498af7a54b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -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; |