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

Commit 95c45bf4 authored by Taran Singh's avatar Taran Singh Committed by Android (Google) Code Review
Browse files

Merge "Use MotionEvent#isStylusPointer in initiator"

parents 51cefe89 39df954a
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -132,12 +132,7 @@ public class HandwritingInitiator {
            case MotionEvent.ACTION_DOWN:
            case MotionEvent.ACTION_POINTER_DOWN:
                mState = null;
                final int actionIndex = motionEvent.getActionIndex();
                final int toolType = motionEvent.getToolType(actionIndex);
                // TOOL_TYPE_ERASER is also from stylus. This indicates that the user is holding
                // the eraser button during handwriting.
                if (toolType != MotionEvent.TOOL_TYPE_STYLUS
                        && toolType != MotionEvent.TOOL_TYPE_ERASER) {
                if (!motionEvent.isStylusPointer()) {
                    // The motion event is not from a stylus event, ignore it.
                    return false;
                }