File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -592,10 +592,6 @@ InputDispatcher::KeyEntry* InputDispatcher::synthesizeKeyRepeatLocked(
592592 // mKeyRepeatState.lastKeyEntry in addition to the one we return.
593593 entry->refCount += 1 ;
594594
595- if (entry->repeatCount == 1 ) {
596- entry->flags |= AKEY_EVENT_FLAG_LONG_PRESS;
597- }
598-
599595 mKeyRepeatState .nextRepeatTime = currentTime + keyRepeatDelay;
600596 return entry;
601597}
@@ -645,6 +641,12 @@ bool InputDispatcher::dispatchKeyLocked(
645641 resetKeyRepeatLocked ();
646642 }
647643
644+ if (entry->repeatCount == 1 ) {
645+ entry->flags |= AKEY_EVENT_FLAG_LONG_PRESS;
646+ } else {
647+ entry->flags &= ~AKEY_EVENT_FLAG_LONG_PRESS;
648+ }
649+
648650 entry->dispatchInProgress = true ;
649651 resetTargetsLocked ();
650652
You can’t perform that action at this time.
0 commit comments