Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82e0f752 authored by an.xi's avatar an.xi Committed by Paul Colta
Browse files

cec: Reset system audio mode status carefully [2/2]



PD#OTT-40245
BUG=266766058

Problem:
When there is a transmission error with <GIVE SYSTEM
AUDIO MODE STATUS> caused by cec busyness, playback
could reset the audio mode status and does not send
volume keyevents to the audio system then.

Solution:
Reset system audio mode status only with error NACK,
which means the target device is not connected.

Verify:
Walmart

Test: presubmits

Change-Id: Ife26b2251f40ee11cdbc86fe0797d29a74fb9be5
Signed-off-by: default avataran.xi <an.xi@amlogic.com>
parent fceaa70d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -110,7 +110,8 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource {
                    new SendMessageCallback() {
                        @Override
                        public void onSendCompleted(int error) {
                            if (error != SendMessageResult.SUCCESS) {
                            // In consideration of occasional transmission failures.
                            if (error == SendMessageResult.NACK) {
                                HdmiLogger.debug(
                                        "AVR did not respond to <Give System Audio Mode Status>");
                                mService.setSystemAudioActivated(false);