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

Commit b6985ab0 authored by Nikolai Gladkov's avatar Nikolai Gladkov Committed by Android (Google) Code Review
Browse files

Merge "Log wrapped calls to FingerprintManager API" into udc-qpr-dev

parents 5dbb7ebf fb0337bd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -48,7 +48,8 @@ interface IBiometricAuthenticator {
    // startPreparedClient().
    void prepareForAuthentication(boolean requireConfirmation, IBinder token, long operationId,
            int userId, IBiometricSensorReceiver sensorReceiver, String opPackageName,
            long requestId, int cookie, boolean allowBackgroundAuthentication);
            long requestId, int cookie, boolean allowBackgroundAuthentication,
            boolean isForLegacyFingerprintManager);

    // Starts authentication with the previously prepared client.
    void startPreparedClient(int cookie);
+2 −1
Original line number Diff line number Diff line
@@ -74,7 +74,8 @@ interface IFingerprintService {
    @EnforcePermission("MANAGE_BIOMETRIC")
    void prepareForAuthentication(IBinder token, long operationId,
            IBiometricSensorReceiver sensorReceiver, in FingerprintAuthenticateOptions options, long requestId,
            int cookie, boolean allowBackgroundAuthentication);
            int cookie, boolean allowBackgroundAuthentication,
            boolean isForLegacyFingerprintManager);

    // Starts authentication with the previously prepared client.
    @EnforcePermission("MANAGE_BIOMETRIC")
+12 −5
Original line number Diff line number Diff line
@@ -275,7 +275,8 @@ public final class AuthSession implements IBinder.DeathRecipient {
            }
            sensor.goToStateWaitingForCookie(requireConfirmation, mToken, mOperationId,
                    mUserId, mSensorReceiver, mOpPackageName, mRequestId, cookie,
                    mPromptInfo.isAllowBackgroundAuthentication());
                    mPromptInfo.isAllowBackgroundAuthentication(),
                    mPromptInfo.isForLegacyFingerprintManager());
        }
    }

@@ -747,7 +748,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
                Slog.v(TAG, "Confirmed! Modality: " + statsModality()
                        + ", User: " + mUserId
                        + ", IsCrypto: " + isCrypto()
                        + ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
                        + ", Client: " + getStatsClient()
                        + ", RequireConfirmation: " + mPreAuthInfo.confirmationRequested
                        + ", State: " + FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED
                        + ", Latency: " + latency
@@ -758,7 +759,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
                    mOperationContext,
                    statsModality(),
                    BiometricsProtoEnums.ACTION_UNKNOWN,
                    BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
                    getStatsClient(),
                    mDebugEnabled,
                    latency,
                    FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED,
@@ -784,7 +785,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
                        + ", User: " + mUserId
                        + ", IsCrypto: " + isCrypto()
                        + ", Action: " + BiometricsProtoEnums.ACTION_AUTHENTICATE
                        + ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
                        + ", Client: " + getStatsClient()
                        + ", Reason: " + reason
                        + ", Error: " + error
                        + ", Latency: " + latency
@@ -796,7 +797,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
                        mOperationContext,
                        statsModality(),
                        BiometricsProtoEnums.ACTION_AUTHENTICATE,
                        BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
                        getStatsClient(),
                        mDebugEnabled,
                        latency,
                        error,
@@ -998,6 +999,12 @@ public final class AuthSession implements IBinder.DeathRecipient {
        }
    }

    private int getStatsClient() {
        return mPromptInfo.isForLegacyFingerprintManager()
                ? BiometricsProtoEnums.CLIENT_FINGERPRINT_MANAGER
                : BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT;
    }

    @Override
    public String toString() {
        return "State: " + mState
+3 −2
Original line number Diff line number Diff line
@@ -106,12 +106,13 @@ public abstract class BiometricSensor {

    void goToStateWaitingForCookie(boolean requireConfirmation, IBinder token, long sessionId,
            int userId, IBiometricSensorReceiver sensorReceiver, String opPackageName,
            long requestId, int cookie, boolean allowBackgroundAuthentication)
            long requestId, int cookie, boolean allowBackgroundAuthentication,
            boolean isForLegacyFingerprintManager)
            throws RemoteException {
        mCookie = cookie;
        impl.prepareForAuthentication(requireConfirmation, token,
                sessionId, userId, sensorReceiver, opPackageName, requestId, mCookie,
                allowBackgroundAuthentication);
                allowBackgroundAuthentication, isForLegacyFingerprintManager);
        mSensorState = STATE_WAITING_FOR_COOKIE;
    }

+2 −1
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ public final class FaceAuthenticator extends IBiometricAuthenticator.Stub {
    @Override
    public void prepareForAuthentication(boolean requireConfirmation, IBinder token,
            long operationId, int userId, IBiometricSensorReceiver sensorReceiver,
            String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication)
            String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication,
            boolean isForLegacyFingerprintManager)
            throws RemoteException {
        mFaceService.prepareForAuthentication(requireConfirmation, token, operationId,
                sensorReceiver, new FaceAuthenticateOptions.Builder()
Loading