audio policy: improve sharing input logic to prevent temp unrouting
When a client is active on an input with a given input source, and when another client is starting on the same input profile with same source (so same priority), the first client input will be closed. If the client is using AudioRecord, it will recover by restoreRecord, and hence (re) started in the same input as the preemptor. Input will now be "reused" (and not "closed") as the current client was set as the preemptor. Bug: 303079083 Test: atest audiopolicy_tests:AudioPolicyManagerInputPreemptionTest Flag: com.android.media.audioserver.fix_input_sharing_logic Signed-off-by:François Gaffie <francois.gaffie@ampere.cars> (cherry picked from https://android-review.googlesource.com/q/commit:2a68ef65fa01aa737bc528f7d4329f5d1909b2b1) Merged-In: I68ef45833fd04886b80c6f7610043e6ba37036cd Change-Id: I68ef45833fd04886b80c6f7610043e6ba37036cd
Loading
Please register or sign in to comment