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

Commit f39d86e5 authored by Amy's avatar Amy Committed by Amy Zhang
Browse files

Fix SystemAudioInitiationActionFromAvr state switching.

Test: local test.
Change-Id: I8772399e409ae2b1762921957638958c437746f2
(cherry picked from commit e888cdbf399b3a8554d9e65c9b55e4bbd7089b17)
parent e1a45183
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -25,6 +25,9 @@ public class SystemAudioInitiationActionFromAvr extends HdmiCecFeatureAction {

    // State that waits for <Active Source> once send <Request Active Source>.
    private static final int STATE_WAITING_FOR_ACTIVE_SOURCE = 1;
    // State that waits for TV supporting Audio System Mode or not
    // once received <Active Source>
    private static final int STATE_WAITING_FOR_TV_SUPPORT = 2;
    @VisibleForTesting
    static final int MAX_RETRY_COUNT = 5;

@@ -60,6 +63,7 @@ public class SystemAudioInitiationActionFromAvr extends HdmiCecFeatureAction {
                if (physicalAddress != getSourcePath()) {
                    audioSystem().setActiveSource(cmd.getSource(), physicalAddress);
                }
                mState = STATE_WAITING_FOR_TV_SUPPORT;
                queryTvSystemAudioModeSupport();
                return true;
        }