diff options
author | Chih-Chung Chang <chihchung@google.com> | 2011-09-14 12:07:17 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2011-09-14 12:13:54 +0800 |
commit | 36064d1d4450494983652a5264a5d27cab454eed (patch) | |
tree | d8cb13f95c63ccdbe461e3b9b1045df4f8a1e25c /src/com/android/gallery3d/app | |
parent | e0c32157e3aabdb8f78692d777232eb30a2513e2 (diff) | |
download | android_packages_apps_Snap-36064d1d4450494983652a5264a5d27cab454eed.tar.gz android_packages_apps_Snap-36064d1d4450494983652a5264a5d27cab454eed.tar.bz2 android_packages_apps_Snap-36064d1d4450494983652a5264a5d27cab454eed.zip |
Fix 5280798: Click on filmstrip during swiping causes crash.
After swiping animation finishes we move to the previous
picture. But if during the animation the user clicks the first
thumbnail on the filmstrip, we will have no previous picture
to move to.
Now disallow clicking on the filmstrip during the swiping animation.
Change-Id: Ie910c346cbf35543fedb6812b04c8e78faab0d0f
Diffstat (limited to 'src/com/android/gallery3d/app')
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 7 | ||||
-rw-r--r-- | src/com/android/gallery3d/app/SinglePhotoDataAdapter.java | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 3e8972f4b..a3b385ac0 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -510,9 +510,10 @@ public class PhotoPage extends ActivityState } } - // Called by FileStripView - public void onSlotSelected(int slotIndex) { - ((PhotoDataAdapter) mModel).jumpTo(slotIndex); + // Called by FileStripView. + // Returns false if it cannot jump to the specified index at this time. + public boolean onSlotSelected(int slotIndex) { + return mPhotoView.jumpTo(slotIndex); } @Override diff --git a/src/com/android/gallery3d/app/SinglePhotoDataAdapter.java b/src/com/android/gallery3d/app/SinglePhotoDataAdapter.java index 54183e006..0c54ada11 100644 --- a/src/com/android/gallery3d/app/SinglePhotoDataAdapter.java +++ b/src/com/android/gallery3d/app/SinglePhotoDataAdapter.java @@ -174,6 +174,10 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter throw new UnsupportedOperationException(); } + public void jumpTo(int index) { + throw new UnsupportedOperationException(); + } + public MediaItem getCurrentMediaItem() { return mItem; } |