summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-05-01 15:54:03 -0700
committerJeff Brown <jeffbrown@google.com>2012-05-01 16:34:20 -0700
commitdaa3753a04699724d2cfe824ac1f5a266d643a05 (patch)
treeddc33d395dd0f3d01a95775397356983fb28a076 /core/jni
parent32c8113510b2774f865e8ac763976b90d9db2706 (diff)
downloadframeworks_base-daa3753a04699724d2cfe824ac1f5a266d643a05.zip
frameworks_base-daa3753a04699724d2cfe824ac1f5a266d643a05.tar.gz
frameworks_base-daa3753a04699724d2cfe824ac1f5a266d643a05.tar.bz2
Improve handling of built-in keyboard.
The window manager policy made some incorrect assumptions about the meaning of the Configuration.keyboard field. We need to be more careful about distinguishing between built-in and external keyboards. Most of this change is to move the determination of the parts of the Configuration related to input devices into the WindowManagerService leveraging new features of the InputManagerService to good effect. Then we plumb through the flag that indicates whether a device is internal or external so that we can be more particular about how the lid switch effects changes to the Configuration. Bug: 6424373 Change-Id: I36a1c22ade35e578955465a25940a33f227b9763
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_view_InputDevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/jni/android_view_InputDevice.cpp b/core/jni/android_view_InputDevice.cpp
index d1f0a6a..576f831 100644
--- a/core/jni/android_view_InputDevice.cpp
+++ b/core/jni/android_view_InputDevice.cpp
@@ -55,7 +55,7 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi
ScopedLocalRef<jobject> inputDeviceObj(env, env->NewObject(gInputDeviceClassInfo.clazz,
gInputDeviceClassInfo.ctor, deviceInfo.getId(), deviceInfo.getGeneration(),
- nameObj.get(), descriptorObj.get(),
+ nameObj.get(), descriptorObj.get(), deviceInfo.isExternal(),
deviceInfo.getSources(), deviceInfo.getKeyboardType(),
kcmObj.get(), deviceInfo.hasVibrator()));
@@ -87,7 +87,7 @@ int register_android_view_InputDevice(JNIEnv* env)
gInputDeviceClassInfo.clazz = jclass(env->NewGlobalRef(gInputDeviceClassInfo.clazz));
GET_METHOD_ID(gInputDeviceClassInfo.ctor, gInputDeviceClassInfo.clazz,
- "<init>", "(IILjava/lang/String;Ljava/lang/String;IILandroid/view/KeyCharacterMap;Z)V");
+ "<init>", "(IILjava/lang/String;Ljava/lang/String;ZIILandroid/view/KeyCharacterMap;Z)V");
GET_METHOD_ID(gInputDeviceClassInfo.addMotionRange, gInputDeviceClassInfo.clazz,
"addMotionRange", "(IIFFFF)V");