Skip to content
Commit 4fa63363 authored by Yan Han's avatar Yan Han
Browse files

TV: Fix infinite mute/unmute cycle on connected AVR

When using absolute volume behavior, if HdmiControlService notifies
AudioService of a change in the mute state of a CEC-connected AVR,
AudioService can tell HdmiControlService to toggle the AVR's mute,
which changes its mute state and causes an infinite cycle.

To fix this, AudioService should not call sendVolumeKeyEvent when
using absolute volume behavior or its variants - in this state, the key
event is instead triggered by dispatchAbsoluteVolumeChanged.

This bug was introduced in aosp/2583221 when the conditions for sending
a volume key event were changed to no longer require full volume
behavior. This can be seen as a follow up to that CL.

To prevent volume updates from a bluetooth device from affecting the
CEC-connected AVR, we also disallow sendVolumeKeyEvent on TVs when
using a2dp absolute volume. This change is consistent with the behavior
before aosp/2583221, when full volume was required.

Bug: 290617287
Test: manual
Change-Id: I53a952656dbb3af6badba8e92007ed7343eaa7ec
parent 5c22f17c
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