Adhere to HIDL contract on cancel() method
Do not invoke the cancel method multiple times for a single client. This currently can happen if the client cancels, and subsequently crashes. Bug: 126205289 Test: Builds Change-Id: I542ab23298b02928c872a255d0980d6e7e27f6c3
This commit is contained in:
@@ -209,11 +209,7 @@ public abstract class ClientMonitor extends LoggableMonitor implements IBinder.D
|
||||
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);
|
||||
}
|
||||
stop(false /* initiatedByClient */);
|
||||
mToken = null;
|
||||
mListener = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user