Merge "Cancel current operation when binder dies"

This commit is contained in:
TreeHugger Robot
2018-11-20 20:58:56 +00:00
committed by Android (Google) Code Review

View File

@@ -197,10 +197,15 @@ public abstract class ClientMonitor implements IBinder.DeathRecipient {
@Override
public void binderDied() {
// If the current client dies we should cancel the current operation.
Slog.e(getLogTag(), "Binder died, cancelling client");
try {
getDaemonWrapper().cancel();
} catch (RemoteException e) {
Slog.e(getLogTag(), "Remote exception", e);
}
mToken = null;
mListener = null;
onError(getHalDeviceId(), BiometricConstants.BIOMETRIC_ERROR_HW_UNAVAILABLE,
0 /* vendorCode */);
}
@Override