summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java2
-rw-r--r--services/core/java/com/android/server/hdmi/SystemAudioAction.java9
2 files changed, 8 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index 8adb07b..923b87d 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -540,7 +540,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
assertRunOnServiceThread();
HdmiCecDeviceInfo avr = getAvrDeviceInfo();
if (avr == null) {
- invokeCallback(callback, HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE);
+ invokeCallback(callback, HdmiControlManager.RESULT_TARGET_NOT_AVAILABLE);
return;
}
diff --git a/services/core/java/com/android/server/hdmi/SystemAudioAction.java b/services/core/java/com/android/server/hdmi/SystemAudioAction.java
index 01ba9cb..86895cc 100644
--- a/services/core/java/com/android/server/hdmi/SystemAudioAction.java
+++ b/services/core/java/com/android/server/hdmi/SystemAudioAction.java
@@ -78,7 +78,7 @@ abstract class SystemAudioAction extends FeatureAction {
addTimer(mState, mTargetAudioStatus ? ON_TIMEOUT_MS : OFF_TIMEOUT_MS);
} else {
setSystemAudioMode(false);
- finishWithCallback(HdmiControlManager.RESULT_EXCEPTION);
+ finishWithCallback(HdmiControlManager.RESULT_COMMUNICATION_FAILED);
}
}
});
@@ -102,7 +102,12 @@ abstract class SystemAudioAction extends FeatureAction {
final boolean processCommand(HdmiCecMessage cmd) {
switch (mState) {
case STATE_WAIT_FOR_SET_SYSTEM_AUDIO_MODE:
- // TODO: Handle <FeatureAbort> of <SystemAudioModeRequest>
+ if (cmd.getOpcode() == Constants.MESSAGE_FEATURE_ABORT
+ && cmd.getParams()[0] == Constants.MESSAGE_SYSTEM_AUDIO_MODE_REQUEST) {
+ setSystemAudioMode(false);
+ finishWithCallback(HdmiControlManager.RESULT_EXCEPTION);
+ return true;
+ }
if (cmd.getOpcode() != Constants.MESSAGE_SET_SYSTEM_AUDIO_MODE
|| !HdmiUtils.checkCommandSource(cmd, mAvrLogicalAddress, TAG)) {
return false;