summaryrefslogtreecommitdiffstats
path: root/photoviewer
diff options
context:
space:
mode:
authorMark Wei <markwei@google.com>2012-09-17 14:53:52 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-17 14:53:52 -0700
commit4b9da5a72ee62d47fea8372aa493de0dd6f68250 (patch)
tree5e9f8c4937b601eab2b610455bd44168f53d3660 /photoviewer
parent685658bb07dc786536e038060fdeec975aa62176 (diff)
parent34672da452ddf07347d2e9fc02f6d66c954ebba3 (diff)
downloadandroid_frameworks_ex-4b9da5a72ee62d47fea8372aa493de0dd6f68250.tar.gz
android_frameworks_ex-4b9da5a72ee62d47fea8372aa493de0dd6f68250.tar.bz2
android_frameworks_ex-4b9da5a72ee62d47fea8372aa493de0dd6f68250.zip
am 34672da4: am 4030071b: am 697c046e: Prevent NPE in Gmail while viewing photo from attachment
* commit '34672da452ddf07347d2e9fc02f6d66c954ebba3': Prevent NPE in Gmail while viewing photo from attachment
Diffstat (limited to 'photoviewer')
-rw-r--r--photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java b/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java
index c6c2e3b..779ff3b 100644
--- a/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java
+++ b/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java
@@ -166,7 +166,10 @@ public class PhotoViewFragment extends Fragment implements
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
- mIntent = new Intent().putExtras(savedInstanceState.getBundle(STATE_INTENT_KEY));
+ final Bundle state = savedInstanceState.getBundle(STATE_INTENT_KEY);
+ if (state != null) {
+ mIntent = new Intent().putExtras(state);
+ }
}
mResolvedPhotoUri = mIntent.getStringExtra(Intents.EXTRA_RESOLVED_PHOTO_URI);