diff options
author | repo sync <raychen@google.com> | 2009-06-02 12:32:33 +0800 |
---|---|---|
committer | repo sync <raychen@google.com> | 2009-06-02 14:10:54 +0800 |
commit | cd34001f2717ed31eb75d749f4dfedb70335252f (patch) | |
tree | f27f8ab1f66e4090e602d8be7d2a5f23ac273cc6 /src/com/android/camera/ImageGallery.java | |
parent | 565664f274abbe19b3a04962711d33868541a3da (diff) | |
download | LegacyCamera-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.java | 6 |
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); |