Suppressing Face Unlock during phone call - fix b/7339069

Now that there isn't a swipe before launching face unlock, face unlock
needs to be suppressed during a phone call.  If it isn't it will popup
on top of the phone call screen.

Change-Id: Id6c4165bf4df606ebf396c151f1c80603d5abca3
This commit is contained in:
Danielle Millett
2012-10-12 14:55:44 -04:00
parent bfbd58de8d
commit d95c659a1d
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() {