Merge "CEC: Do not send <ARC Terminated> when init request gets rejected"
This commit is contained in:
@@ -58,14 +58,16 @@ abstract class RequestArcAction extends HdmiCecFeatureAction {
|
||||
// received without <Request ARC Initiation> or <Request ARC Termination>.
|
||||
case Constants.MESSAGE_FEATURE_ABORT:
|
||||
int originalOpcode = cmd.getParams()[0] & 0xFF;
|
||||
if (originalOpcode == Constants.MESSAGE_REQUEST_ARC_INITIATION
|
||||
|| originalOpcode == Constants.MESSAGE_REQUEST_ARC_TERMINATION) {
|
||||
if (originalOpcode == Constants.MESSAGE_REQUEST_ARC_TERMINATION) {
|
||||
disableArcTransmission();
|
||||
finish();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
} else if (originalOpcode == Constants.MESSAGE_REQUEST_ARC_INITIATION) {
|
||||
tv().setArcStatus(false);
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -82,7 +84,7 @@ abstract class RequestArcAction extends HdmiCecFeatureAction {
|
||||
if (mState != state || state != STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE) {
|
||||
return;
|
||||
}
|
||||
HdmiLogger.debug("[T]RequestArcAction.");
|
||||
HdmiLogger.debug("[T] RequestArcAction.");
|
||||
disableArcTransmission();
|
||||
finish();
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ final class RequestArcInitiationAction extends RequestArcAction {
|
||||
|
||||
@Override
|
||||
boolean start() {
|
||||
// Seq #38
|
||||
mState = STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE;
|
||||
addTimer(mState, HdmiConfig.TIMEOUT_MS);
|
||||
|
||||
@@ -44,9 +45,8 @@ final class RequestArcInitiationAction extends RequestArcAction {
|
||||
@Override
|
||||
public void onSendCompleted(int error) {
|
||||
if (error != Constants.SEND_RESULT_SUCCESS) {
|
||||
// If failed to send <Request ARC Initiation>, start "Disabled"
|
||||
// ARC transmission action.
|
||||
disableArcTransmission();
|
||||
// Turn off ARC status if <Request ARC Initiation> fails.
|
||||
tv().setArcStatus(false);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ final class SetArcTransmissionStateAction extends HdmiCecFeatureAction {
|
||||
|
||||
@Override
|
||||
boolean start() {
|
||||
// Seq #37.
|
||||
if (mEnabled) {
|
||||
// Enable ARC status immediately after sending <Report Arc Initiated>.
|
||||
// If AVR responds with <Feature Abort>, disable ARC status again.
|
||||
|
||||
Reference in New Issue
Block a user