summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2013-10-12 10:31:17 +0800
committerSteve Kondik <steve@cyngn.com>2016-09-26 04:54:47 -0700
commite7ea6c7f5922ae2d29fdac8e84c703a59bfc4576 (patch)
tree8c42faa00215520e890a911a18d4f1ccea6873f9
parent4c09417abd211b997122203a1f37bed8a9b848bc (diff)
downloadandroid_packages_apps_Gallery2-e7ea6c7f5922ae2d29fdac8e84c703a59bfc4576.tar.gz
android_packages_apps_Gallery2-e7ea6c7f5922ae2d29fdac8e84c703a59bfc4576.tar.bz2
android_packages_apps_Gallery2-e7ea6c7f5922ae2d29fdac8e84c703a59bfc4576.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
-rwxr-xr-xsrc/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 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.