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

AudioService: fix volume initialization on first ever boot

When HDMI is connected, it calls checkFixedVolumeDevices() that
  iterates over the devices in the volume index map to set them
  at max index. But since the map only contains DEVICE_OUT_DEFAULT
  after a factory reset, VolumeStreamState.checkFixedVolumeDevices()
  doesn't do anything for DEVICE_OUT_HDMI because it is not in the map.
The fix consists in adding the new device in the volume map for a
  connection, and initializing its volume with the default volume,
  VolumeStreamState.checkFixedVolumeDevices() will in turn update
  the volume to max if needed (reads mask or full/fix vol devices).

Bug: 130766100
Test: factory reset device and start playback, check HDMI volume with dumpsys audio
Change-Id: I4c338df6acc1e15af9606694cdbd485d1b991bb5
parent 885109a4
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