From aad988345aa213cfd70b687c26ecf337f45dc177 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Sun, 14 Jul 2019 13:23:24 +0900 Subject: [PATCH] Do not let device sleep after successful auth Retrying auth, or succeeding is a strong signal that the user is present. The device should not sleep, otherwise the keyguard will be dismissed (as it should) but not automatically locked, since screen timaeouts don't lock instantly. Test: Manual Fixes: 135967964 Change-Id: I9a8bcf0ddb80536719d093aab9e00c76d87ad24b --- .../src/com/android/keyguard/KeyguardSecurityContainer.java | 1 + .../systemui/statusbar/phone/BiometricUnlockController.java | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java index 69630c4e90e81..c7c648cd023f4 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -237,6 +237,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe MIN_DRAG_SIZE, getResources().getDisplayMetrics()) && !mUpdateMonitor.isFaceDetectionRunning()) { mUpdateMonitor.requestFaceAuth(); + mCallback.userActivity(); showMessage(null, null); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java index 05d26b0a6a17a..80e6bec1d4170 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -260,6 +260,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback { boolean unlockAllowed = mKeyguardBypassController.onBiometricAuthenticated( biometricSourceType); if (unlockAllowed) { + mKeyguardViewMediator.userActivity(); startWakeAndUnlock(biometricSourceType); } }