diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-06-30 15:44:58 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-06-30 15:44:58 -0700 |
commit | 25a98b8e21f7840ae582ce0a4cde21694c4c94ec (patch) | |
tree | f7599e13f67ffaba8b1b888cbd62f420a5a87ebe /native | |
parent | b6643d90e615b871c6d9e41d932a9fcf0d7d2156 (diff) | |
parent | 7f6c6e8ffa3c6e036bf8037012a930e52f54e296 (diff) | |
download | frameworks_base-25a98b8e21f7840ae582ce0a4cde21694c4c94ec.zip frameworks_base-25a98b8e21f7840ae582ce0a4cde21694c4c94ec.tar.gz frameworks_base-25a98b8e21f7840ae582ce0a4cde21694c4c94ec.tar.bz2 |
resolved conflicts for merge of 7f6c6e8f to master
Change-Id: Id9dddb78c51f16ff8c4b60339421c94fde506db2
Diffstat (limited to 'native')
-rw-r--r-- | native/android/input.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/native/android/input.cpp b/native/android/input.cpp index e0544a1..8498840 100644 --- a/native/android/input.cpp +++ b/native/android/input.cpp @@ -225,6 +225,15 @@ int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent) { void AInputQueue_finishEvent(AInputQueue* queue, AInputEvent* event, int handled) { + if (!handled && ((InputEvent*)event)->getType() == INPUT_EVENT_TYPE_KEY + && ((KeyEvent*)event)->hasDefaultAction()) { + // The app didn't handle this, but it may have a default action + // associated with it. We need to hand this back to Java to be + // executed. + queue->doDefaultKey((KeyEvent*)event); + return; + } + int32_t res = queue->getConsumer().sendFinishedSignal(); if (res != android::OK) { LOGW("Failed to send finished signal on channel '%s'. status=%d", |