audio policy: output selection upon dynamic policy registration
Force reevalution of output selection for AudioTrack clients when a
dynamic audio policy (DAP) of type RENDER is registered or unregistered.
For LOOPBACK policies, this is not needed because the remote submix
device is connected or disconnected triggering output reevaluation.
Also refactor checkOutputForAttributes to take actual output selection
for each client associated to a DAP instead of blindly forcing stream
invalidation as soon as an output associated with a DAP is found.
This covers direct outputs as the output is not opened when the DAP
is registered.
Bug: 130296239
Test: AudioHostTest
Test: AudioServiceHostTest
Test: audiopolicy_tests
Test: regression with auto projected mode and live caption
Change-Id: I07977e7902eb31c59621462a8fe2d7d1a4b1ba36
4 files changed