diff options
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()); |
