diff options
| author | John Hoford <hoford@google.com> | 2013-09-13 10:58:57 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-13 10:58:57 -0700 |
| commit | 2187c9c5e41984378d2b333f65bc62e6922fbc6e (patch) | |
| tree | c5a5203a9f6a25abc639dcc24febf3876aa54afc | |
| parent | 18277855f7d3b236aad25f752f2d0dce9887fc1f (diff) | |
| parent | b55bfb6e6000881c56d4de39c9cf71929ed87a18 (diff) | |
| download | android_packages_apps_Gallery2-2187c9c5e41984378d2b333f65bc62e6922fbc6e.tar.gz android_packages_apps_Gallery2-2187c9c5e41984378d2b333f65bc62e6922fbc6e.tar.bz2 android_packages_apps_Gallery2-2187c9c5e41984378d2b333f65bc62e6922fbc6e.zip | |
am b55bfb6e: fix crashes in in gallery by reversing previous cl
* commit 'b55bfb6e6000881c56d4de39c9cf71929ed87a18':
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; } |
