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

Commit 4fdc1492 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add additional cancel logs." into sc-dev am: 8fba2059

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

Change-Id: Ifc188193ec68478335ed2fb5ec367fffdd8a36ca
parents 64070d6c 8fba2059
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -261,7 +261,7 @@ public class AuthService extends SystemService {
        private void authenticateFastFail(String message, IBiometricServiceReceiver receiver) {
            // notify caller in cases where authentication is aborted before calling into
            // IBiometricService without raising an exception
            Slog.e(TAG, message);
            Slog.e(TAG, "authenticateFastFail: " + message);
            try {
                receiver.onError(TYPE_NONE, BIOMETRIC_ERROR_CANCELED, 0 /*vendorCode */);
            } catch (RemoteException e) {
+1 −3
Original line number Diff line number Diff line
@@ -382,9 +382,7 @@ public final class AuthSession implements IBinder.DeathRecipient {
     */
    boolean onErrorReceived(int sensorId, int cookie, @BiometricConstants.Errors int error,
            int vendorCode) throws RemoteException {
        if (DEBUG) {
            Slog.v(TAG, "onErrorReceived sensor: " + sensorId + " error: " + error);
        }
        Slog.d(TAG, "onErrorReceived sensor: " + sensorId + " error: " + error);

        if (!containsCookie(cookie)) {
            Slog.e(TAG, "Unknown/expired cookie: " + cookie);
+6 −0
Original line number Diff line number Diff line
@@ -87,6 +87,8 @@ public abstract class AcquisitionClient<T> extends HalClientMonitor<T> implement
     * operation still needs to wait for the HAL to send ERROR_CANCELED.
     */
    public void onUserCanceled() {
        Slog.d(TAG, "onUserCanceled");

        // Send USER_CANCELED, but do not finish. Wait for the HAL to respond with ERROR_CANCELED,
        // which then finishes the AcquisitionClient's lifecycle.
        onErrorInternal(BiometricConstants.BIOMETRIC_ERROR_USER_CANCELED, 0 /* vendorCode */,
@@ -95,6 +97,8 @@ public abstract class AcquisitionClient<T> extends HalClientMonitor<T> implement
    }

    protected void onErrorInternal(int errorCode, int vendorCode, boolean finish) {
        Slog.d(TAG, "onErrorInternal code: " + errorCode + ", finish: " + finish);

        // In some cases, the framework will send an error to the caller before a true terminal
        // case (success, failure, or error) is received from the HAL (e.g. versions of fingerprint
        // that do not handle lockout under the HAL. In these cases, ensure that the framework only
@@ -133,6 +137,8 @@ public abstract class AcquisitionClient<T> extends HalClientMonitor<T> implement

    @Override
    public void cancelWithoutStarting(@NonNull Callback callback) {
        Slog.d(TAG, "cancelWithoutStarting: " + this);

        final int errorCode = BiometricConstants.BIOMETRIC_ERROR_CANCELED;
        try {
            if (getListener() != null) {
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ public abstract class AuthenticationClient<T> extends AcquisitionClient<T>
            mActivityTaskManager.registerTaskStackListener(mTaskStackListener);
        }

        if (DEBUG) Slog.w(TAG, "Requesting auth for " + getOwnerString());
        Slog.d(TAG, "Requesting auth for " + getOwnerString());

        mStartTimeMs = System.currentTimeMillis();
        mAuthAttempted = true;