diff options
author | Michael Wright <michaelwr@google.com> | 2015-06-23 19:04:31 +0100 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2015-06-23 19:04:31 +0100 |
commit | 7d3ad695304a1f24026227e630add6edd76fd0d6 (patch) | |
tree | f7a3a8769cc9321a08b4e1a1e4e1fed2732f4bd6 | |
parent | cc62b6c65eb51b62774882c53c53e20c336bc998 (diff) | |
parent | 71997c1a921b8d55cff4581fe29743553654912b (diff) | |
download | frameworks_native-7d3ad695304a1f24026227e630add6edd76fd0d6.zip frameworks_native-7d3ad695304a1f24026227e630add6edd76fd0d6.tar.gz frameworks_native-7d3ad695304a1f24026227e630add6edd76fd0d6.tar.bz2 |
Merge commit '71997c1a' into manualmerge
Change-Id: Ia68fbd20ce66571dfd33764e52c3a00e2285e648
-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; |