summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ImageGallery.java
diff options
context:
space:
mode:
authorrepo sync <raychen@google.com>2009-06-02 12:32:33 +0800
committerrepo sync <raychen@google.com>2009-06-02 14:10:54 +0800
commitcd34001f2717ed31eb75d749f4dfedb70335252f (patch)
treef27f8ab1f66e4090e602d8be7d2a5f23ac273cc6 /src/com/android/camera/ImageGallery.java
parent565664f274abbe19b3a04962711d33868541a3da (diff)
downloadLegacyCamera-cd34001f2717ed31eb75d749f4dfedb70335252f.zip
LegacyCamera-cd34001f2717ed31eb75d749f4dfedb70335252f.tar.gz
LegacyCamera-cd34001f2717ed31eb75d749f4dfedb70335252f.tar.bz2
Fix NPE issue 1885257,1879113, and 1888919.
Diffstat (limited to 'src/com/android/camera/ImageGallery.java')
-rw-r--r--src/com/android/camera/ImageGallery.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/camera/ImageGallery.java b/src/com/android/camera/ImageGallery.java
index c1603b6..2e26d77 100644
--- a/src/com/android/camera/ImageGallery.java
+++ b/src/com/android/camera/ImageGallery.java
@@ -168,6 +168,9 @@ public class ImageGallery extends Activity implements
}
public boolean onSlideShowClicked() {
+ if (!canHandleEvent()) {
+ return false;
+ }
IImage img = getCurrentImage();
if (img == null) {
img = mAllImages.getImageAt(0);
@@ -766,6 +769,9 @@ public class ImageGallery extends Activity implements
mDeletePhotoRunnable,
new MenuHelper.MenuInvoker() {
public void run(MenuHelper.MenuCallback cb) {
+ if (!canHandleEvent()) {
+ return;
+ }
cb.run(getCurrentImageUri(), getCurrentImage());
mGvs.stop();
mGvs.setImageList(mAllImages);