Merge "Fix for camera switcher hard to hit" into gb-ub-photos-bryce
diff --git a/src/com/android/camera/PreviewGestures.java b/src/com/android/camera/PreviewGestures.java
index b968a02..90ab075 100644
--- a/src/com/android/camera/PreviewGestures.java
+++ b/src/com/android/camera/PreviewGestures.java
@@ -317,6 +317,14 @@
 
     private boolean isInside(MotionEvent evt, View v) {
         v.getLocationInWindow(mLocation);
+        // when view is flipped horizontally
+        if ((int) v.getRotationY() == 180) {
+            mLocation[0] -= v.getWidth();
+        }
+        // when view is flipped vertically
+        if ((int) v.getRotationX() == 180) {
+            mLocation[1] -= v.getHeight();
+        }
         return (v.getVisibility() == View.VISIBLE
                 && evt.getX() >= mLocation[0] && evt.getX() < mLocation[0] + v.getWidth()
                 && evt.getY() >= mLocation[1] && evt.getY() < mLocation[1] + v.getHeight());