Fix NPE caused by applications that try to hide keyguard while it's not showing

Fixes bug 7466360

Change-Id: Idec4c60c2ca2477e49e0f4526ae2357353d4a1e3
This commit is contained in:
Jim Miller
2012-11-05 20:28:09 -08:00
parent bb8abae507
commit 87d0366d9e

View File

@@ -881,8 +881,10 @@ public class KeyguardViewMediator {
* Dismiss the keyguard through the security layers. * Dismiss the keyguard through the security layers.
*/ */
public void dismiss() { public void dismiss() {
if (mShowing && !mHidden) {
mKeyguardViewManager.dismiss(); mKeyguardViewManager.dismiss();
} }
}
/** /**
* Send message to keyguard telling it to reset its state. * Send message to keyguard telling it to reset its state.