am 7bf039b6: am 9c5ccc36: Merge "CEC: Discard key event to itself" into lmp-mr1-dev
automerge: a6fc42a
* commit 'a6fc42aec58ab0d2dbb96f37d40e597bc39631fa':
CEC: Discard key event to itself
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index 5c1c5bb..8241cdc 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -432,11 +432,15 @@
return;
}
List<SendKeyAction> action = getActions(SendKeyAction.class);
+ int logicalAddress = findKeyReceiverAddress();
+ if (logicalAddress == mAddress) {
+ Slog.w(TAG, "Discard key event to itself :" + keyCode + " pressed:" + isPressed);
+ return;
+ }
if (!action.isEmpty()) {
action.get(0).processKeyEvent(keyCode, isPressed);
} else {
if (isPressed) {
- int logicalAddress = findKeyReceiverAddress();
if (logicalAddress != Constants.ADDR_INVALID) {
addAndStartAction(new SendKeyAction(this, logicalAddress, keyCode));
return;