summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2013-10-12 10:31:17 +0800
committeremancebo <emancebo@cyngn.com>2014-09-04 10:40:16 -0700
commitd62f230a1d16d607291bb5c8525c78d70512db22 (patch)
tree3595087a658a3f261a7c8c787e3526d4fc95b283 /src
parente3d11d4419104226e84ac21c92d675d4bbbe67db (diff)
downloadandroid_packages_apps_Gallery2-d62f230a1d16d607291bb5c8525c78d70512db22.tar.gz
android_packages_apps_Gallery2-d62f230a1d16d607291bb5c8525c78d70512db22.tar.bz2
android_packages_apps_Gallery2-d62f230a1d16d607291bb5c8525c78d70512db22.zip
Gallery2: Fix the superposition of two images issue
When we zoom out to film mode from single photo mode with more than two fingers, PhotoView will receive multi onScaleBegin/onScaleEnd streams. But when mModeChanged is true, it will only notify PositionController to beginScale but not to endScale, then mInScale remains in true state. So when we back to single photo mode from film mode, focuse photo can't do scale animation in Box.startSnapback(). According to the logic in onScaleEnd(), we will ignore other scale begin notification if film mode has been changed. CRs-Fixed: 551984 Change-Id: I468d932adab0a3540f107501db4d0ea4b7ffbb10
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java
index 7afa20348..fffb31910 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -1148,6 +1148,8 @@ public class PhotoView extends GLView {
if (mIgnoreScalingGesture) {
return true;
}
+ // We ignore other scale begin notification if film mode has been changed.
+ if (mModeChanged) return true;
mPositionController.beginScale(focusX, focusY);
// We can change mode if we are in film mode, or we are in page
// mode and at minimal scale.