diff options
Diffstat (limited to 'services/java')
5 files changed, 23 insertions, 4 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index fc37290..0f5b3fd 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -507,6 +507,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run private void removeProvider(LocationProviderProxy provider) { mProviders.remove(provider); + provider.unlinkProvider(); mProvidersByName.remove(provider.getName()); } diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java index c5ea5fa..79d78ad 100644 --- a/services/java/com/android/server/PowerManagerService.java +++ b/services/java/com/android/server/PowerManagerService.java @@ -709,7 +709,10 @@ class PowerManagerService extends IPowerManager.Stub implements LocalPowerManage p.awakeOnSet = true; } } else { - mPokeLocks.remove(token); + PokeLock rLock = mPokeLocks.remove(token); + if (rLock != null) { + token.unlinkToDeath(rLock, 0); + } } int oldPokey = mPokey; diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java index 5df88b2..f5e2e3d 100644 --- a/services/java/com/android/server/WifiService.java +++ b/services/java/com/android/server/WifiService.java @@ -1875,7 +1875,9 @@ public class WifiService extends IWifiManager.Stub { private WifiLock removeLock(IBinder binder) { int index = findLockByBinder(binder); if (index >= 0) { - return mList.remove(index); + WifiLock ret = mList.remove(index); + ret.unlinkDeathRecipient(); + return ret; } else { return null; } @@ -1987,6 +1989,10 @@ public class WifiService extends IWifiManager.Stub { binderDied(); } } + + void unlinkDeathRecipient() { + mBinder.unlinkToDeath(this, 0); + } } private class Multicaster extends DeathRecipient { @@ -2054,7 +2060,10 @@ public class WifiService extends IWifiManager.Stub { private void removeMulticasterLocked(int i, int uid) { - mMulticasters.remove(i); + Multicaster removed = mMulticasters.remove(i); + if (removed != null) { + removed.unlinkDeathRecipient(); + } if (mMulticasters.size() == 0) { WifiNative.startPacketFiltering(); } diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 9bad153..cfa625c 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -3407,7 +3407,10 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo synchronized (mWindowMap) { for (int i=0; i<mRotationWatchers.size(); i++) { if (watcherBinder == mRotationWatchers.get(i).asBinder()) { - mRotationWatchers.remove(i); + IRotationWatcher removed = mRotationWatchers.remove(i); + if (removed != null) { + removed.asBinder().unlinkToDeath(this, 0); + } i--; } } @@ -5442,6 +5445,7 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo } catch (RemoteException e) { } synchronized(mWindowMap) { + mClient.asBinder().unlinkToDeath(this, 0); mClientDead = true; killSessionLocked(); } diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java index 48cbace..b44168a 100644 --- a/services/java/com/android/server/status/StatusBarService.java +++ b/services/java/com/android/server/status/StatusBarService.java @@ -119,6 +119,7 @@ public class StatusBarService extends IStatusBar.Stub public void binderDied() { Log.i(TAG, "binder died for pkg=" + pkg); disable(0, token, pkg); + token.unlinkToDeath(this, 0); } } @@ -494,6 +495,7 @@ public class StatusBarService extends IStatusBar.Stub if (what == 0 || !token.isBinderAlive()) { if (tok != null) { mDisableRecords.remove(i); + tok.token.unlinkToDeath(tok, 0); } } else { if (tok == null) { |
