Skip to content

Commit 87d0366

Browse files
author
Jim Miller
committed
Fix NPE caused by applications that try to hide keyguard while it's not showing
Fixes bug 7466360 Change-Id: Idec4c60c2ca2477e49e0f4526ae2357353d4a1e3
1 parent bb8abae commit 87d0366

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,9 @@ private void doKeyguardLocked(Bundle options) {
881881
* Dismiss the keyguard through the security layers.
882882
*/
883883
public void dismiss() {
884-
mKeyguardViewManager.dismiss();
884+
if (mShowing && !mHidden) {
885+
mKeyguardViewManager.dismiss();
886+
}
885887
}
886888

887889
/**

0 commit comments

Comments
 (0)