diff options
author | Michael Wright <michaelwr@google.com> | 2015-06-23 18:13:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-06-23 18:13:15 +0000 |
commit | 39c32ecf379adab1a54eaa0908e3993dffadcd00 (patch) | |
tree | 7632fefbccb76181de554ab5b97e1a28f4c8c2ff | |
parent | ccb52820d801172288bb84781d81f1a9604d44f8 (diff) | |
parent | 7d3ad695304a1f24026227e630add6edd76fd0d6 (diff) | |
download | frameworks_native-39c32ecf379adab1a54eaa0908e3993dffadcd00.zip frameworks_native-39c32ecf379adab1a54eaa0908e3993dffadcd00.tar.gz frameworks_native-39c32ecf379adab1a54eaa0908e3993dffadcd00.tar.bz2 |
am 7d3ad695: Merge commit \'71997c1a\' into manualmerge
* commit '7d3ad695304a1f24026227e630add6edd76fd0d6':
Add new AINPUT_SOURCE_BLUETOOTH_STYLUS
-rw-r--r-- | include/android/input.h | 2 | ||||
-rw-r--r-- | services/inputflinger/InputReader.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/android/input.h b/include/android/input.h index 7b76539..5ab4e29 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -807,6 +807,8 @@ enum { AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER, /** stylus */ AINPUT_SOURCE_STYLUS = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER, + /** bluetooth stylus */ + AINPUT_SOURCE_BLUETOOTH_STYLUS = 0x00008000 | AINPUT_SOURCE_STYLUS, /** trackball */ AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION, /** touchpad */ diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp index dc8d093..8a22e3d 100644 --- a/services/inputflinger/InputReader.cpp +++ b/services/inputflinger/InputReader.cpp @@ -3104,9 +3104,12 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) { && mParameters.hasAssociatedDisplay) { mSource = AINPUT_SOURCE_TOUCHSCREEN; mDeviceMode = DEVICE_MODE_DIRECT; - if (hasStylus() || hasExternalStylus()) { + if (hasStylus()) { mSource |= AINPUT_SOURCE_STYLUS; } + if (hasExternalStylus()) { + mSource |= AINPUT_SOURCE_BLUETOOTH_STYLUS; + } } else if (mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_NAVIGATION) { mSource = AINPUT_SOURCE_TOUCH_NAVIGATION; mDeviceMode = DEVICE_MODE_NAVIGATION; |