Fixed NPE in FingerprintAuthClient

Test: It builds.
Bug: 193883067
Change-Id: I3c310ab6a631750377a069e926567279bedc9d3b
Merged-In: I3c310ab6a631750377a069e926567279bedc9d3b
(cherry picked from commit 78893c2317)
DO NOT MERGE
This commit is contained in:
Joshua Mccloskey
2021-09-13 12:24:02 -07:00
parent 9d3e7391aa
commit b5997d47ae

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");
}
}