DO NOT MERGE setDeviceVolume: better logs, clears routing cache
When a call to setDeviceVolume is received, clear the
AudioSystemAdapter cache for the AudioAttributes to
audio device. This will eliminate any chance of the
cache being stale when the evaluation of whether to
send the VOLUME_CHANGED_ACTION intent is performed.
Clean up log calls to setDeviceVolume, use a dedicated
logger event, and also log the current device selected by
getDevicesForStream.
Don't send volume update to VolumeController (sysUI) when a
device was specified (== call comes from setDeviceVolume).
Fix code path in AudioDeviceBroker where its calls to
AudioSystem.setForceUse were going directly to
AudioSystem, instead of going through the adapter (which
causes a cache clear, whereas it didn't in Broker). This
is done by injecting into AudioDeviceBroker the same
AudioSystemAdapter that AudioService uses.
Fix AudioService's obsolete use of ANALOG_DOCK, replaced
by DIGITAL_DOCK.
Bug: 264302812
Test: boot with device docked, adjust volume
Change-Id: Ibfa002b51f02302686853a8dea562e75d12d8949
5 files changed