summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJinsuk Kim <jinsukkim@google.com>2015-01-29 22:44:51 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-29 22:44:51 +0000
commita6fc42aec58ab0d2dbb96f37d40e597bc39631fa (patch)
treee1d4fe222f7166e28b795f57e95b15956b54ddad /services
parent7e79bdb494b51175d9873f82f4ca8488ac6fccfa (diff)
parent7bf039b67c89ac07a1b90d048bf1e4ff0e121ab8 (diff)
downloadframeworks_base-a6fc42aec58ab0d2dbb96f37d40e597bc39631fa.zip
frameworks_base-a6fc42aec58ab0d2dbb96f37d40e597bc39631fa.tar.gz
frameworks_base-a6fc42aec58ab0d2dbb96f37d40e597bc39631fa.tar.bz2
am 7bf039b6: am 9c5ccc36: Merge "CEC: Discard key event to itself" into lmp-mr1-dev
* commit '7bf039b67c89ac07a1b90d048bf1e4ff0e121ab8': CEC: Discard key event to itself
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java6
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;