summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJungshik Jang <jayjang@google.com>2014-07-17 13:58:14 +0900
committerJungshik Jang <jayjang@google.com>2014-07-17 13:58:14 +0900
commit1827fdcbf6a53378f05620790e4798201341097b (patch)
tree1aded609635eead6a287a64642abb082344927bf /services
parentd10b2f17a1ef2773932e9594a7569627426bb823 (diff)
downloadframeworks_base-1827fdcbf6a53378f05620790e4798201341097b.zip
frameworks_base-1827fdcbf6a53378f05620790e4798201341097b.tar.gz
frameworks_base-1827fdcbf6a53378f05620790e4798201341097b.tar.bz2
Do no send <Feature Abort> as response of <Feature Abort>
Cec service replies <Feature Abort> back to original device if incoming message is not handled by any of feature action or device. It's applied to <Feature Abort> message itself, but it can cause weird sideeffect of it. This change just ignore <Feature Abort> even though it's not handled by any of local device or feature actions. Bug: 16359564 Change-Id: I925e89ca4db49a637dd296447c04eee1ba679c6b
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecController.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java
index 72519f2..cbccc1d 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecController.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java
@@ -506,15 +506,20 @@ final class HdmiCecController {
&& mService.handleCecCommand(message)) {
return;
}
-
- if (message.getDestination() != Constants.ADDR_BROADCAST) {
- int sourceAddress = message.getDestination();
- // Reply <Feature Abort> to initiator (source) for all requests.
- HdmiCecMessage cecMessage = HdmiCecMessageBuilder.buildFeatureAbortCommand(
- sourceAddress, message.getSource(), message.getOpcode(),
- Constants.ABORT_REFUSED);
- sendCommand(cecMessage);
+ if (message.getDestination() == Constants.ADDR_BROADCAST) {
+ return;
}
+ if (message.getOpcode() == Constants.MESSAGE_FEATURE_ABORT) {
+ Slog.v(TAG, "Unhandled <Feature Abort> message:" + message);
+ return;
+ }
+
+ int sourceAddress = message.getDestination();
+ // Reply <Feature Abort> to initiator (source) for all requests.
+ HdmiCecMessage cecMessage = HdmiCecMessageBuilder.buildFeatureAbortCommand(
+ sourceAddress, message.getSource(), message.getOpcode(),
+ Constants.ABORT_REFUSED);
+ sendCommand(cecMessage);
}
@ServiceThreadOnly