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

Commit 44680270 authored by Joshua Mccloskey's avatar Joshua Mccloskey Committed by Android (Google) Code Review
Browse files

Merge "Updated Fingerprint enrollment logging"

parents 0a398edf 84a6a53b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -568,11 +568,13 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing
     * @param cancel an object that can be used to cancel enrollment
     * @param userId the user to whom this fingerprint will belong to
     * @param callback an object to receive enrollment events
     * @param shouldLogMetrics a flag that indicates if enrollment failure/success metrics
     * should be logged.
     * @hide
     */
    @RequiresPermission(MANAGE_FINGERPRINT)
    public void enroll(byte [] hardwareAuthToken, CancellationSignal cancel, int userId,
            EnrollmentCallback callback) {
            EnrollmentCallback callback, boolean shouldLogMetrics) {
        if (userId == UserHandle.USER_CURRENT) {
            userId = getCurrentUserId();
        }
@@ -593,7 +595,7 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing
            try {
                mEnrollmentCallback = callback;
                mService.enroll(mToken, hardwareAuthToken, userId, mServiceReceiver,
                        mContext.getOpPackageName());
                        mContext.getOpPackageName(), shouldLogMetrics);
            } catch (RemoteException e) {
                Slog.w(TAG, "Remote exception in enroll: ", e);
                // Though this may not be a hardware issue, it will cause apps to give up or try
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ interface IFingerprintService {

    // Start fingerprint enrollment
    void enroll(IBinder token, in byte [] hardwareAuthToken, int userId, IFingerprintServiceReceiver receiver,
            String opPackageName);
            String opPackageName, boolean shouldLogMetrics);

    // Cancel enrollment in progress
    void cancelEnrollment(IBinder token);
+2 −2
Original line number Diff line number Diff line
@@ -56,9 +56,9 @@ public abstract class AcquisitionClient<T> extends ClientMonitor<T> implements I
    public AcquisitionClient(@NonNull Context context, @NonNull LazyDaemon<T> lazyDaemon,
            @NonNull IBinder token, @NonNull ClientMonitorCallbackConverter listener, int userId,
            @NonNull String owner, int cookie, int sensorId, int statsModality,
            int statsAction, int statsClient) {
            int statsAction, int statsClient, boolean shouldLogMetrics) {
        super(context, lazyDaemon, token, listener, userId, owner, cookie, sensorId, statsModality,
                statsAction, statsClient);
                statsAction, statsClient, shouldLogMetrics);
        mPowerManager = context.getSystemService(PowerManager.class);
        mSuccessVibrationEffect = VibrationEffect.get(VibrationEffect.EFFECT_CLICK);
        mErrorVibrationEffect = VibrationEffect.get(VibrationEffect.EFFECT_DOUBLE_CLICK);
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
import android.app.IActivityTaskManager;
import android.app.TaskStackListener;
import android.content.ComponentName;
import android.content.Context;
@@ -67,7 +66,8 @@ public abstract class AuthenticationClient<T> extends AcquisitionClient<T>
            int statsModality, int statsClient, @Nullable TaskStackListener taskStackListener,
            @NonNull LockoutTracker lockoutTracker) {
        super(context, lazyDaemon, token, listener, targetUserId, owner, cookie, sensorId,
                statsModality, BiometricsProtoEnums.ACTION_AUTHENTICATE, statsClient);
                statsModality, BiometricsProtoEnums.ACTION_AUTHENTICATE, statsClient,
                true /* shouldLogMetrics */);
        mIsStrongBiometric = isStrongBiometric;
        mOperationId = operationId;
        mRequireConfirmation = requireConfirmation;
+2 −2
Original line number Diff line number Diff line
@@ -105,8 +105,8 @@ public abstract class ClientMonitor<T> extends LoggableMonitor implements IBinde
    public ClientMonitor(@NonNull Context context, @NonNull LazyDaemon<T> lazyDaemon,
            @Nullable IBinder token, @Nullable ClientMonitorCallbackConverter listener, int userId,
            @NonNull String owner, int cookie, int sensorId, int statsModality, int statsAction,
            int statsClient) {
        super(statsModality, statsAction, statsClient);
            int statsClient, boolean shouldLogMetrics) {
        super(statsModality, statsAction, statsClient, shouldLogMetrics);
        mSequentialId = sCount++;
        mContext = context;
        mLazyDaemon = lazyDaemon;
Loading