Barrier free click path source code to read

Gesturedescription build to build gesture description class

Dispatchgesture execution gesture description class

GestureDescription.GestureStep Gesture operation steps

final IAccessibilityServiceConnection connection =
                AccessibilityInteractionClient.getInstance().getConnection(
                        mConnectionId);

  connection.sendGesture(mGestureStatusCallbackSequence,
                        new ParceledListSlice<>(steps));

Iaccessibilityserviceconnection utilizes cross process

https://www.jb51.net/article/141876.htm

MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis(),
                        MotionEvent.ACTION_DOWN,
                        100.0f,
                        100.0f,
                        0));


                MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis(),
                        MotionEvent.ACTION_MOVE,
                        150.0f,
                        150.0f,
                        0));

                MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis() ,
                        MotionEvent.ACTION_UP,
                        200.0f,
                        200.0f,
                        0));


Read More: