Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6fc42ae authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Android Git Automerger
Browse files

am 7bf039b6: am 9c5ccc36: Merge "CEC: Discard key event to itself" into lmp-mr1-dev

* commit '7bf039b6':
  CEC: Discard key event to itself
parents 7e79bdb4 7bf039b6
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;