OSDN Git Service

Do not let device sleep after successful auth
authorLucas Dupin <dupin@google.com>
Sun, 14 Jul 2019 04:23:24 +0000 (13:23 +0900)
committerLucas Dupin <dupin@google.com>
Sun, 14 Jul 2019 04:23:24 +0000 (13:23 +0900)
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

packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java

index 69630c4..c7c648c 100644 (file)
@@ -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);
             }
         }
index 05d26b0..80e6bec 100644 (file)
@@ -260,6 +260,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback {
         boolean unlockAllowed = mKeyguardBypassController.onBiometricAuthenticated(
                 biometricSourceType);
         if (unlockAllowed) {
+            mKeyguardViewMediator.userActivity();
             startWakeAndUnlock(biometricSourceType);
         }
     }