diff options
author | Michael Wright <michaelwr@google.com> | 2015-06-12 15:25:08 +0100 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2015-06-12 15:25:08 +0100 |
commit | 2f78b68cf15c3d96eccbb242316d174ed739dc69 (patch) | |
tree | 89e0d1cd8cce9aea44ef2427b2093199b06ece1f | |
parent | 8a4222a647bd17c991959eca17a50ba911c3ab6b (diff) | |
download | frameworks_native-2f78b68cf15c3d96eccbb242316d174ed739dc69.zip frameworks_native-2f78b68cf15c3d96eccbb242316d174ed739dc69.tar.gz frameworks_native-2f78b68cf15c3d96eccbb242316d174ed739dc69.tar.bz2 |
Add new AINPUT_SOURCE_BLUETOOTH_STYLUS
Bug: 21531826
Change-Id: I3792860ad3f6579ceb50ccaa212f8fbd471a9b6b
-rw-r--r-- | include/android/input.h | 1 | ||||
-rw-r--r-- | services/inputflinger/InputReader.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/android/input.h b/include/android/input.h index c7635b8..efbbb85 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -453,6 +453,7 @@ enum { AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER, AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER, AINPUT_SOURCE_STYLUS = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER, + AINPUT_SOURCE_BLUETOOTH_STYLUS = 0x00008000 | AINPUT_SOURCE_STYLUS, AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION, AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION, AINPUT_SOURCE_TOUCH_NAVIGATION = 0x00200000 | AINPUT_SOURCE_CLASS_NONE, diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp index b54503e..f3cb0e6 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; |