Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d27d0a24 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Disable ALS probe if device is not awake" into main

parents 6b2a3990 77f0d5fa
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
+2 −1
Original line number Diff line number Diff line
@@ -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