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

Commit e572319e authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am e23c235c: Merge "Only set KeyEvent long press flag when repeat count equals 1." into gingerbread

* commit 'e23c235c662c3028cfb080c6ed60d7defcdd0b69':
  Only set KeyEvent long press flag when repeat count equals 1.
parents fb8cb428 7a1626f0
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -592,10 +592,6 @@ InputDispatcher::KeyEntry* InputDispatcher::synthesizeKeyRepeatLocked(
    // mKeyRepeatState.lastKeyEntry in addition to the one we return.
    // mKeyRepeatState.lastKeyEntry in addition to the one we return.
    entry->refCount += 1;
    entry->refCount += 1;


    if (entry->repeatCount == 1) {
        entry->flags |= AKEY_EVENT_FLAG_LONG_PRESS;
    }

    mKeyRepeatState.nextRepeatTime = currentTime + keyRepeatDelay;
    mKeyRepeatState.nextRepeatTime = currentTime + keyRepeatDelay;
    return entry;
    return entry;
}
}
@@ -645,6 +641,12 @@ bool InputDispatcher::dispatchKeyLocked(
            resetKeyRepeatLocked();
            resetKeyRepeatLocked();
        }
        }


        if (entry->repeatCount == 1) {
            entry->flags |= AKEY_EVENT_FLAG_LONG_PRESS;
        } else {
            entry->flags &= ~AKEY_EVENT_FLAG_LONG_PRESS;
        }

        entry->dispatchInProgress = true;
        entry->dispatchInProgress = true;
        resetTargetsLocked();
        resetTargetsLocked();