Skip to content

Commit baaf3ce

Browse files
Dianne HackbornAndroid Code Review
authored andcommitted
Merge "Handle stopping of services with still bound applications."
2 parents d144748 + 78f9fff commit baaf3ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9692,8 +9692,10 @@ public void unbindFinished(IBinder token, Intent intent, boolean doRebind) {
96929692
if (DEBUG_SERVICE) Slog.v(TAG, "unbindFinished in " + r
96939693
+ " at " + b + ": apps="
96949694
+ (b != null ? b.apps.size() : 0));
9695+
9696+
boolean inStopping = mStoppingServices.contains(r);
96959697
if (b != null) {
9696-
if (b.apps.size() > 0) {
9698+
if (b.apps.size() > 0 && !inStopping) {
96979699
// Applications have already bound since the last
96989700
// unbind, so just rebind right here.
96999701
requestServiceBindingLocked(r, b, true);
@@ -9704,7 +9706,7 @@ public void unbindFinished(IBinder token, Intent intent, boolean doRebind) {
97049706
}
97059707
}
97069708

9707-
serviceDoneExecutingLocked(r, mStoppingServices.contains(r));
9709+
serviceDoneExecutingLocked(r, inStopping);
97089710

97099711
Binder.restoreCallingIdentity(origId);
97109712
}

0 commit comments

Comments
 (0)