am 54af78a3: Merge change 5950 into donut

Merge commit '54af78a3f7064e04d7ebd64c985d4149f9f7b05c'

* commit '54af78a3f7064e04d7ebd64c985d4149f9f7b05c':
  Fix memory leaks in system_server
This commit is contained in:
Android (Google) Code Review
2009-07-02 15:23:56 -07:00
committed by The Android Open Source Project
8 changed files with 41 additions and 6 deletions

View File

@@ -3414,7 +3414,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--;
}
}
@@ -5491,6 +5494,7 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
} catch (RemoteException e) {
}
synchronized(mWindowMap) {
mClient.asBinder().unlinkToDeath(this, 0);
mClientDead = true;
killSessionLocked();
}