diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-24 05:02:24 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-24 05:02:24 -0800 |
commit | 63948b5c01ae00b82e385b7502f0e626b24e7e09 (patch) | |
tree | 13e84f1c36411ea48abcbc2156b38fb9cbc17ce0 | |
parent | d33fa4f8efe6d6daeb93402c4dc3819af2f81344 (diff) | |
parent | 03b47172a6c23b0b0b8d2986e5a93af2d03b9973 (diff) | |
download | android_packages_apps_Gallery2-63948b5c01ae00b82e385b7502f0e626b24e7e09.tar.gz android_packages_apps_Gallery2-63948b5c01ae00b82e385b7502f0e626b24e7e09.tar.bz2 android_packages_apps_Gallery2-63948b5c01ae00b82e385b7502f0e626b24e7e09.zip |
Merge "SnapdragonGallery: Fix mPhotoView null crash."
-rwxr-xr-x | src/com/android/gallery3d/app/PhotoPage.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index dff96bf7a..8ad53df22 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -873,6 +873,9 @@ public abstract class PhotoPage extends ActivityState implements private void updateCurrentPhoto(MediaItem photo) { if (mCurrentPhoto == photo) return; mCurrentPhoto = photo; + if (mPhotoView == null) { + return; + } if (mPhotoView.getFilmMode()) { requestDeferredUpdate(); } else { @@ -967,7 +970,7 @@ public abstract class PhotoPage extends ActivityState implements private void refreshHidingMessage() { mHandler.removeMessages(MSG_HIDE_BARS); if (mPhotoView == null) { - mPhotoView = (PhotoView) mRootPane.getComponent(0); + return; } if (!mIsMenuVisible && !mPhotoView.getFilmMode()) { mHandler.sendEmptyMessageDelayed(MSG_HIDE_BARS, HIDE_BARS_TIMEOUT); |