Skip to content

Commit 6c5d151

Browse files
Dianne HackbornAndroid Code Review
authored andcommitted
Merge "frameworks/base: Fix to release references in ActivityManagerService"
2 parents 3b10aea + 50b9b94 commit 6c5d151

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

services/java/com/android/server/am/ActivityManagerService.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9120,6 +9120,14 @@ private final void bringDownServiceLocked(ServiceRecord r, boolean force) {
91209120
if (DEBUG_SERVICE) Slog.v(
91219121
TAG, "Removed service that is not running: " + r);
91229122
}
9123+
9124+
if (r.bindings.size() > 0) {
9125+
r.bindings.clear();
9126+
}
9127+
9128+
if (r.restarter instanceof ServiceRestarter) {
9129+
((ServiceRestarter)r.restarter).setService(null);
9130+
}
91239131
}
91249132

91259133
ComponentName startServiceLocked(IApplicationThread caller,

0 commit comments

Comments
 (0)