diff options
| author | Olawale Ogunwale <ogunwale@google.com> | 2015-04-06 16:19:52 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-06 16:19:52 +0000 |
| commit | 954850ce5db39324a9f6a4a1ac62a182d88dea83 (patch) | |
| tree | 24a3f7813132b203bb267c68ca5174cc5e80429f | |
| parent | 12b4a4a7ecb3f24f9bc3f3a763b4c8be4ca45b27 (diff) | |
| parent | 00e1d5cf5e717be8794381c2895893b41126f266 (diff) | |
| download | frameworks_base-954850ce5db39324a9f6a4a1ac62a182d88dea83.zip frameworks_base-954850ce5db39324a9f6a4a1ac62a182d88dea83.tar.gz frameworks_base-954850ce5db39324a9f6a4a1ac62a182d88dea83.tar.bz2 | |
am 00e1d5cf: am 1d065987: am 47c1cf4b: Merge "[ActivityManager] Fix ServiceRecord leakage"
* commit '00e1d5cf5e717be8794381c2895893b41126f266':
[ActivityManager] Fix ServiceRecord leakage
| -rwxr-xr-x | services/core/java/com/android/server/am/ActiveServices.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 3859904..4fa0577 100755 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -2193,8 +2193,16 @@ public final class ActiveServices { } } - // First clear app state from services. - for (int i=app.services.size()-1; i>=0; i--) { + // Clean up any connections this application has to other services. + for (int i = app.connections.size() - 1; i >= 0; i--) { + ConnectionRecord r = app.connections.valueAt(i); + removeConnectionLocked(r, app, null); + } + updateServiceConnectionActivitiesLocked(app); + app.connections.clear(); + + // Clear app state from services. + for (int i = app.services.size() - 1; i >= 0; i--) { ServiceRecord sr = app.services.valueAt(i); synchronized (sr.stats.getBatteryStats()) { sr.stats.stopLaunchedLocked(); @@ -2254,14 +2262,6 @@ public final class ActiveServices { } } - // Clean up any connections this application has to other services. - for (int i=app.connections.size()-1; i>=0; i--) { - ConnectionRecord r = app.connections.valueAt(i); - removeConnectionLocked(r, app, null); - } - updateServiceConnectionActivitiesLocked(app); - app.connections.clear(); - ServiceMap smap = getServiceMap(app.userId); // Now do remaining service cleanup. |
