summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-06-08 00:04:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-06-08 00:04:43 +0000
commitd27d0a240e00e22dfd2eb0d473659ca7b8796cce (patch)
treec151dc241b94c58dd1bf0d12759fcddc4936c504
parent6b2a39902715f96257f4b98414b7491dbb27acb9 (diff)
parent77f0d5fa5e12466ef6a8d8cbc764d4613360faf3 (diff)
Merge "Disable ALS probe if device is not awake" into main
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClient.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClient.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClient.java
index f9f56ee4d134..266093229186 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClient.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClient.java
@@ -316,6 +316,8 @@ public class FingerprintAuthenticationClient
if (getBiometricContext().isAwake()) {
mALSProbeCallback.getProbe().enable();
+ } else {
+ mALSProbeCallback.getProbe().disable();
}
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception", e);
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
index 40de1b253dea..182d60328440 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
@@ -320,7 +320,7 @@ public class FingerprintAuthenticationClientTest {
}
@Test
- public void luxProbeNotEnabledOnStartWhenNotWake() throws RemoteException {
+ public void luxProbeDisabledOnStartWhenNotWake() throws RemoteException {
luxProbeEnabledOnStart(false /* isAwake */);
}
@@ -337,6 +337,7 @@ public class FingerprintAuthenticationClientTest {
.getValue().toAidlContext());
verify(mLuxProbe, isAwake ? times(1) : never()).enable();
+ verify(mLuxProbe, isAwake ? never() : times(1)).disable();
}
@Test