Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00e1d5cf authored by Olawale Ogunwale's avatar Olawale Ogunwale Committed by Android Git Automerger
Browse files

am 1d065987: am 47c1cf4b: Merge "[ActivityManager] Fix ServiceRecord leakage"

* commit '1d065987':
  [ActivityManager] Fix ServiceRecord leakage
parents 60df172f 1d065987
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -2127,7 +2127,15 @@ public final class ActiveServices {
            }
        }

        // First clear app state from services.
        // 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()) {
@@ -2188,14 +2196,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.