Fixed NPE in FingerprintAuthClient am: b5997d47ae

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

Change-Id: I944ce9fb909436cf5cd2e9566f9e095deb7bddcf
This commit is contained in:
Joshua Mccloskey
2021-10-04 23:25:09 +00:00
committed by Automerger Merge Worker

View File

@@ -164,13 +164,17 @@ class FingerprintAuthenticationClient extends AuthenticationClient<ISession> imp
@Override
protected void stopHalOperation() {
UdfpsHelper.hideUdfpsOverlay(getSensorId(), mUdfpsOverlayController);
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");
}
}