summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@android.com> 2011-08-16 20:39:50 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2011-08-16 20:39:50 -0700
commit7a0d746bf2eaca4ff9d150e2cd2604b72ec5a2cb (patch)
treef6b931f4fd512a0181b9817d70e1bc6966e2228f
parentb654e6e55a3e8d7e8c2e0b8b1ff4bb4f76c10e05 (diff)
parentbaaf3ce6385da0f9f5ff6e2195e26c339ee9949e (diff)
am baaf3ce6: Merge "Handle stopping of services with still bound applications."
* commit 'baaf3ce6385da0f9f5ff6e2195e26c339ee9949e': Handle stopping of services with still bound applications.
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 854f96d55398..d6664e3622b6 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -9692,8 +9692,10 @@ public final class ActivityManagerService extends ActivityManagerNative
if (DEBUG_SERVICE) Slog.v(TAG, "unbindFinished in " + r
+ " at " + b + ": apps="
+ (b != null ? b.apps.size() : 0));
+
+ boolean inStopping = mStoppingServices.contains(r);
if (b != null) {
- if (b.apps.size() > 0) {
+ if (b.apps.size() > 0 && !inStopping) {
// Applications have already bound since the last
// unbind, so just rebind right here.
requestServiceBindingLocked(r, b, true);
@@ -9704,7 +9706,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}
- serviceDoneExecutingLocked(r, mStoppingServices.contains(r));
+ serviceDoneExecutingLocked(r, inStopping);
Binder.restoreCallingIdentity(origId);
}