diff options
| author | 2011-03-03 14:42:14 -0800 | |
|---|---|---|
| committer | 2011-03-03 14:42:14 -0800 | |
| commit | 7a1626f0375daf30cbb3f29ce52ce8b67fc2e78e (patch) | |
| tree | 186901ee6cb98c8c9b0e98378d51549ad5736a71 /libs/ui/InputDispatcher.cpp | |
| parent | 129c27d64dff391c3453b09c8e872faa1289e5cd (diff) | |
| parent | ec7fb80775b49244a8c3faff5b3c91c32a8b9359 (diff) | |
Merge "Only set KeyEvent long press flag when repeat count equals 1." into gingerbread
Diffstat (limited to 'libs/ui/InputDispatcher.cpp')
| -rw-r--r-- | libs/ui/InputDispatcher.cpp | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp index 421ad663f8..46baf9d14f 100644 --- a/libs/ui/InputDispatcher.cpp +++ b/libs/ui/InputDispatcher.cpp @@ -592,10 +592,6 @@ InputDispatcher::KeyEntry* InputDispatcher::synthesizeKeyRepeatLocked(      // mKeyRepeatState.lastKeyEntry in addition to the one we return.      entry->refCount += 1; -    if (entry->repeatCount == 1) { -        entry->flags |= AKEY_EVENT_FLAG_LONG_PRESS; -    } -      mKeyRepeatState.nextRepeatTime = currentTime + keyRepeatDelay;      return entry;  } @@ -645,6 +641,12 @@ bool InputDispatcher::dispatchKeyLocked(              resetKeyRepeatLocked();          } +        if (entry->repeatCount == 1) { +            entry->flags |= AKEY_EVENT_FLAG_LONG_PRESS; +        } else { +            entry->flags &= ~AKEY_EVENT_FLAG_LONG_PRESS; +        } +          entry->dispatchInProgress = true;          resetTargetsLocked();  |