Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26657e73 authored by Jason Sams's avatar Jason Sams Committed by Android (Google) Code Review
Browse files

Merge "Improve multitouch support so pointers other than 0 can change colors."

parents c70e5b79 f60cf818
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -71,12 +71,16 @@ public class FountainView extends RSSurfaceView {
    @Override
    public boolean onTouchEvent(MotionEvent ev)
    {
        int act = ev.getAction();
        int act = ev.getActionMasked();
        if (act == ev.ACTION_UP) {
            mRender.newTouchPosition(0, 0, 0, 0);
            mRender.newTouchPosition(0, 0, 0, ev.getPointerId(0));
            return false;
        } else if (act == MotionEvent.ACTION_POINTER_UP) {
            // only one pointer going up, we can get the index like this
            int pointerIndex = ev.getActionIndex();
            int pointerId = ev.getPointerId(pointerIndex);
            mRender.newTouchPosition(0, 0, 0, pointerId);
        }

        int count = ev.getHistorySize();
        int pcount = ev.getPointerCount();