diff options
| author | John Hoford <hoford@google.com> | 2013-09-13 13:20:41 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-13 13:20:41 -0700 |
| commit | 75d70625d21590bf36dad183fbbdc0a8818a256a (patch) | |
| tree | 14460279ef364814c212c7526db669440ab6d8b0 | |
| parent | e762cca761b2ba649fe47b41d71ce0062b946b22 (diff) | |
| parent | 2187c9c5e41984378d2b333f65bc62e6922fbc6e (diff) | |
| download | android_packages_apps_Gallery2-75d70625d21590bf36dad183fbbdc0a8818a256a.tar.gz android_packages_apps_Gallery2-75d70625d21590bf36dad183fbbdc0a8818a256a.tar.bz2 android_packages_apps_Gallery2-75d70625d21590bf36dad183fbbdc0a8818a256a.zip | |
am 2187c9c5: am b55bfb6e: fix crashes in in gallery by reversing previous cl
* commit '2187c9c5e41984378d2b333f65bc62e6922fbc6e':
fix crashes in in gallery by reversing previous cl
| -rw-r--r-- | src/com/android/gallery3d/app/AlbumPage.java | 22 | ||||
| -rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 17 |
2 files changed, 0 insertions, 39 deletions
diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java index ad757da9c..658abbbd4 100644 --- a/src/com/android/gallery3d/app/AlbumPage.java +++ b/src/com/android/gallery3d/app/AlbumPage.java @@ -538,27 +538,6 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster mSlotView.invalidate(); } - private boolean canDoSlideShow() { - if (mMediaSet == null) { - return false; - } - - final int[] count = new int[]{0}; - mMediaSet.enumerateMediaItems(new MediaSet.ItemConsumer() { - @Override - public void consume(int index, MediaItem item) { - if (item.getMediaType() == MediaObject.MEDIA_TYPE_IMAGE) { - count[0]++; - } - } - }); - - if (count[0] < 2) { // you must have 2 pictures to go into slide show - return false; - } - return true; - } - @Override protected boolean onCreateActionBar(Menu menu) { GalleryActionBar actionBar = mActivity.getGalleryActionBar(); @@ -574,7 +553,6 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster FilterUtils.setupMenuItems(actionBar, mMediaSetPath, true); - menu.findItem(R.id.action_slideshow).setVisible(canDoSlideShow()); menu.findItem(R.id.action_group_by).setVisible(mShowClusterMenu); menu.findItem(R.id.action_camera).setVisible( MediaSetUtils.isCameraSource(mMediaSetPath) diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 8f7b1ed73..e52e04491 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -777,33 +777,16 @@ public abstract class PhotoPage extends ActivityState implements supportedOperations &= ~MediaObject.SUPPORT_EDIT; } } - MenuExecutor.updateMenuOperation(menu, supportedOperations); } private boolean canDoSlideShow() { - if (mMediaSet == null || mCurrentPhoto == null) { return false; } if (mCurrentPhoto.getMediaType() != MediaObject.MEDIA_TYPE_IMAGE) { return false; } - final int[] count = new int[]{0}; - - mMediaSet.enumerateMediaItems(new MediaSet.ItemConsumer() { - @Override - public void consume(int index, MediaItem item) { - if (item != null - && item.getMediaType() == MediaObject.MEDIA_TYPE_IMAGE) { - count[0]++; - } - } - }); - - if (count[0] < 2) { // you must have 3 pictures to go into slide show - return false; - } return true; } |
