Join GitHub today
[Android] Touch not working on some device #953
On my tablet (Sony Xperia Z4), AInputEvent_getSource returns 20482 (AINPUT_SOURCE_TOUCHSCREEN & AINPUT_SOURCE_STYLUS) instead of only AINPUT_SOURCE_TOUCHSCREEN for touch events. I don't know if this is expected or if it's a bug in the android of my device.
One solution if to change the check in processMotionEvent and processPointerEvent to device & AINPUT_SOURCE_TOUCHSCREEN.
Also these functions will forward an uninitialized event if the type is neither AINPUT_SOURCE_MOUSE nor AINPUT_SOURCE_TOUCHSCREEN.