When using AVB, update mute state in AudioService after updating volume
When using absolute volume behavior (AVB), we track the volume and mute state of the AVR independently, as they are treated this way in the CEC protocol. A device can be muted but still remember its previous, nonzero volume level, or be unmuted but with zero volume level. However, volume and mute are not treated independently by AudioService: setting the volume of a stream to zero mutes it, and setting it to a nonzero value unmutes it. Because the current logic doesn't take this into account, the mute state of STREAM_MUSIC can get set to an incorrect value as the result of volume changes. To ensure that STREAM_MUSIC has the correct mute state, this CL makes it so we always set mute state after setting the volume level. Since setting mute state doesn't have the unwanted side-effects of setting volume, we will also set mute instead of volume in order to show volume UI on TVs. Test: atest TvToAudioSystemArcTest TvToAudioSystemEarcTest Bug: 315734798 Change-Id: If9d991a7d9a8d383fab88b731be9d2a1b65d426e
Loading
Please register or sign in to comment