Skip to content
Commit ed967437 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

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
Bug: 271473257
Test: atest android.media.audio.cts.AudioDeviceVolumeManagerTest#testSetGetVolume
Change-Id: Ibfa002b51f02302686853a8dea562e75d12d8949
parent 011d00e1
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