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

Commit f4b66f62 authored by Amy's avatar Amy Committed by shubang
Browse files

Fix feature abort command handlers.

ag/5483701

Note that we should check if the feature abort is on the message we are
targeting on. There could be some other feature abort show up during the
Action.

Test: manual
Change-Id: Ieac90874595fc3810e0d7a62c06cb113d52323bb
parent 291a2a3c
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -51,6 +51,13 @@ public class ArcInitiationActionFromAvr extends HdmiCecFeatureAction {
        }
        }
        switch (cmd.getOpcode()) {
        switch (cmd.getOpcode()) {
            case Constants.MESSAGE_FEATURE_ABORT:
            case Constants.MESSAGE_FEATURE_ABORT:
                if ((cmd.getParams()[0] & 0xFF) == Constants.MESSAGE_INITIATE_ARC) {
                    audioSystem().setArcStatus(false);
                    finish();
                    return true;
                } else {
                    return false;
                }
            case Constants.MESSAGE_REPORT_ARC_TERMINATED:
            case Constants.MESSAGE_REPORT_ARC_TERMINATED:
                audioSystem().setArcStatus(false);
                audioSystem().setArcStatus(false);
                finish();
                finish();
+4 −2
Original line number Original line Diff line number Diff line
@@ -50,9 +50,11 @@ public class DetectTvSystemAudioModeSupportAction extends HdmiCecFeatureAction {
            if (mState != STATE_WAITING_FOR_FEATURE_ABORT) {
            if (mState != STATE_WAITING_FOR_FEATURE_ABORT) {
                return false;
                return false;
            }
            }
            if ((cmd.getParams()[0] & 0xFF) == Constants.MESSAGE_SET_SYSTEM_AUDIO_MODE) {
                finishAction(false);
                finishAction(false);
                return true;
                return true;
            }
            }
        }
        return false;
        return false;
    }
    }