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
Loading
Please register or sign in to comment