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

AudioDeviceInventory: add cache for preferred device roles

Add a cache for the last selected devices role (disabled/preferred)
for any strategy or capture preset.
This avoids redundant and frequent rerouting requests sent to audio
policy manager causing delays and glitches in audio playback and
capture.

Bug: 276386807
Bug: 265077417
Test: atest NonDefaultDeviceForStrategyTest
Test: atest AudioManagerTest#testPreferredDevicesForStrategy
Test: atest AudioManagerTest#testPreferredDeviceForCapturePreset

Change-Id: Id3e9efe1277b41c94a799e032148574da85f5ea7
parent 4048e343
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