diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-06 23:06:32 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2017-02-06 23:06:32 -0700 |
commit | 6cf372c7c4ddb03833300eec846e5e75abf6ba1e (patch) | |
tree | 13e84f1c36411ea48abcbc2156b38fb9cbc17ce0 | |
parent | c0baec89af90113274f5190c21a61a11349cfb67 (diff) | |
parent | 63948b5c01ae00b82e385b7502f0e626b24e7e09 (diff) | |
download | android_packages_apps_Gallery2-6cf372c7c4ddb03833300eec846e5e75abf6ba1e.tar.gz android_packages_apps_Gallery2-6cf372c7c4ddb03833300eec846e5e75abf6ba1e.tar.bz2 android_packages_apps_Gallery2-6cf372c7c4ddb03833300eec846e5e75abf6ba1e.zip |
Promotion of android_ui.lnx.2.1.c1-00036.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1102788 I3bd644393b44c1b6571d4eb49ed5a43f2f521048 SnapdragonGallery: Fix mPhotoView null crash.
Change-Id: I73cd30c3de5e825be24c46e70175703d878bda6d
CRs-Fixed: 1102788
-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); |