summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/PhotoPage.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/PhotoPage.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/PhotoPage.java')
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java17
1 files changed, 0 insertions, 17 deletions
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;
}