summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-11-30 18:17:27 +0800
committerWu-cheng Li <wuchengli@google.com>2010-12-02 16:25:11 +0800
commit937ea10204656beaa848df913dc9cb9b5a9b934f (patch)
tree332cb4a47ef046732d0ee4ee32116e2188ffb995 /src
parent69b444430b27b2f43e5f9954949714e1017fc62c (diff)
downloadLegacyCamera-937ea10204656beaa848df913dc9cb9b5a9b934f.zip
LegacyCamera-937ea10204656beaa848df913dc9cb9b5a9b934f.tar.gz
LegacyCamera-937ea10204656beaa848df913dc9cb9b5a9b934f.tar.bz2
Let event fall through when users press outside popup windows.
Change-Id: I419c1436f07a91dbcdc851c891c3408ffcdd1429
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/Camera.java12
-rw-r--r--src/com/android/camera/VideoCamera.java8
2 files changed, 10 insertions, 10 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 8691e9a..3d7c3f5 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -20,10 +20,10 @@ import com.android.camera.gallery.IImage;
import com.android.camera.gallery.IImageList;
import com.android.camera.ui.CameraHeadUpDisplay;
import com.android.camera.ui.CameraPicker;
-import com.android.camera.ui.GLRootView;
-import com.android.camera.ui.HeadUpDisplay;
import com.android.camera.ui.ControlPanel;
import com.android.camera.ui.FocusRectangle;
+import com.android.camera.ui.GLRootView;
+import com.android.camera.ui.HeadUpDisplay;
import com.android.camera.ui.ZoomControllerListener;
import com.android.camera.ui.ZoomPicker;
@@ -495,19 +495,19 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
private class PopupGestureListener extends
GestureDetector.SimpleOnGestureListener {
public boolean onDown(MotionEvent e) {
- int x = Math.round(e.getX());
- int y = Math.round(e.getY());
-
// Check if the popup window is visible.
View v = mControlPanel.getActivePopupWindow();
if (v == null) return false;
+ int x = Math.round(e.getX());
+ int y = Math.round(e.getY());
+
// Dismiss the popup window if users touch on the outside.
v.getLocationOnScreen(mPopupLocations);
if (x < mPopupLocations[0] || x > mPopupLocations[0] + v.getWidth()
|| y < mPopupLocations[1] || y > mPopupLocations[1] + v.getHeight()) {
mControlPanel.dismissSettingPopup();
- return true;
+ // Let event fall through.
}
return false;
}
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 316bc91..a6680be 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -1879,19 +1879,19 @@ public class VideoCamera extends NoSearchActivity
private class PopupGestureListener extends
GestureDetector.SimpleOnGestureListener {
public boolean onDown(MotionEvent e) {
- int x = Math.round(e.getX());
- int y = Math.round(e.getY());
-
// Check if the popup window is visible.
View v = mControlPanel.getActivePopupWindow();
if (v == null) return false;
+ int x = Math.round(e.getX());
+ int y = Math.round(e.getY());
+
// Dismiss the popup window if users touch on the outside.
v.getLocationOnScreen(mPopupLocations);
if (x < mPopupLocations[0] || x > mPopupLocations[0] + v.getWidth()
|| y < mPopupLocations[1] || y > mPopupLocations[1] + v.getHeight()) {
mControlPanel.dismissSettingPopup();
- return true;
+ // Let event fall through.
}
return false;
}