diff options
| author | Chao Zhang <chaoz@codeaurora.org> | 2016-03-22 14:12:44 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-03-29 22:42:08 -0700 |
| commit | eb2f1a635cb95fe9668f4965d595a68c824a8a6d (patch) | |
| tree | 8a0dee5476ae2ee6ffbe53442876a847e531b4ec /src | |
| parent | 41bc426af4b148f264ab7b07141636b06add4d0a (diff) | |
| download | android_packages_apps_Gallery2-eb2f1a635cb95fe9668f4965d595a68c824a8a6d.tar.gz android_packages_apps_Gallery2-eb2f1a635cb95fe9668f4965d595a68c824a8a6d.tar.bz2 android_packages_apps_Gallery2-eb2f1a635cb95fe9668f4965d595a68c824a8a6d.zip | |
Gallery2: fix actionbar display abnormal return from photo edit.
PhotoPage start a new activity state after edit a photo and return in
TimeLinePage, Add a judgement to avoid it.
Change-Id: Ic0f9cbdcdaa9e5d15cbd55d75423e0d761b8cd89
CRs-Fixed: 981010
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/gallery3d/app/FilterUtils.java | 4 | ||||
| -rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/FilterUtils.java b/src/com/android/gallery3d/app/FilterUtils.java index 3e055357d..2c4c96c73 100644 --- a/src/com/android/gallery3d/app/FilterUtils.java +++ b/src/com/android/gallery3d/app/FilterUtils.java @@ -218,6 +218,10 @@ public class FilterUtils { return "/cluster/{" + base + "}/" + kind; } + public static boolean isClusterPath(String path) { + return path != null && path.startsWith("/cluster/{"); + } + // Change the topmost clustering to the specified type. public static String switchClusterPath(String base, int clusterType) { return newClusterPath(removeOneClusterFromPath(base), clusterType); diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 7bda6dc16..e5cf6a731 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -1391,7 +1391,8 @@ public abstract class PhotoPage extends ActivityState implements if (albumPath == null) { return; } - if (!albumPath.equalsIgnoreCase(mOriginalSetPathString)) { + boolean isClusterType = FilterUtils.isClusterPath(mOriginalSetPathString); + if (!albumPath.equalsIgnoreCase(mOriginalSetPathString) && !isClusterType) { // If the edited image is stored in a different album, we need // to start a new activity state to show the new image Bundle data = new Bundle(getData()); |
