Skip to content

Commit d95c659

Browse files
author
Danielle Millett
committed
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
1 parent bfbd58d commit d95c659

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private void maybeStartBiometricUnlock() {
144144
Context.POWER_SERVICE);
145145
// TODO: Some of these conditions are handled in KeyguardSecurityModel and may not be
146146
// necessary here.
147-
if (monitor.getPhoneState() != TelephonyManager.CALL_STATE_RINGING
147+
if (monitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE
148148
&& !monitor.getMaxBiometricUnlockAttemptsReached()
149149
&& !backupIsTimedOut
150150
&& powerManager.isScreenOn()) {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import android.app.admin.DevicePolicyManager;
1919
import android.content.Context;
20+
import android.telephony.TelephonyManager;
2021

2122
import com.android.internal.telephony.IccCardConstants;
2223
import com.android.internal.widget.LockPatternUtils;
@@ -66,7 +67,8 @@ private boolean isBiometricUnlockSuppressed() {
6667
final boolean backupIsTimedOut = monitor.getFailedUnlockAttempts() >=
6768
LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT;
6869
return monitor.getMaxBiometricUnlockAttemptsReached() || backupIsTimedOut
69-
|| !monitor.isAlternateUnlockEnabled();
70+
|| !monitor.isAlternateUnlockEnabled()
71+
|| monitor.getPhoneState() != TelephonyManager.CALL_STATE_IDLE;
7072
}
7173

7274
SecurityMode getSecurityMode() {

0 commit comments

Comments
 (0)