Skip to content

Commit 51beb81

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

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10451,8 +10451,10 @@ public void unbindFinished(IBinder token, Intent intent, boolean doRebind) {
1045110451
if (DEBUG_SERVICE) Slog.v(TAG, "unbindFinished in " + r
1045210452
+ " at " + b + ": apps="
1045310453
+ (b != null ? b.apps.size() : 0));
10454+
10455+
boolean inStopping = mStoppingServices.contains(r);
1045410456
if (b != null) {
10455-
if (b.apps.size() > 0) {
10457+
if (b.apps.size() > 0 && !inStopping) {
1045610458
// Applications have already bound since the last
1045710459
// unbind, so just rebind right here.
1045810460
requestServiceBindingLocked(r, b, true);
@@ -10463,7 +10465,7 @@ public void unbindFinished(IBinder token, Intent intent, boolean doRebind) {
1046310465
}
1046410466
}
1046510467

10466-
serviceDoneExecutingLocked(r, mStoppingServices.contains(r));
10468+
serviceDoneExecutingLocked(r, inStopping);
1046710469

1046810470
Binder.restoreCallingIdentity(origId);
1046910471
}

0 commit comments

Comments
 (0)