Fixed NPE in FingerprintAuthClient

Test: It builds.
Bug: 193883067

Merge "Fixed NPE in FingerprintAuthClient" into sc-qpr1-dev am: 390edd0423

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

Change-Id: I2f946cae240009af6963284c54825ab7b5efcc40
Merged-In: I2f946cae240009af6963284c54825ab7b5efcc40
This commit is contained in:
Joshua Mccloskey
2021-09-17 18:07:58 +00:00

View File

@@ -167,14 +167,17 @@ class FingerprintAuthenticationClient extends AuthenticationClient<ISession> imp
@Override
protected void stopHalOperation() {
mSensorOverlays.hide(getSensorId());
try {
mCancellationSignal.cancel();
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception", e);
onError(BiometricFingerprintConstants.FINGERPRINT_ERROR_HW_UNAVAILABLE,
0 /* vendorCode */);
mCallback.onClientFinished(this, false /* success */);
if (mCancellationSignal != null) {
try {
mCancellationSignal.cancel();
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception", e);
onError(BiometricFingerprintConstants.FINGERPRINT_ERROR_HW_UNAVAILABLE,
0 /* vendorCode */);
mCallback.onClientFinished(this, false /* success */);
}
} else {
Slog.e(TAG, "cancellation signal was null");
}
}