Merge "Fix the reference leak on RemoteCallbackList"

This commit is contained in:
Dan Zhang
2019-08-01 05:03:03 +00:00
committed by Gerrit Code Review

View File

@@ -123,6 +123,7 @@ public class RemoteCallbackList<E extends IInterface> {
IBinder binder = callback.asBinder();
try {
Callback cb = new Callback(callback, cookie);
unregister(callback);
binder.linkToDeath(cb, 0);
mCallbacks.put(binder, cb);
return true;