OSDN Git Service

Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
authorDianne Hackborn <hackbod@google.com>
Mon, 9 Dec 2013 19:26:11 +0000 (11:26 -0800)
committerDianne Hackborn <hackbod@google.com>
Tue, 14 Jan 2014 01:10:03 +0000 (17:10 -0800)
commitc174288d345d4a80b326b12ff4c10a6c99570997
tree75f52ce293fbace9b41212f50f95e21c6e09269b
parent301b1facb23d148efebd7a2aa5c174cd7c04cc6f
Fix issue #12031685: Sticky Service Breakage in Android 4.4.1

Got a little too aggressive about cleaning up service state; need to
avoid removing services from an app until we are in the second loop
doing the final cleanup, otherwise we can leave services around with
restarting their process.

Also fix crash:

W/BinderNative(  667): Uncaught exception from death notification
W/BinderNative(  667): java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
W/BinderNative(  667):  at android.util.ArraySet.valueAt(ArraySet.java:301)
W/BinderNative(  667):  at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:2069)
W/BinderNative(  667):  at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:12412)
W/BinderNative(  667):  at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3596)
W/BinderNative(  667):  at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3744)
W/BinderNative(  667):  at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1024)
W/BinderNative(  667):  at android.os.BinderProxy.sendDeathNotice(Binder.java:493)
W/BinderNative(  667):  at dalvik.system.NativeStart.run(Native Method)
services/java/com/android/server/am/ActiveServices.java