summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/util/MotionEventHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/util/MotionEventHelper.java')
-rw-r--r--src/com/android/gallery3d/util/MotionEventHelper.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/util/MotionEventHelper.java b/src/com/android/gallery3d/util/MotionEventHelper.java
index 1c9d06244..715f7fa69 100644
--- a/src/com/android/gallery3d/util/MotionEventHelper.java
+++ b/src/com/android/gallery3d/util/MotionEventHelper.java
@@ -38,8 +38,9 @@ public final class MotionEventHelper {
@TargetApi(ApiHelper.VERSION_CODES.HONEYCOMB)
private static MotionEvent transformEventNew(MotionEvent e, Matrix m) {
- e.transform(m);
- return e;
+ MotionEvent newEvent = MotionEvent.obtain(e);
+ newEvent.transform(m);
+ return newEvent;
}
// This is copied from Input.cpp in the android framework.