diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-12-23 12:43:48 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-12-23 12:43:48 -0800 |
commit | fa93584a4fab6ca8d9348658dc30cedf76891753 (patch) | |
tree | 929293fba0d2bedf4007bf6d61f7fb4b45c0d46d /services | |
parent | 6023873463331d30b7ed12942c3323f1b6975ed8 (diff) | |
parent | c6f2b3b302c06b8b7b81ec7e3a43a7df1813d0e0 (diff) | |
download | frameworks_base-fa93584a4fab6ca8d9348658dc30cedf76891753.zip frameworks_base-fa93584a4fab6ca8d9348658dc30cedf76891753.tar.gz frameworks_base-fa93584a4fab6ca8d9348658dc30cedf76891753.tar.bz2 |
am c6f2b3b3: Merge "Fix policy issues when screen is off. (DO NOT MERGE)" into gingerbread
* commit 'c6f2b3b302c06b8b7b81ec7e3a43a7df1813d0e0':
Fix policy issues when screen is off. (DO NOT MERGE)
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/InputManager.java | 11 | ||||
-rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 12 | ||||
-rw-r--r-- | services/jni/com_android_server_InputManager.cpp | 8 |
3 files changed, 16 insertions, 15 deletions
diff --git a/services/java/com/android/server/InputManager.java b/services/java/com/android/server/InputManager.java index df41264..b44fe00 100644 --- a/services/java/com/android/server/InputManager.java +++ b/services/java/com/android/server/InputManager.java @@ -379,17 +379,18 @@ public class InputManager { } @SuppressWarnings("unused") - public int interceptKeyBeforeQueueing(long whenNanos, int keyCode, boolean down, - int policyFlags, boolean isScreenOn) { + public int interceptKeyBeforeQueueing(long whenNanos, int action, int flags, + int keyCode, int scanCode, int policyFlags, boolean isScreenOn) { return mWindowManagerService.mInputMonitor.interceptKeyBeforeQueueing( - whenNanos, keyCode, down, policyFlags, isScreenOn); + whenNanos, action, flags, keyCode, scanCode, policyFlags, isScreenOn); } @SuppressWarnings("unused") public boolean interceptKeyBeforeDispatching(InputChannel focus, int action, - int flags, int keyCode, int metaState, int repeatCount, int policyFlags) { + int flags, int keyCode, int scanCode, int metaState, int repeatCount, + int policyFlags) { return mWindowManagerService.mInputMonitor.interceptKeyBeforeDispatching(focus, - action, flags, keyCode, metaState, repeatCount, policyFlags); + action, flags, keyCode, scanCode, metaState, repeatCount, policyFlags); } @SuppressWarnings("unused") diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index f605c11..7dfab91 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -5251,20 +5251,20 @@ public class WindowManagerService extends IWindowManager.Stub /* Provides an opportunity for the window manager policy to intercept early key * processing as soon as the key has been read from the device. */ - public int interceptKeyBeforeQueueing(long whenNanos, int keyCode, boolean down, - int policyFlags, boolean isScreenOn) { - return mPolicy.interceptKeyBeforeQueueing(whenNanos, - keyCode, down, policyFlags, isScreenOn); + public int interceptKeyBeforeQueueing(long whenNanos, int action, int flags, + int keyCode, int scanCode, int policyFlags, boolean isScreenOn) { + return mPolicy.interceptKeyBeforeQueueing(whenNanos, action, flags, + keyCode, scanCode, policyFlags, isScreenOn); } /* Provides an opportunity for the window manager policy to process a key before * ordinary dispatch. */ public boolean interceptKeyBeforeDispatching(InputChannel focus, - int action, int flags, int keyCode, int metaState, int repeatCount, + int action, int flags, int keyCode, int scanCode, int metaState, int repeatCount, int policyFlags) { WindowState windowState = getWindowStateForInputChannel(focus); return mPolicy.interceptKeyBeforeDispatching(windowState, action, flags, - keyCode, metaState, repeatCount, policyFlags); + keyCode, scanCode, metaState, repeatCount, policyFlags); } /* Called when the current input focus changes. diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp index 1bd1874..693d630 100644 --- a/services/jni/com_android_server_InputManager.cpp +++ b/services/jni/com_android_server_InputManager.cpp @@ -857,7 +857,7 @@ void NativeInputManager::interceptKeyBeforeQueueing(nsecs_t when, JNIEnv* env = jniEnv(); jint wmActions = env->CallIntMethod(mCallbacksObj, gCallbacksClassInfo.interceptKeyBeforeQueueing, - when, keyCode, action == AKEY_EVENT_ACTION_DOWN, policyFlags, isScreenOn); + when, action, flags, keyCode, scanCode, policyFlags, isScreenOn); if (checkAndClearExceptionFromCallback(env, "interceptKeyBeforeQueueing")) { wmActions = 0; } @@ -926,7 +926,7 @@ bool NativeInputManager::interceptKeyBeforeDispatching(const sp<InputChannel>& i jboolean consumed = env->CallBooleanMethod(mCallbacksObj, gCallbacksClassInfo.interceptKeyBeforeDispatching, inputChannelObj, keyEvent->getAction(), keyEvent->getFlags(), - keyEvent->getKeyCode(), keyEvent->getMetaState(), + keyEvent->getKeyCode(), keyEvent->getScanCode(), keyEvent->getMetaState(), keyEvent->getRepeatCount(), policyFlags); bool error = checkAndClearExceptionFromCallback(env, "interceptKeyBeforeDispatching"); @@ -1337,10 +1337,10 @@ int register_android_server_InputManager(JNIEnv* env) { "notifyANR", "(Ljava/lang/Object;Landroid/view/InputChannel;)J"); GET_METHOD_ID(gCallbacksClassInfo.interceptKeyBeforeQueueing, gCallbacksClassInfo.clazz, - "interceptKeyBeforeQueueing", "(JIZIZ)I"); + "interceptKeyBeforeQueueing", "(JIIIIIZ)I"); GET_METHOD_ID(gCallbacksClassInfo.interceptKeyBeforeDispatching, gCallbacksClassInfo.clazz, - "interceptKeyBeforeDispatching", "(Landroid/view/InputChannel;IIIIII)Z"); + "interceptKeyBeforeDispatching", "(Landroid/view/InputChannel;IIIIIII)Z"); GET_METHOD_ID(gCallbacksClassInfo.checkInjectEventsPermission, gCallbacksClassInfo.clazz, "checkInjectEventsPermission", "(II)Z"); |