Skip to content
Commit ca35e482 authored by Eric Laurent's avatar Eric Laurent
Browse files

Fix media server restart detection mechanism

There is a flaw in the mechanism used by AudioService
to detect the fact that mediaserver process did crash and restart.
It relies on polling AudioFlinger service until a successful
connection triggers a callback into AudioSystem JNI and then into AudioService.
But if another thread in system_server process, not attached to the
JNI environment, reconnects before AudioService, the callback is called in
a detached context and dropped.

The fix consists in attaching the thread executing the callback
and detaching it if needed.

Bug: 9693068.
Change-Id: I184308b12a3f87653bf818abf0159e0e45a66ef0
parent 713412fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment