summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-10-17 17:40:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-17 17:40:21 +0000
commitf149ec53a0fa3330617ce01751964662d3273c88 (patch)
tree4dc2c197734849f3f2e12c9deaeaaa02cdc4419d /src/com
parent270b64e950ce8bfd137398df83e8fcb2f9b0ce4d (diff)
parent7be0e2b8439d525c70cb062c6616d10c4fc004aa (diff)
downloadandroid_packages_apps_Snap-f149ec53a0fa3330617ce01751964662d3273c88.tar.gz
android_packages_apps_Snap-f149ec53a0fa3330617ce01751964662d3273c88.tar.bz2
android_packages_apps_Snap-f149ec53a0fa3330617ce01751964662d3273c88.zip
Merge "Don't allow swipe into the film strip view when swipe is disabled" into gb-ub-photos-carlsbad
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/camera/ui/FilmStripView.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java
index 074f80b8a..564dd5d13 100644
--- a/src/com/android/camera/ui/FilmStripView.java
+++ b/src/com/android/camera/ui/FilmStripView.java
@@ -2695,7 +2695,11 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
@Override
public boolean onScroll(float x, float y, float dx, float dy) {
- if (mViewItem[mCurrentItem] == null) {
+ ViewItem currItem = mViewItem[mCurrentItem];
+ if (currItem == null) {
+ return false;
+ }
+ if (!mDataAdapter.canSwipeInFullScreen(currItem.getId())) {
return false;
}
// When image is zoomed in to be bigger than the screen
@@ -2760,6 +2764,9 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
if (currItem == null) {
return false;
}
+ if (!mDataAdapter.canSwipeInFullScreen(currItem.getId())) {
+ return false;
+ }
if (mController.isZoomStarted()) {
// Fling within the zoomed image
mController.flingInsideZoomView(velocityX, velocityY);