From 48a0729d621d55b7b1d256106dbc9421b147ee89 Mon Sep 17 00:00:00 2001 From: Jinsuk Kim Date: Thu, 29 May 2014 06:52:45 +0900 Subject: DO NOT MERGE: Do not reply with to CEC Broadcast message Broadcast message is not targeted to a specific device but for announcement. Individual reponse with is neither necessary nor useful. Changed to send the message back only for direct messages. Change-Id: I927aa8e58a9868e158ed945c753492207e7c97f6 --- .../java/com/android/server/hdmi/HdmiCecController.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'services') diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java index 292f1cd..e0a01f0 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecController.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java @@ -499,14 +499,14 @@ final class HdmiCecController { return; } - // TODO: Use device's source address for broadcast message. - int sourceAddress = message.getDestination() != HdmiCec.ADDR_BROADCAST ? - message.getDestination() : 0; - // Reply to initiator (source) for all requests. - HdmiCecMessage cecMessage = HdmiCecMessageBuilder.buildFeatureAbortCommand - (sourceAddress, message.getSource(), message.getOpcode(), - HdmiCecMessageBuilder.ABORT_REFUSED); - sendCommand(cecMessage, null); + if (message.getDestination() != HdmiCec.ADDR_BROADCAST) { + int sourceAddress = message.getDestination(); + // Reply to initiator (source) for all requests. + HdmiCecMessage cecMessage = HdmiCecMessageBuilder.buildFeatureAbortCommand( + sourceAddress, message.getSource(), message.getOpcode(), + HdmiCecMessageBuilder.ABORT_REFUSED); + sendCommand(cecMessage, null); + } } void sendCommand(HdmiCecMessage cecMessage) { -- cgit v1.1