OSDN Git Service

Hopefully fix issue #25153459: Sandboxed_process1 thrashing
authorDianne Hackborn <hackbod@google.com>
Thu, 22 Oct 2015 00:12:53 +0000 (17:12 -0700)
committerDianne Hackborn <hackbod@google.com>
Thu, 22 Oct 2015 00:15:37 +0000 (17:15 -0700)
commit865907db099eed08cac7ab177161361f5c82e656
treeedecb4034deb82fed9008efac616b4e509845196
parentb8cfc12c3f0b83e9d00b1f324be4ff5c977645ce
Hopefully fix issue #25153459: Sandboxed_process1 thrashing

There is a race where if you unbind to a service before its
process has come up, we would leave the service record active
and keep it running.  Fix this by checking the service state
after its process up and proceed to bring it down if it is no
longer needed.

Also added a similar check when restarting a service, just in
case there are other ways we can get into this situation.

And while I am at it, I tweaked the broadcast queue dump output
a bit to hopefully make it a lot easier to figure out how long
it is taking to process broadcasts.

Change-Id: I46b98f1fe394ab8039ea4cc81fb5d3afb6391a31
services/core/java/com/android/server/am/ActiveServices.java
services/core/java/com/android/server/am/BroadcastQueue.java
services/core/java/com/android/server/am/BroadcastRecord.java