When unregistering MountService listeners, their Binder proxy
objects were compared to registered listeners instead of their
backing objects.
Change-Id: Ie98a686b1d17544f1eda59fb3eb0dc02d836c1b2
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;