Merge "Handle stopping of services with still bound applications."
This commit is contained in:
@@ -9692,8 +9692,10 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
if (DEBUG_SERVICE) Slog.v(TAG, "unbindFinished in " + r
|
if (DEBUG_SERVICE) Slog.v(TAG, "unbindFinished in " + r
|
||||||
+ " at " + b + ": apps="
|
+ " at " + b + ": apps="
|
||||||
+ (b != null ? b.apps.size() : 0));
|
+ (b != null ? b.apps.size() : 0));
|
||||||
|
|
||||||
|
boolean inStopping = mStoppingServices.contains(r);
|
||||||
if (b != null) {
|
if (b != null) {
|
||||||
if (b.apps.size() > 0) {
|
if (b.apps.size() > 0 && !inStopping) {
|
||||||
// Applications have already bound since the last
|
// Applications have already bound since the last
|
||||||
// unbind, so just rebind right here.
|
// unbind, so just rebind right here.
|
||||||
requestServiceBindingLocked(r, b, true);
|
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);
|
Binder.restoreCallingIdentity(origId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user