* commit '7bf039b67c89ac07a1b90d048bf1e4ff0e121ab8': CEC: Discard key event to itself
This commit is contained in:
@@ -432,11 +432,15 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<SendKeyAction> action = getActions(SendKeyAction.class);
|
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()) {
|
if (!action.isEmpty()) {
|
||||||
action.get(0).processKeyEvent(keyCode, isPressed);
|
action.get(0).processKeyEvent(keyCode, isPressed);
|
||||||
} else {
|
} else {
|
||||||
if (isPressed) {
|
if (isPressed) {
|
||||||
int logicalAddress = findKeyReceiverAddress();
|
|
||||||
if (logicalAddress != Constants.ADDR_INVALID) {
|
if (logicalAddress != Constants.ADDR_INVALID) {
|
||||||
addAndStartAction(new SendKeyAction(this, logicalAddress, keyCode));
|
addAndStartAction(new SendKeyAction(this, logicalAddress, keyCode));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user