diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp index bd74b026e..fef2f0624 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; diff --git a/services/inputflinger/InputReader.h b/services/inputflinger/InputReader.h index 7cb4680ce..b73fe61e2 100644 --- a/services/inputflinger/InputReader.h +++ b/services/inputflinger/InputReader.h @@ -1296,6 +1296,7 @@ protected: DEVICE_TYPE_TOUCH_SCREEN, DEVICE_TYPE_TOUCH_PAD, DEVICE_TYPE_TOUCH_NAVIGATION, + DEVICE_TYPE_GESTURE_SENSOR, DEVICE_TYPE_POINTER, };