Merge "CEC: Implement handleReportArcTermination method"
This commit is contained in:
@@ -49,10 +49,7 @@ public class ArcTerminationActionFromAvr extends HdmiCecFeatureAction {
|
|||||||
switch (cmd.getOpcode()) {
|
switch (cmd.getOpcode()) {
|
||||||
case Constants.MESSAGE_REPORT_ARC_TERMINATED:
|
case Constants.MESSAGE_REPORT_ARC_TERMINATED:
|
||||||
mState = STATE_ARC_TERMINATED;
|
mState = STATE_ARC_TERMINATED;
|
||||||
audioSystem().setArcStatus(false);
|
audioSystem().processArcTermination();
|
||||||
if (audioSystem().getLocalActivePort() == Constants.CEC_SWITCH_ARC) {
|
|
||||||
audioSystem().routeToInputFromPortId(audioSystem().getRoutingPort());
|
|
||||||
}
|
|
||||||
finish();
|
finish();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -570,8 +570,7 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
|
|||||||
@ServiceThreadOnly
|
@ServiceThreadOnly
|
||||||
protected boolean handleReportArcTermination(HdmiCecMessage message) {
|
protected boolean handleReportArcTermination(HdmiCecMessage message) {
|
||||||
assertRunOnServiceThread();
|
assertRunOnServiceThread();
|
||||||
// TODO(amyjojo): implement report arc terminate handler
|
processArcTermination();
|
||||||
HdmiLogger.debug(TAG + "Stub handleReportArcTermination");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -916,6 +915,14 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
|
|||||||
mArcEstablished = enabled;
|
mArcEstablished = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void processArcTermination() {
|
||||||
|
setArcStatus(false);
|
||||||
|
// Switch away from ARC input when ARC is terminated.
|
||||||
|
if (getLocalActivePort() == Constants.CEC_SWITCH_ARC) {
|
||||||
|
routeToInputFromPortId(getRoutingPort());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Switch hardware ARC circuit in the system. */
|
/** Switch hardware ARC circuit in the system. */
|
||||||
@ServiceThreadOnly
|
@ServiceThreadOnly
|
||||||
private void enableAudioReturnChannel(boolean enabled) {
|
private void enableAudioReturnChannel(boolean enabled) {
|
||||||
|
|||||||
Reference in New Issue
Block a user