diff options
author | Jinsuk Kim <jinsukkim@google.com> | 2015-01-29 22:33:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-29 22:33:43 +0000 |
commit | 9c5ccc3684e55e0ce7f2940bd13dfd7acdf85895 (patch) | |
tree | b75fe20b5e787346b6f17b2bfaf633f6992bee35 /services/core/java/com/android/server/hdmi | |
parent | dbdaea0c6d44ead142f42ac060af2f5cd7f942ac (diff) | |
parent | 454fab52195f86d08d0b7626ed170af113e44695 (diff) | |
download | frameworks_base-9c5ccc3684e55e0ce7f2940bd13dfd7acdf85895.zip frameworks_base-9c5ccc3684e55e0ce7f2940bd13dfd7acdf85895.tar.gz frameworks_base-9c5ccc3684e55e0ce7f2940bd13dfd7acdf85895.tar.bz2 |
Merge "CEC: Discard key event to itself" into lmp-mr1-dev
Diffstat (limited to 'services/core/java/com/android/server/hdmi')
-rw-r--r-- | services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java | 6 |
1 files changed, 5 insertions, 1 deletions
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 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { 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; |