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

Commit e71f055d authored by Evan Rosky's avatar Evan Rosky
Browse files

Fully strip META state during event rewrite

Bug: 36288555
Test: Logged keys coming into PhoneWindowManager to verify that
      meta state is stripped.

Change-Id: If51210517845464de185997f7c71a3888ee6af56
parent f31958f2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2416,7 +2416,7 @@ void InputDispatcher::notifyKey(const NotifyKeyArgs* args) {
            struct KeyReplacement replacement = {keyCode, args->deviceId};
            mReplacedKeys.add(replacement, newKeyCode);
            keyCode = newKeyCode;
            metaState &= ~AMETA_META_ON;
            metaState &= ~(AMETA_META_ON | AMETA_META_LEFT_ON | AMETA_META_RIGHT_ON);
        }
    } else if (args->action == AKEY_EVENT_ACTION_UP) {
        // In order to maintain a consistent stream of up and down events, check to see if the key
@@ -2428,7 +2428,7 @@ void InputDispatcher::notifyKey(const NotifyKeyArgs* args) {
        if (index >= 0) {
            keyCode = mReplacedKeys.valueAt(index);
            mReplacedKeys.removeItemsAt(index);
            metaState &= ~AMETA_META_ON;
            metaState &= ~(AMETA_META_ON | AMETA_META_LEFT_ON | AMETA_META_RIGHT_ON);
        }
    }