diff options
author | Jinsuk Kim <jinsukkim@google.com> | 2015-04-16 23:33:46 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-16 23:33:49 +0000 |
commit | f8e24ccf374ff4c0e41ffa0ff474f90b3c9cf1a2 (patch) | |
tree | 6fb22f40a275e805fe5d39e927d2b74cb638fc73 /services/core/java/com/android/server/hdmi | |
parent | d01242946eb7423612998b5bdbc71a6a1b3e8581 (diff) | |
parent | 087839755d311b09f40a1b9db1d09c9c8bdf9872 (diff) | |
download | frameworks_base-f8e24ccf374ff4c0e41ffa0ff474f90b3c9cf1a2.zip frameworks_base-f8e24ccf374ff4c0e41ffa0ff474f90b3c9cf1a2.tar.gz frameworks_base-f8e24ccf374ff4c0e41ffa0ff474f90b3c9cf1a2.tar.bz2 |
Merge "CEC: Do not terminate ARC on send error busy"
Diffstat (limited to 'services/core/java/com/android/server/hdmi')
-rw-r--r-- | services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java b/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java index d200d35..9b4950b 100644 --- a/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java +++ b/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java @@ -54,7 +54,7 @@ final class SetArcTransmissionStateAction extends HdmiCecFeatureAction { boolean start() { // Seq #37. if (mEnabled) { - // Enable ARC status immediately after sending <Report Arc Initiated>. + // Enable ARC status immediately before sending <Report Arc Initiated>. // If AVR responds with <Feature Abort>, disable ARC status again. // This is different from spec that says that turns ARC status to // "Enabled" if <Report ARC Initiated> is acknowledged and no @@ -80,12 +80,21 @@ final class SetArcTransmissionStateAction extends HdmiCecFeatureAction { sendCommand(command, new HdmiControlService.SendMessageCallback() { @Override public void onSendCompleted(int error) { - if (error != Constants.SEND_RESULT_SUCCESS) { - // If fails to send <Report ARC Initiated>, disable ARC and - // send <Report ARC Terminated> directly. - setArcStatus(false); - HdmiLogger.debug("Failed to send <Report Arc Initiated>."); - finish(); + switch (error) { + case Constants.SEND_RESULT_SUCCESS: + case Constants.SEND_RESULT_BUSY: + case Constants.SEND_RESULT_FAILURE: + // The result of the command transmission, unless it is an obvious + // failure indicated by the target device (or lack thereof), should + // not affect the ARC status. Ignores it silently. + break; + case Constants.SEND_RESULT_NAK: + // If <Report ARC Initiated> is negatively ack'ed, disable ARC and + // send <Report ARC Terminated> directly. + setArcStatus(false); + HdmiLogger.debug("Failed to send <Report Arc Initiated>."); + finish(); + break; } } }); |