History log of /frameworks/base/services/core/java/com/android/server/am/InstrumentationReporter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6e3eb8e5fd07c7396104f398966ad2be71caf8ee 08-Mar-2016 Dianne Hackborn <hackbod@google.com> Fix issue #27408705: Runtime restart: WATCHDOG KILLING SYSTEM PROCESS...

...Blocked in monitor com.android.s

There was a change awhile ago to make the IInstrumentationWatcher
callbacks synchronous, to avoid issues with them spamming non-responsive
watches and filling the binder transfer buffer. However, you can't
just do this, because the activity manager calls these with its
lock held.

To allow them to stay synchronous with the activity manager getting
blocked on the watcher, introduce a new thread for dispatching calls
to the watcher. This thread is created as needed, and dispatches
a queue of callback commands to make to instrumentation watchers.
The callback is still synchronous, so it won't dispatch a new one
until the previous completes.

Change-Id: I8384bd475a1a004c567a4ae20ea64385244f45c5
/frameworks/base/services/core/java/com/android/server/am/InstrumentationReporter.java