Fix system server crash on receiving <Report Audio Status>
This crash occurs when enabling absolute volume behavior, when we receive <Report Audio Status> with an out-of-bounds volume level. This is parsed as a negative error code, which causes HdmiControlService to attempt to construct a VolumeInfo with a negative volume. This throws an IllegalArgumentException. To fix this, we ignore <Report Audio Status> messages with out-of-bounds volume levels. To help prevent future issues, we also enforce that the AudioStatus object can only represent volume levels in the [0, 100] range. Bug: 281821462 Test: atest TvToAudioSystemAvcTest PlaybackDeviceToTvAvcTest PlaybackDeviceToAudioSystemAvcTest Change-Id: I31dc0fd58da511262d829a10f7f03a4f0c99c05d
Loading
Please register or sign in to comment