Fixed NPE in FingerprintAuthClient

Test: It builds.
Bug: 193883067
Change-Id: I3c310ab6a631750377a069e926567279bedc9d3b
This commit is contained in:
Joshua Mccloskey
2021-09-13 12:24:02 -07:00
parent c72d4fc175
commit 78893c2317

View File

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