diff options
author | Steve Kondik <steve@cyngn.com> | 2014-11-19 01:22:14 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-17 13:53:44 -0700 |
commit | ac9d8404f1ad41db46e95a9bb118a49b0984e737 (patch) | |
tree | 11cb51f1e01e3eb99490150fa5dff80fe5ed620a /services/inputflinger/InputReader.cpp | |
parent | ccf7c200ce5c805ccfe730b4c4cae2d1a6f5d0a1 (diff) | |
download | frameworks_native-ac9d8404f1ad41db46e95a9bb118a49b0984e737.zip frameworks_native-ac9d8404f1ad41db46e95a9bb118a49b0984e737.tar.gz frameworks_native-ac9d8404f1ad41db46e95a9bb118a49b0984e737.tar.bz2 |
inputflinger: Add gesture sensor support
Change-Id: Ieca4e54439c47a817aaa6a9b6fabcee750ffc0c2
Diffstat (limited to 'services/inputflinger/InputReader.cpp')
-rw-r--r-- | services/inputflinger/InputReader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp index bd74b02..fef2f06 100644 --- a/services/inputflinger/InputReader.cpp +++ b/services/inputflinger/InputReader.cpp @@ -2996,6 +2996,8 @@ void TouchInputMapper::configureParameters() { mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_NAVIGATION; } else if (deviceTypeString == "pointer") { mParameters.deviceType = Parameters::DEVICE_TYPE_POINTER; + } else if (deviceTypeString == "gesture") { + mParameters.deviceType = Parameters::DEVICE_TYPE_GESTURE_SENSOR; } else if (deviceTypeString != "default") { ALOGW("Invalid value for touch.deviceType: '%s'", deviceTypeString.string()); } @@ -3051,6 +3053,9 @@ void TouchInputMapper::dumpParameters(String8& dump) { case Parameters::DEVICE_TYPE_POINTER: dump.append(INDENT4 "DeviceType: pointer\n"); break; + case Parameters::DEVICE_TYPE_GESTURE_SENSOR: + dump.append(INDENT4 "DeviceType: gesture\n"); + break; default: ALOG_ASSERT(false); } @@ -3113,6 +3118,9 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) { } else if (mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_NAVIGATION) { mSource = AINPUT_SOURCE_TOUCH_NAVIGATION; mDeviceMode = DEVICE_MODE_NAVIGATION; + } else if (mParameters.deviceType == Parameters::DEVICE_TYPE_GESTURE_SENSOR) { + mSource = AINPUT_SOURCE_GESTURE_SENSOR; + mDeviceMode = DEVICE_MODE_UNSCALED; } else { mSource = AINPUT_SOURCE_TOUCHPAD; mDeviceMode = DEVICE_MODE_UNSCALED; |