Merge "Suppressing Face Unlock during phone call - fix b/7339069" into jb-mr1-dev

This commit is contained in:
Danielle Millett
2012-10-12 13:16:37 -07:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ public class KeyguardFaceUnlockView extends LinearLayout implements KeyguardSecu
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
if (monitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE
&& !monitor.getMaxBiometricUnlockAttemptsReached()
&& !backupIsTimedOut
&& powerManager.isScreenOn()) {

View File

@@ -17,6 +17,7 @@ package com.android.internal.policy.impl.keyguard;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.telephony.TelephonyManager;
import com.android.internal.telephony.IccCardConstants;
import com.android.internal.widget.LockPatternUtils;
@@ -66,7 +67,8 @@ public class KeyguardSecurityModel {
final boolean backupIsTimedOut = monitor.getFailedUnlockAttempts() >=
LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT;
return monitor.getMaxBiometricUnlockAttemptsReached() || backupIsTimedOut
|| !monitor.isAlternateUnlockEnabled();
|| !monitor.isAlternateUnlockEnabled()
|| monitor.getPhoneState() != TelephonyManager.CALL_STATE_IDLE;
}
SecurityMode getSecurityMode() {