From e7ea6c7f5922ae2d29fdac8e84c703a59bfc4576 Mon Sep 17 00:00:00 2001 From: kaiyiz Date: Sat, 12 Oct 2013 10:31:17 +0800 Subject: 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 --- src/com/android/gallery3d/ui/PhotoView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java index 347d4b3af..b77d4bf0a 100755 --- a/src/com/android/gallery3d/ui/PhotoView.java +++ b/src/com/android/gallery3d/ui/PhotoView.java @@ -1152,6 +1152,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. -- cgit v1.2.3