1 package com.android.camera.util; 2 3 import android.graphics.Matrix; 4 import android.view.MotionEvent; 5 6 public final class MotionEventHelper { 7 private MotionEventHelper() {} 8 9 public static MotionEvent transformEvent(MotionEvent e, Matrix m) { 10 // We try to use the new transform method if possible because it uses 11 // less memory. 12 return transformEventNew(e, m); 13 } 14 15 private static MotionEvent transformEventNew(MotionEvent e, Matrix m) { 16 MotionEvent newEvent = MotionEvent.obtain(e); 17 newEvent.transform(m); 18 return newEvent; 19 } 20 } 21