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

Commit 270708be authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "fixed typos in log fixed bug 34845702 Test: manual"

parents 352b0f05 80e40ccf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public abstract class AuthenticationClient extends ClientMonitor {
    public int start() {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "start authentication: no fingeprintd!");
            Slog.w(TAG, "start authentication: no fingerprint HAL!");
            return ERROR_ESRCH;
        }
        try {
@@ -131,7 +131,7 @@ public abstract class AuthenticationClient extends ClientMonitor {
    public int stop(boolean initiatedByClient) {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "stopAuthentication: no fingeprintd!");
            Slog.w(TAG, "stopAuthentication: no fingerprint HAL!");
            return ERROR_ESRCH;
        }
        try {
+7 −7
Original line number Diff line number Diff line
@@ -28,13 +28,13 @@ import android.util.Slog;
import java.util.NoSuchElementException;

/**
 * Abstract base class for keeping track and dispatching events from fingerprintd to the
 * Abstract base class for keeping track and dispatching events from fingerprint HAL to the
 * the current client.  Subclasses are responsible for coordinating the interaction with
 * fingerprintd for the specific action (e.g. authenticate, enroll, enumerate, etc.).
 * fingerprint HAL for the specific action (e.g. authenticate, enroll, enumerate, etc.).
 */
public abstract class ClientMonitor implements IBinder.DeathRecipient {
    protected static final String TAG = FingerprintService.TAG; // TODO: get specific name
    protected static final int ERROR_ESRCH = 3; // Likely fingerprintd is dead. See errno.h.
    protected static final int ERROR_ESRCH = 3; // Likely fingerprint HAL is dead. See errno.h.
    protected static final boolean DEBUG = FingerprintService.DEBUG;
    private IBinder mToken;
    private IFingerprintServiceReceiver mReceiver;
@@ -77,13 +77,13 @@ public abstract class ClientMonitor implements IBinder.DeathRecipient {
    }

    /**
     * Contacts fingerprintd to start the client.
     * Contacts fingerprint HAL to start the client.
     * @return 0 on succes, errno from driver on failure
     */
    public abstract int start();

    /**
     * Contacts fingerprintd to stop the client.
     * Contacts fingerprint HAL to stop the client.
     * @param initiatedByClient whether the operation is at the request of a client
     */
    public abstract int stop(boolean initiatedByClient);
@@ -108,7 +108,7 @@ public abstract class ClientMonitor implements IBinder.DeathRecipient {
    public abstract boolean onEnumerationResult(int fingerId, int groupId, int remaining);

    /**
     * Called when we get notification from fingerprintd that an image has been acquired.
     * Called when we get notification from fingerprint HAL that an image has been acquired.
     * Common to authenticate and enroll.
     * @param acquiredInfo info about the current image acquisition
     * @return true if client should be removed
@@ -131,7 +131,7 @@ public abstract class ClientMonitor implements IBinder.DeathRecipient {
    }

    /**
     * Called when we get notification from fingerprintd that an error has occurred with the
     * Called when we get notification from fingerprint HAL that an error has occurred with the
     * current operation. Common to authenticate, enroll, enumerate and remove.
     * @param error
     * @return true if client should be removed
+2 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public abstract class EnrollClient extends ClientMonitor {
    public int start() {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "enroll: no fingeprintd!");
            Slog.w(TAG, "enroll: no fingerprint HAL!");
            return ERROR_ESRCH;
        }
        final int timeout = (int) (ENROLLMENT_TIMEOUT_MS / MS_PER_SEC);
@@ -102,7 +102,7 @@ public abstract class EnrollClient extends ClientMonitor {
    public int stop(boolean initiatedByClient) {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "stopEnrollment: no fingeprintd!");
            Slog.w(TAG, "stopEnrollment: no fingerprint HAL!");
            return ERROR_ESRCH;
        }
        try {
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ public abstract class EnumerateClient extends ClientMonitor {
    public int stop(boolean initiatedByClient) {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "stopAuthentication: no fingeprintd!");
            Slog.w(TAG, "stopAuthentication: no fingerprint HAL!");
            return ERROR_ESRCH;
        }
        try {
+7 −7
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death

    @Override
    public void serviceDied(long cookie) {
        Slog.v(TAG, "fingerprintd died");
        Slog.v(TAG, "fingerprint HAL died");
        MetricsLogger.count(mContext, "fingerprintd_died", 1);
        synchronized (this) {
            mDaemon = null;
@@ -235,7 +235,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
            try {
                mHalDeviceId = mDaemon.setNotify(mDaemonCallback);
            } catch (RemoteException e) {
                Slog.e(TAG, "Failed to open fingeprintd HAL", e);
                Slog.e(TAG, "Failed to open fingerprint HAL", e);
                mDaemon = null; // try again later!
            }

@@ -391,7 +391,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
    public long startPreEnroll(IBinder token) {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "startPreEnroll: no fingeprintd!");
            Slog.w(TAG, "startPreEnroll: no fingerprint HAL!");
            return 0;
        }
        try {
@@ -405,7 +405,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
    public int startPostEnroll(IBinder token) {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "startPostEnroll: no fingeprintd!");
            Slog.w(TAG, "startPostEnroll: no fingerprint HAL!");
            return 0;
        }
        try {
@@ -417,7 +417,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
    }

    /**
     * Calls fingerprintd to switch states to the new task. If there's already a current task,
     * Calls fingerprint HAL to switch states to the new task. If there's already a current task,
     * it calls cancel() and sets mPendingClient to begin when the current task finishes
     * ({@link FingerprintManager#FINGERPRINT_ERROR_CANCELED}).
     * @param newClient the new client that wants to connect
@@ -447,7 +447,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
            IFingerprintServiceReceiver receiver, boolean restricted) {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "startRemove: no fingeprintd!");
            Slog.w(TAG, "startRemove: no fingerprint HAL!");
            return;
        }
        RemovalClient client = new RemovalClient(getContext(), mHalDeviceId, token,
@@ -469,7 +469,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
        IFingerprintServiceReceiver receiver, boolean restricted) {
        IBiometricsFingerprint daemon = getFingerprintDaemon();
        if (daemon == null) {
            Slog.w(TAG, "startEnumerate: no fingeprintd!");
            Slog.w(TAG, "startEnumerate: no fingerprint HAL!");
            return;
        }
        EnumerateClient client = new EnumerateClient(getContext(), mHalDeviceId, token,