diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-03-08 15:13:06 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-03-09 18:30:28 -0800 |
commit | efd3266b719eed5f1b217021c0a9e76e4b274b06 (patch) | |
tree | f76032f2a0bdfdc9910860063455116a9c792687 /services/jni | |
parent | 9e8e40cb5f8aeb0702002eee60d1ce394bf699ee (diff) | |
download | frameworks_base-efd3266b719eed5f1b217021c0a9e76e4b274b06.zip frameworks_base-efd3266b719eed5f1b217021c0a9e76e4b274b06.tar.gz frameworks_base-efd3266b719eed5f1b217021c0a9e76e4b274b06.tar.bz2 |
Input improvements and bug fixes.
Associate each motion axis with the source from which it comes.
It is possible for multiple sources of the same device to define
the same axis. This fixes new API that was introduced in MR1.
(Bug: 4066146)
Fixed a bug that might cause a segfault when using a trackball.
Only fade out the mouse pointer when touching the touch screen,
ignore other touch pads.
Changed the plural "sources" to "source" in several places in
the InputReader where we intend to refer to a particular source
rather than to a combination of sources.
Improved the batching code to support batching events from different
sources of the same device in parallel. (Bug: 3391564)
Change-Id: I0189e18e464338f126f7bf94370b928e1b1695f2
Diffstat (limited to 'services/jni')
-rw-r--r-- | services/jni/com_android_server_InputManager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp index bd4e787..80dddc2 100644 --- a/services/jni/com_android_server_InputManager.cpp +++ b/services/jni/com_android_server_InputManager.cpp @@ -1103,12 +1103,11 @@ static jobject android_server_InputManager_nativeGetInputDevice(JNIEnv* env, env->SetIntField(deviceObj, gInputDeviceClassInfo.mSources, deviceInfo.getSources()); env->SetIntField(deviceObj, gInputDeviceClassInfo.mKeyboardType, deviceInfo.getKeyboardType()); - const KeyedVector<int, InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges(); + const Vector<InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges(); for (size_t i = 0; i < ranges.size(); i++) { - int rangeType = ranges.keyAt(i); - const InputDeviceInfo::MotionRange& range = ranges.valueAt(i); + const InputDeviceInfo::MotionRange& range = ranges.itemAt(i); env->CallVoidMethod(deviceObj, gInputDeviceClassInfo.addMotionRange, - rangeType, range.min, range.max, range.flat, range.fuzz); + range.axis, range.source, range.min, range.max, range.flat, range.fuzz); if (env->ExceptionCheck()) { return NULL; } @@ -1321,7 +1320,7 @@ int register_android_server_InputManager(JNIEnv* env) { "<init>", "()V"); GET_METHOD_ID(gInputDeviceClassInfo.addMotionRange, gInputDeviceClassInfo.clazz, - "addMotionRange", "(IFFFF)V"); + "addMotionRange", "(IIFFFF)V"); GET_FIELD_ID(gInputDeviceClassInfo.mId, gInputDeviceClassInfo.clazz, "mId", "I"); |