RequestArcActionpublic abstract class RequestArcAction extends HdmiCecFeatureAction Base feature action class for <Request ARC Initiation>/<Request ARC Termination>. |
Fields Summary |
---|
private static final String | TAG | protected static final int | STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE | protected final int | mAvrAddress |
Constructors Summary |
---|
RequestArcAction(HdmiCecLocalDevice source, int avrAddress)
super(source);
HdmiUtils.verifyAddressType(getSourceAddress(), HdmiDeviceInfo.DEVICE_TV);
HdmiUtils.verifyAddressType(avrAddress, HdmiDeviceInfo.DEVICE_AUDIO_SYSTEM);
mAvrAddress = avrAddress;
|
Methods Summary |
---|
protected final void | disableArcTransmission()
// Start Set ARC Transmission State action.
SetArcTransmissionStateAction action = new SetArcTransmissionStateAction(localDevice(),
mAvrAddress, false);
addAndStartAction(action);
| final void | handleTimerEvent(int state)
if (mState != state || state != STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE) {
return;
}
HdmiLogger.debug("[T]RequestArcAction.");
disableArcTransmission();
finish();
| boolean | processCommand(HdmiCecMessage cmd)
if (mState != STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE
|| !HdmiUtils.checkCommandSource(cmd, mAvrAddress, TAG)) {
return false;
}
int opcode = cmd.getOpcode();
switch (opcode) {
// Handles only <Feature Abort> here and, both <Initiate ARC> and <Terminate ARC>
// are handled in HdmiControlService itself because both can be
// 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) {
disableArcTransmission();
finish();
return true;
} else {
return false;
}
}
return false;
|
|