summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2013-10-12 10:31:17 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-01-24 18:09:38 -0800
commit87df906d21e03f530e7ab9198a0f04215fc321cf (patch)
treeb73b7ca5971f26a69205b8798685ffb33e58673f /src/com
parent7e72c64a5bda84182fc03091bc534b36b2cd822a (diff)
downloadandroid_packages_apps_Gallery2-87df906d21e03f530e7ab9198a0f04215fc321cf.tar.gz
android_packages_apps_Gallery2-87df906d21e03f530e7ab9198a0f04215fc321cf.tar.bz2
android_packages_apps_Gallery2-87df906d21e03f530e7ab9198a0f04215fc321cf.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/com')
-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 3cb24e4a1..6e1c662c4 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -1180,6 +1180,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.