summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2013-08-02 14:38:10 +0800
committerSteve Kondik <shade@chemlab.org>2013-08-18 16:46:38 -0700
commitf5913d33f8528d2cc534d146ce5a3bcfb44b4541 (patch)
tree73c92d71e24b340f607bdcd2e4d4a530f5972adb /src
parentb623e3ad7430f0760e4e6649449fd7e235d67921 (diff)
downloadandroid_packages_apps_Gallery2-f5913d33f8528d2cc534d146ce5a3bcfb44b4541.tar.gz
android_packages_apps_Gallery2-f5913d33f8528d2cc534d146ce5a3bcfb44b4541.tar.bz2
android_packages_apps_Gallery2-f5913d33f8528d2cc534d146ce5a3bcfb44b4541.zip
Gallery2: put a itemPath to the bundle when start photopage.
In some cases, it request to start photopage, but the deletions is not cleared, it get 0 when get media item count, so it can not get a itemPath to create a photodata adapter when create photopage, then it request to finish state when resume, then a NullPointerException happens. We put a itemPath to the bundle when start photopage. So it can create a photodata adapter, and do not finish the photopage state. CRs-Fixed: 521735 Change-Id: I539bcfa35db35fdf0fe9004470e7a77acc65a94d
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/AlbumSetPage.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java
index f946a5199..e7793397a 100644
--- a/src/com/android/gallery3d/app/AlbumSetPage.java
+++ b/src/com/android/gallery3d/app/AlbumSetPage.java
@@ -268,6 +268,8 @@ public class AlbumSetPage extends ActivityState implements
data.putInt(PhotoPage.KEY_INDEX_HINT, 0);
data.putString(PhotoPage.KEY_MEDIA_SET_PATH,
mediaPath);
+ data.putString(PhotoPage.KEY_MEDIA_ITEM_PATH,
+ targetSet.getCoverMediaItem().getPath().toString());
data.putBoolean(PhotoPage.KEY_START_IN_FILMSTRIP, true);
data.putBoolean(PhotoPage.KEY_IN_CAMERA_ROLL, targetSet.isCameraRoll());
mActivity.getStateManager().startStateForResult(