Merge "Add NPE check to FpDetectClient" into sc-dev

This commit is contained in:
Joshua Mccloskey
2021-06-22 02:30:30 +00:00
committed by Android (Google) Code Review

View File

@@ -124,10 +124,12 @@ class FingerprintDetectClient extends AcquisitionClient<IBiometricsFingerprint>
final PerformanceTracker pm = PerformanceTracker.getInstanceForSensorId(getSensorId());
pm.incrementAuthForUser(getTargetUserId(), authenticated);
try {
getListener().onDetected(getSensorId(), getTargetUserId(), mIsStrongBiometric);
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception when sending onDetected", e);
if (getListener() != null) {
try {
getListener().onDetected(getSensorId(), getTargetUserId(), mIsStrongBiometric);
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception when sending onDetected", e);
}
}
}