From e7a9ae8ba0fb7fc61960e3facd0c5534e9ffce1e Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Fri, 8 Mar 2013 15:19:19 -0800 Subject: Add touch navigation input source Bug: 8276741 Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c --- services/input/InputReader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'services/input/InputReader.cpp') 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; -- cgit v1.2.3-59-g8ed1b