diff options
author | Uriel Rodriguez <urodriguez@google.com> | 2012-10-12 15:00:48 -0400 |
---|---|---|
committer | Uriel Rodriguez <urodriguez@google.com> | 2012-10-12 15:17:25 -0400 |
commit | 94c7b14b1a4f53157997939505b70ef056ca90d8 (patch) | |
tree | 1a364c61b7a6c64b59122efff51666d318119864 /policy | |
parent | 732d88e14e4418feba1b80cf1d6010cddb1d5de5 (diff) | |
download | frameworks_base-94c7b14b1a4f53157997939505b70ef056ca90d8.zip frameworks_base-94c7b14b1a4f53157997939505b70ef056ca90d8.tar.gz frameworks_base-94c7b14b1a4f53157997939505b70ef056ca90d8.tar.bz2 |
Fix bug 7338736. Only starting FUL if the screen is on
Change-Id: Id767cf1394218a7e9dccabcdd9aae5af27b493b1
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java index 4967138..4f42071 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java @@ -16,6 +16,7 @@ package com.android.internal.policy.impl.keyguard; import android.content.Context; +import android.os.PowerManager; import android.telephony.TelephonyManager; import android.util.AttributeSet; import android.util.Log; @@ -29,7 +30,7 @@ import com.android.internal.widget.LockPatternUtils; public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecurityView { - private static final String TAG = "KeyguardFaceUnlockView"; + private static final String TAG = "FULKeyguardFaceUnlockView"; private static final boolean DEBUG = false; private KeyguardSecurityCallback mKeyguardSecurityCallback; private LockPatternUtils mLockPatternUtils; @@ -139,11 +140,14 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu final boolean backupIsTimedOut = ( monitor.getFailedUnlockAttempts() >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT); - // TODO: These max attempts checks are also checked in KeyguardSecurityModel so they - // might not be necessary here anymore. + PowerManager powerManager = (PowerManager) mContext.getSystemService( + Context.POWER_SERVICE); + // TODO: Some of these conditions are handled in KeyguardSecurityModel and may not be + // necessary here. if (monitor.getPhoneState() != TelephonyManager.CALL_STATE_RINGING && !monitor.getMaxBiometricUnlockAttemptsReached() - && !backupIsTimedOut) { + && !backupIsTimedOut + && powerManager.isScreenOn()) { mBiometricUnlock.start(); } else { mBiometricUnlock.stopAndShowBackup(); |