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

Commit eb40b6f0 authored by Jeff Pu's avatar Jeff Pu Committed by Automerger Merge Worker
Browse files

Merge "Update operationContext with sessionInfo for Atom logs" into...

Merge "Update operationContext with sessionInfo for Atom logs" into udc-qpr-dev am: dbeae1b9 am: f97ae1f2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24392593



Change-Id: If7e1d0a76f6516254e196b6e4ff6e1bdaae38e3a
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents dc9583e6 f97ae1f2
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -150,6 +150,10 @@ public final class AuthSession implements IBinder.DeathRecipient {
    // Timestamp when hardware authentication occurred
    private long mAuthenticatedTimeMs;

    @NonNull
    private final OperationContextExt mOperationContext;


    AuthSession(@NonNull Context context,
            @NonNull BiometricContext biometricContext,
            @NonNull IStatusBarService statusBarService,
@@ -215,6 +219,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
        mFingerprintSensorProperties = fingerprintSensorProperties;
        mCancelled = false;
        mBiometricFrameworkStatsLogger = logger;
        mOperationContext = new OperationContextExt(true /* isBP */);

        try {
            mClientReceiver.asBinder().linkToDeath(this, 0 /* flags */);
@@ -581,6 +586,8 @@ public final class AuthSession implements IBinder.DeathRecipient {
        } else {
            Slog.d(TAG, "delaying fingerprint sensor start");
        }

        mBiometricContext.updateContext(mOperationContext, isCrypto());
    }

    // call once anytime after onDialogAnimatedIn() to indicate it's appropriate to start the
@@ -743,12 +750,12 @@ public final class AuthSession implements IBinder.DeathRecipient {
                        + ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
                        + ", RequireConfirmation: " + mPreAuthInfo.confirmationRequested
                        + ", State: " + FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED
                        + ", Latency: " + latency);
                        + ", Latency: " + latency
                        + ", SessionId: " + mOperationContext.getId());
            }

            mBiometricFrameworkStatsLogger.authenticate(
                    mBiometricContext.updateContext(new OperationContextExt(true /* isBP */),
                            isCrypto()),
                    mOperationContext,
                    statsModality(),
                    BiometricsProtoEnums.ACTION_UNKNOWN,
                    BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
@@ -780,13 +787,13 @@ public final class AuthSession implements IBinder.DeathRecipient {
                        + ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
                        + ", Reason: " + reason
                        + ", Error: " + error
                        + ", Latency: " + latency);
                        + ", Latency: " + latency
                        + ", SessionId: " + mOperationContext.getId());
            }
            // Auth canceled
            if (error != 0) {
                mBiometricFrameworkStatsLogger.error(
                        mBiometricContext.updateContext(new OperationContextExt(true /* isBP */),
                                isCrypto()),
                        mOperationContext,
                        statsModality(),
                        BiometricsProtoEnums.ACTION_AUTHENTICATE,
                        BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
+2 −0
Original line number Diff line number Diff line
@@ -351,6 +351,8 @@ public class AuthSessionTest {
        assertEquals(startFingerprintNow ? BiometricSensor.STATE_AUTHENTICATING
                        : BiometricSensor.STATE_COOKIE_RETURNED,
                session.mPreAuthInfo.eligibleSensors.get(fingerprintSensorId).getSensorState());
        verify(mBiometricContext).updateContext((OperationContextExt) anyObject(),
                eq(session.isCrypto()));

        // start fingerprint sensor if it was delayed
        if (!startFingerprintNow) {