diff options
author | Chih-Chung Chang <chihchung@google.com> | 2009-10-14 19:22:30 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2009-10-14 19:22:30 +0800 |
commit | 4916316bb9a2196cbf6cc63e531c0ce6786ed56a (patch) | |
tree | 9b32295336c75d3d1be935ac3b7339bc9c312eee /src/com/android/camera/ReviewImage.java | |
parent | 609d8cc0c7d05aa294aeebea8dcbb9111aefc1e1 (diff) | |
download | packages_apps_LegacyCamera-4916316bb9a2196cbf6cc63e531c0ce6786ed56a.zip packages_apps_LegacyCamera-4916316bb9a2196cbf6cc63e531c0ce6786ed56a.tar.gz packages_apps_LegacyCamera-4916316bb9a2196cbf6cc63e531c0ce6786ed56a.tar.bz2 |
Fix 2185267 and 2177765: NPE after onPause.
Diffstat (limited to 'src/com/android/camera/ReviewImage.java')
-rw-r--r-- | src/com/android/camera/ReviewImage.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/camera/ReviewImage.java b/src/com/android/camera/ReviewImage.java index d054184..fbb8f56 100644 --- a/src/com/android/camera/ReviewImage.java +++ b/src/com/android/camera/ReviewImage.java @@ -281,6 +281,7 @@ public class ReviewImage extends NoSearchActivity implements View.OnClickListene @Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { + if (mPaused) return false; ImageViewTouch2 imageView = mImageView; if (imageView.getScale() > 1F) { imageView.postTranslateCenter(-distanceX, -distanceY); @@ -290,6 +291,7 @@ public class ReviewImage extends NoSearchActivity implements View.OnClickListene @Override public boolean onSingleTapConfirmed(MotionEvent e) { + if (mPaused) return false; showOnScreenControls(); scheduleDismissOnScreenControls(); return true; @@ -297,6 +299,7 @@ public class ReviewImage extends NoSearchActivity implements View.OnClickListene @Override public boolean onDoubleTap(MotionEvent e) { + if (mPaused) return false; ImageViewTouch2 imageView = mImageView; // Switch between the original scale and 3x scale. |