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

Commit 74b61eb9 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Clear identity when checking BiometricService#isStrongBiometric()

Fixes: 159042356
Fixes: 159462355

Test: atest FingerprintManagerTest
Test: atest AccessibilityFingerprintGestureTest
Change-Id: Ib8eefba810038af7c69ec6bf864ad5d0a202e132
parent 706e17d7
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -183,6 +183,14 @@ public class FingerprintService extends BiometricServiceBase {
                return;
            }

            final boolean isStrongBiometric;
            final long ident = Binder.clearCallingIdentity();
            try {
                isStrongBiometric = isStrongBiometric();
            } finally {
                Binder.restoreCallingIdentity(ident);
            }

            final boolean restricted = isRestricted();
            final int statsClient = isKeyguard(opPackageName) ? BiometricsProtoEnums.CLIENT_KEYGUARD
                    : BiometricsProtoEnums.CLIENT_FINGERPRINT_MANAGER;
@@ -190,7 +198,7 @@ public class FingerprintService extends BiometricServiceBase {
                    mClientFinishCallback, getContext(), daemon, token,
                    new ClientMonitorCallbackConverter(receiver), userId, opId, restricted,
                    opPackageName, 0 /* cookie */, false /* requireConfirmation */, getSensorId(),
                    isStrongBiometric(), surface, statsClient, mTaskStackListener, mLockoutTracker);
                    isStrongBiometric, surface, statsClient, mTaskStackListener, mLockoutTracker);
            authenticateInternal(client, opPackageName);
        }