summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/AlbumPage.java
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-09-13 10:42:21 -0700
committerJohn Hoford <hoford@google.com>2013-09-13 10:51:17 -0700
commitb55bfb6e6000881c56d4de39c9cf71929ed87a18 (patch)
tree5ffcc976d567b27a1d03b4146bf6b85dca9941b1 /src/com/android/gallery3d/app/AlbumPage.java
parentbc7e9fff7e94bb96fb7fe46080dcde2b81e60817 (diff)
downloadandroid_packages_apps_Gallery2-b55bfb6e6000881c56d4de39c9cf71929ed87a18.tar.gz
android_packages_apps_Gallery2-b55bfb6e6000881c56d4de39c9cf71929ed87a18.tar.bz2
android_packages_apps_Gallery2-b55bfb6e6000881c56d4de39c9cf71929ed87a18.zip
fix crashes in in gallery by reversing previous cl
cl 348551 tried to fix a long existing bug which but introduced race conditions in the system bug:10652636 bug:10551751 bug:8794694 Change-Id: Ieb617f85df32a5d82293e555621a7e44b8b84708
Diffstat (limited to 'src/com/android/gallery3d/app/AlbumPage.java')
-rw-r--r--src/com/android/gallery3d/app/AlbumPage.java22
1 files changed, 0 insertions, 22 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)