diff options
| author | 2013-03-08 15:19:19 -0800 | |
|---|---|---|
| committer | 2013-03-11 17:58:22 -0700 | |
| commit | e7a9ae8ba0fb7fc61960e3facd0c5534e9ffce1e (patch) | |
| tree | cc5172cc643067df271ac91c222cc8336ffdc894 /services/input/InputReader.cpp | |
| parent | 74e4156e5c62392c37f4a70358de30dcfff4956f (diff) | |
Add touch navigation input source
Bug: 8276741
Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c
Diffstat (limited to 'services/input/InputReader.cpp')
| -rw-r--r-- | services/input/InputReader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp index bc8df184f05f..43d76bbd9e44 100644 --- a/services/input/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -2788,6 +2788,8 @@ void TouchInputMapper::configureParameters() { mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_SCREEN; } else if (deviceTypeString == "touchPad") { mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_PAD; + } else if (deviceTypeString == "touchNavigation") { + mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_NAVIGATION; } else if (deviceTypeString == "pointer") { mParameters.deviceType = Parameters::DEVICE_TYPE_POINTER; } else if (deviceTypeString != "default") { @@ -2832,6 +2834,9 @@ void TouchInputMapper::dumpParameters(String8& dump) { case Parameters::DEVICE_TYPE_TOUCH_PAD: dump.append(INDENT4 "DeviceType: touchPad\n"); break; + case Parameters::DEVICE_TYPE_TOUCH_NAVIGATION: + dump.append(INDENT4 "DeviceType: touchNavigation\n"); + break; case Parameters::DEVICE_TYPE_POINTER: dump.append(INDENT4 "DeviceType: pointer\n"); break; @@ -2885,6 +2890,9 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) { if (hasStylus()) { mSource |= AINPUT_SOURCE_STYLUS; } + } else if (mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_NAVIGATION) { + mSource = AINPUT_SOURCE_TOUCH_NAVIGATION; + mDeviceMode = DEVICE_MODE_UNSCALED; } else { mSource = AINPUT_SOURCE_TOUCHPAD; mDeviceMode = DEVICE_MODE_UNSCALED; |