Gallery2: ensure seek gesture happens in allowed area
mFullRect is the rect where seek gesture is allowed.
Change-Id: Ic59f06c6e35c41da3202e129ab0fb179b6c95db2
diff --git a/src/com/android/gallery3d/app/GestureController.java b/src/com/android/gallery3d/app/GestureController.java
index 7a549ee..ca9dd63 100644
--- a/src/com/android/gallery3d/app/GestureController.java
+++ b/src/com/android/gallery3d/app/GestureController.java
@@ -190,7 +190,9 @@
float currentX = currentEvent.getX();
float currentY = currentEvent.getY();
if (Math.abs(currentX - startX) >= GESTURE_THRESHOLD) {
- return Type.SEEK;
+ if (mFullRect.contains((int) startX, (int) startY)) {
+ return Type.SEEK;
+ }
} else if (Math.abs(currentY - startY) >= GESTURE_THRESHOLD) {
if (mBrightnessRect.contains((int) startX, (int) startY)) {
return Type.BRIGHTNESS;