Add metrics logging for critical fingerprintd errors
am: c57c8d934c
Change-Id: I7da4ef8b31bced6330656b2d4555d8e179ed4ddf
This commit is contained in:
@@ -115,6 +115,7 @@ public abstract class AuthenticationClient extends ClientMonitor {
|
|||||||
final int result = daemon.authenticate(mOpId, getGroupId());
|
final int result = daemon.authenticate(mOpId, getGroupId());
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
Slog.w(TAG, "startAuthentication failed, result=" + result);
|
Slog.w(TAG, "startAuthentication failed, result=" + result);
|
||||||
|
MetricsLogger.histogram(getContext(), "fingeprintd_auth_start_error", result);
|
||||||
onError(FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
onError(FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ public abstract class EnrollClient extends ClientMonitor {
|
|||||||
final int result = daemon.enroll(mCryptoToken, getGroupId(), timeout);
|
final int result = daemon.enroll(mCryptoToken, getGroupId(), timeout);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
Slog.w(TAG, "startEnroll failed, result=" + result);
|
Slog.w(TAG, "startEnroll failed, result=" + result);
|
||||||
|
MetricsLogger.histogram(getContext(), "fingerprintd_enroll_start_error", result);
|
||||||
onError(FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
onError(FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import android.hardware.fingerprint.IFingerprintServiceReceiver;
|
|||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
|
import com.android.internal.logging.MetricsLogger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class to keep track of the enumeration state for a given client.
|
* A class to keep track of the enumeration state for a given client.
|
||||||
@@ -43,6 +44,7 @@ public abstract class EnumerateClient extends ClientMonitor {
|
|||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
Slog.w(TAG, "start enumerate for user " + getTargetUserId()
|
Slog.w(TAG, "start enumerate for user " + getTargetUserId()
|
||||||
+ " failed, result=" + result);
|
+ " failed, result=" + result);
|
||||||
|
MetricsLogger.histogram(getContext(), "fingerprintd_enum_start_error", result);
|
||||||
onError(FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
onError(FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
|
|||||||
@Override
|
@Override
|
||||||
public void binderDied() {
|
public void binderDied() {
|
||||||
Slog.v(TAG, "fingerprintd died");
|
Slog.v(TAG, "fingerprintd died");
|
||||||
|
MetricsLogger.count(mContext, "fingerprintd_died", 1);
|
||||||
mDaemon = null;
|
mDaemon = null;
|
||||||
mCurrentUserId = UserHandle.USER_CURRENT;
|
mCurrentUserId = UserHandle.USER_CURRENT;
|
||||||
handleError(mHalDeviceId, FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
handleError(mHalDeviceId, FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
||||||
@@ -211,6 +212,7 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
|
|||||||
updateActiveGroup(ActivityManager.getCurrentUser(), null);
|
updateActiveGroup(ActivityManager.getCurrentUser(), null);
|
||||||
} else {
|
} else {
|
||||||
Slog.w(TAG, "Failed to open Fingerprint HAL!");
|
Slog.w(TAG, "Failed to open Fingerprint HAL!");
|
||||||
|
MetricsLogger.count(mContext, "fingerprintd_openhal_error", 1);
|
||||||
mDaemon = null;
|
mDaemon = null;
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import android.os.IBinder;
|
|||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
|
import com.android.internal.logging.MetricsLogger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class to keep track of the remove state for a given client.
|
* A class to keep track of the remove state for a given client.
|
||||||
@@ -46,6 +47,7 @@ public abstract class RemovalClient extends ClientMonitor {
|
|||||||
final int result = daemon.remove(mFingerId, getGroupId());
|
final int result = daemon.remove(mFingerId, getGroupId());
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
Slog.w(TAG, "startRemove with id = " + mFingerId + " failed, result=" + result);
|
Slog.w(TAG, "startRemove with id = " + mFingerId + " failed, result=" + result);
|
||||||
|
MetricsLogger.histogram(getContext(), "fingerprintd_remove_start_error", result);
|
||||||
onError(FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
onError(FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user