android:InputOverlay: Bit mask touch action so they are aevaluated properly

event.getAction() returns the action only in the lower byte, this works fine when the pointer index is zero and any additional indexes are not captured
This commit is contained in:
SachinVin 2020-05-24 23:37:02 +05:30 committed by xperia64
parent c858514be7
commit 4d9b1843d8

View File

@ -340,7 +340,7 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener {
int pointerIndex = event.getActionIndex();
if (mPreferences.getBoolean("isTouchEnabled", true)) {
switch (event.getAction()) {
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN:
NativeLibrary.onTouchEvent(event.getX(pointerIndex), event.getY(pointerIndex), true);