Skip to content
Commit 39d29383 authored by Yan Han's avatar Yan Han
Browse files

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
parent 6aecb91b
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