Skip to content

Commit 7a0d746

Browse files
Dianne HackbornAndroid Git Automerger
authored andcommitted
am baaf3ce: Merge "Handle stopping of services with still bound applications."
* commit 'baaf3ce6385da0f9f5ff6e2195e26c339ee9949e': Handle stopping of services with still bound applications.
2 parents b654e6e + baaf3ce commit 7a0d746

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)