AudioTrack: fix race condition between start and restore
There is a small window in AudioTrack::start where it is possible that a concurrent track invalidation yields to rejecting the start request and leave the track paused when later restored. To avoid this race, return DEAD_OBJECT from AudioPolicyManager::startOutput() if the output is already closed. This aligns the behavior with startInput(). Also apply the same behavior to stopOutput() and stopInput() for consistency. Apply the same fix to AudioRecord. Bug: 367917846 Test: make Flag: EXEMPT bug fix Change-Id: I1c2051a2d7e58042cde5166914c68a081cd4bb49
Loading
Please register or sign in to comment