AAudio: do not call to aaudio service when the binder has dead.
When aaudio service has dead, the client should not call to service as its stream handle may be reassigned to a new stream. Instead, when there is binder death, the stream should be in disconnected state, there should be an error callback fired. In AAudioBinderAdapter, it takes a service lifetime id as a reference to current aaudio service. When there is binder death, the service id will be increased by 1. When AAudioBinderAdapter finds the service id provided by the client is different from its own service id, it should reject the request. When a MMAP stream is open, it receives a service lifetime id to recognize the service that it connects to. When processing data, the client will return AAUDIO_ERROR_DISCONNECTED if current service lifetime id is different from the one it cached. Bug: 269531552 Test: repo steps in the bug Test: atest AAudioTests Test: oboeservice_fuzzer Change-Id: Ieddd89fa2e23ad56d34a7fbccb8fb9a70917330e
Loading
Please register or sign in to comment