diff options
| author | 2011-05-25 14:32:00 -0700 | |
|---|---|---|
| committer | 2011-05-25 14:32:00 -0700 | |
| commit | c2d200d4fbf3b0a39bf7518cd9d97afec061c6bb (patch) | |
| tree | a41745673d17a38789b7d24676ef736817daf28b | |
| parent | 266ea6b091d572eaa153e70574da97752b97180b (diff) | |
| parent | 22d789d580a4ab5bed83c0ed698d2f5bc721e176 (diff) | |
Merge "Fix focused application handle. (DO NOT MERGE)" into honeycomb-mr2
| -rw-r--r-- | services/input/InputDispatcher.cpp | 8 | ||||
| -rw-r--r-- | services/jni/com_android_server_InputManager.cpp | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index ce8f076707a9..b67929abd140 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -1198,7 +1198,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, mTempTouchState.copyFrom(mTouchState); } if (wrongDevice) { -#if DEBUG_INPUT_DISPATCHER_POLICY +#if DEBUG_FOCUS LOGD("Dropping event because a pointer for a different device is already down."); #endif injectionResult = INPUT_EVENT_INJECTION_FAILED; @@ -1318,7 +1318,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, // If the pointer is not currently down, then ignore the event. if (! mTempTouchState.down) { -#if DEBUG_INPUT_DISPATCHER_POLICY +#if DEBUG_FOCUS LOGD("Dropping event because the pointer is not down or we previously " "dropped the pointer down event."); #endif @@ -1343,7 +1343,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, } } if (! haveForegroundWindow) { -#if DEBUG_INPUT_DISPATCHER_POLICY +#if DEBUG_FOCUS LOGD("Dropping event because there is no touched foreground window to receive it."); #endif injectionResult = INPUT_EVENT_INJECTION_FAILED; @@ -1360,7 +1360,7 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, if (touchedWindow.targetFlags & InputTarget::FLAG_FOREGROUND) { // If the touched window is paused then keep waiting. if (touchedWindow.window->paused) { -#if DEBUG_INPUT_DISPATCHER_POLICY +#if DEBUG_FOCUS LOGD("Waiting because touched window is paused."); #endif injectionResult = handleTargetsNotReadyLocked(currentTime, entry, diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp index a86b5bd3a9a4..3fb76e40be4d 100644 --- a/services/jni/com_android_server_InputManager.cpp +++ b/services/jni/com_android_server_InputManager.cpp @@ -606,6 +606,7 @@ void NativeInputManager::setFocusedApplication(JNIEnv* env, jobject applicationO android_server_InputApplication_toNative(env, applicationObj, &application); if (application.inputApplicationHandle != NULL) { mInputManager->getDispatcher()->setFocusedApplication(&application); + return; } } mInputManager->getDispatcher()->setFocusedApplication(NULL); |