summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2013-04-20 14:12:53 -0700
committerDoris Liu <tianliu@google.com>2013-04-20 14:12:53 -0700
commitacad574d1c2f3c09b4794720921fcc9b2607f1a9 (patch)
treeca64a3b922d196c5df10b9455ec5da3da27b181d /src/com/android
parentae5ec8e93167f3b5e925809631421202edc4425d (diff)
downloadandroid_packages_apps_Snap-acad574d1c2f3c09b4794720921fcc9b2607f1a9.tar.gz
android_packages_apps_Snap-acad574d1c2f3c09b4794720921fcc9b2607f1a9.tar.bz2
android_packages_apps_Snap-acad574d1c2f3c09b4794720921fcc9b2607f1a9.zip
Fix for camera switcher hard to hit
Bug: 8667079 Change-Id: I9d40617f4e3bcfcd810223d818b212d335c80707
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/PreviewGestures.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/camera/PreviewGestures.java b/src/com/android/camera/PreviewGestures.java
index b968a0244..90ab075d2 100644
--- a/src/com/android/camera/PreviewGestures.java
+++ b/src/com/android/camera/PreviewGestures.java
@@ -317,6 +317,14 @@ public class PreviewGestures
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());