Ignore 3 finger tap gesture when cancelled

This commit is contained in:
Cameron Gutman
2022-06-08 22:58:23 -05:00
parent 951d544894
commit e888ae59e4

View File

@@ -1449,7 +1449,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
break;
case MotionEvent.ACTION_POINTER_UP:
case MotionEvent.ACTION_UP:
if (event.getPointerCount() == 1) {
if (event.getPointerCount() == 1 &&
(Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || (event.getFlags() & MotionEvent.FLAG_CANCELED) == 0)) {
// All fingers up
if (SystemClock.uptimeMillis() - threeFingerDownTime < THREE_FINGER_TAP_THRESHOLD) {
// This is a 3 finger tap to bring up the keyboard