@Test public void getConstructedMotionEvent() { MotionEvent m = MotionEvent.obtain( 100, SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, 100, 200, 0); TouchEvent t = new TouchEvent(m); MotionEvent mnew = t.getConstructedMotionEvent(1, 1); assertMotionEventEqual(mnew, m); }
public MotionEvent getConstructedMotionEvent(int maxX, int maxY) { MotionEvent.PointerProperties[] pointerProperties = new MotionEvent.PointerProperties[this.subEvents.size()]; MotionEvent.PointerCoords[] pointerCoords = new MotionEvent.PointerCoords[this.subEvents.size()]; this.generateDataMultiTouch(pointerCoords,pointerProperties,this.subEvents); this.calculateCorrectCords(pointerCoords,maxX,maxY); return MotionEvent.obtain(downTime, SystemClock.uptimeMillis(), action, counterPointer, pointerProperties, pointerCoords, 0, 0, 1, 1, 0, 0, 0, 0 ); }
TouchEvent implements Serializable { public MotionEvent getConstructedMotionEvent(int maxX, int maxY) { MotionEvent.PointerProperties[] pointerProperties = new MotionEvent.PointerProperties[this.subEvents.size()]; MotionEvent.PointerCoords[] pointerCoords = new MotionEvent.PointerCoords[this.subEvents.size()]; this.generateDataMultiTouch(pointerCoords,pointerProperties,this.subEvents); this.calculateCorrectCords(pointerCoords,maxX,maxY); return MotionEvent.obtain(downTime, SystemClock.uptimeMillis(), action, counterPointer, pointerProperties, pointerCoords, 0, 0, 1, 1, 0, 0, 0, 0 ); } }
TouchEvent implements Serializable { public MotionEvent getConstructedMotionEvent(int maxX, int maxY) { MotionEvent.PointerProperties[] pointerProperties = new MotionEvent.PointerProperties[this.subEvents.size()]; MotionEvent.PointerCoords[] pointerCoords = new MotionEvent.PointerCoords[this.subEvents.size()]; this.generateDataMultiTouch(pointerCoords,pointerProperties,this.subEvents); this.calculateCorrectCords(pointerCoords,maxX,maxY); return MotionEvent.obtain(downTime, SystemClock.uptimeMillis(), action, counterPointer, pointerProperties, pointerCoords, 0, 0, 1, 1, 0, 0, 0, 0 ); } TouchEvent(float x, float y, int action, long downTime);  TouchEvent(MotionEvent m);  TouchEvent(MotionEvent m, Point screenSize); }
TouchEvent implements Serializable { public MotionEvent getConstructedMotionEvent(int maxX, int maxY) { MotionEvent.PointerProperties[] pointerProperties = new MotionEvent.PointerProperties[this.subEvents.size()]; MotionEvent.PointerCoords[] pointerCoords = new MotionEvent.PointerCoords[this.subEvents.size()]; this.generateDataMultiTouch(pointerCoords,pointerProperties,this.subEvents); this.calculateCorrectCords(pointerCoords,maxX,maxY); return MotionEvent.obtain(downTime, SystemClock.uptimeMillis(), action, counterPointer, pointerProperties, pointerCoords, 0, 0, 1, 1, 0, 0, 0, 0 ); } TouchEvent(float x, float y, int action, long downTime);  TouchEvent(MotionEvent m);  TouchEvent(MotionEvent m, Point screenSize); MotionEvent getConstructedMotionEvent(int maxX, int maxY); @Override String toString(); }
TouchEvent implements Serializable { public MotionEvent getConstructedMotionEvent(int maxX, int maxY) { MotionEvent.PointerProperties[] pointerProperties = new MotionEvent.PointerProperties[this.subEvents.size()]; MotionEvent.PointerCoords[] pointerCoords = new MotionEvent.PointerCoords[this.subEvents.size()]; this.generateDataMultiTouch(pointerCoords,pointerProperties,this.subEvents); this.calculateCorrectCords(pointerCoords,maxX,maxY); return MotionEvent.obtain(downTime, SystemClock.uptimeMillis(), action, counterPointer, pointerProperties, pointerCoords, 0, 0, 1, 1, 0, 0, 0, 0 ); } TouchEvent(float x, float y, int action, long downTime);  TouchEvent(MotionEvent m);  TouchEvent(MotionEvent m, Point screenSize); MotionEvent getConstructedMotionEvent(int maxX, int maxY); @Override String toString(); public float x; public float y; public int action; public long downTime; }