MountService listeners can not be unregistered
When unregistering MountService listeners, their Binder proxy objects were compared to registered listeners instead of their backing objects. Change-Id: Ie98a686b1d17544f1eda59fb3eb0dc02d836c1b2
This commit is contained in:
committed by
Johan Redestig
parent
44291d9c27
commit
d64fe0f53c
@@ -1411,7 +1411,7 @@ class MountService extends IMountService.Stub
|
||||
public void unregisterListener(IMountServiceListener listener) {
|
||||
synchronized (mListeners) {
|
||||
for(MountServiceBinderListener bl : mListeners) {
|
||||
if (bl.mListener == listener) {
|
||||
if (bl.mListener.asBinder() == listener.asBinder()) {
|
||||
mListeners.remove(mListeners.indexOf(bl));
|
||||
listener.asBinder().unlinkToDeath(bl, 0);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user