Skip to content

Commit 45973d6

Browse files
Danielle MillettAndroid (Google) Code Review
authored andcommitted
Merge "Moved setting the flag to suppress face unlock during a phone call" into jb-dev
2 parents c3a5cf9 + cafd387 commit 45973d6

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,6 @@ public void onScreenTurnedOff() {
532532
if (DEBUG) Log.d(TAG, "screen off");
533533
mScreenOn = false;
534534
mForgotPattern = false;
535-
if (mBiometricUnlock != null) {
536-
mSuppressBiometricUnlock =
537-
mUpdateMonitor.getPhoneState() != TelephonyManager.CALL_STATE_IDLE
538-
|| mHasDialog;
539-
}
540535

541536
// Emulate activity life-cycle for both lock and unlock screen.
542537
if (mLockScreen != null) {
@@ -991,6 +986,17 @@ private void initializeBiometricUnlockView(View view) {
991986
restartBiometricUnlock = mBiometricUnlock.stop();
992987
}
993988

989+
// Prevents biometric unlock from coming up immediately after a phone call or if there
990+
// is a dialog on top of lockscreen. It is only updated if the screen is off because if the
991+
// screen is on it's either because of an orientation change, or when it first boots.
992+
// In both those cases, we don't want to override the current value of
993+
// mSuppressBiometricUnlock and instead want to use the previous value.
994+
if (!mScreenOn) {
995+
mSuppressBiometricUnlock =
996+
mUpdateMonitor.getPhoneState() != TelephonyManager.CALL_STATE_IDLE
997+
|| mHasDialog;
998+
}
999+
9941000
// If the biometric unlock is not being used, we don't bother constructing it. Then we can
9951001
// simply check if it is null when deciding whether we should make calls to it.
9961002
mBiometricUnlock = null;

0 commit comments

Comments
 (0)