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

Commit 65789dd7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "inputflinger: Rework previous fix for KCM" into main

parents 2f2d6c3c 956a6cee
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -662,12 +662,10 @@ bool EventHub::Device::hasKeycodeLocked(int keycode) const {
    if (hasKeycodeInternalLocked(keycode)) {
        return true;
    }
    // Check the key character map first. Not all input devices will have one.
    const std::shared_ptr<KeyCharacterMap> kcm = getKeyCharacterMap();
    if (kcm == nullptr) {
    if (!keyMap.haveKeyCharacterMap()) {
        return false;
    }
    for (auto& fromKey : kcm->findKeyCodesMappedToKeyCode(keycode)) {
    for (auto& fromKey : getKeyCharacterMap()->findKeyCodesMappedToKeyCode(keycode)) {
        if (hasKeycodeInternalLocked(fromKey)) {
            return true;
        }