inputflinger: Add gesture sensor support

Change-Id: Ieca4e54439c47a817aaa6a9b6fabcee750ffc0c2
This commit is contained in:
Steve Kondik 2014-11-19 01:22:14 -08:00
parent ccf7c200ce
commit ac9d8404f1
2 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

@ -1296,6 +1296,7 @@ protected:
DEVICE_TYPE_TOUCH_SCREEN,
DEVICE_TYPE_TOUCH_PAD,
DEVICE_TYPE_TOUCH_NAVIGATION,
DEVICE_TYPE_GESTURE_SENSOR,
DEVICE_TYPE_POINTER,
};