diff options
| author | Chao Zhang <chaoz@codeaurora.org> | 2016-03-22 14:12:44 +0800 |
|---|---|---|
| committer | Steve Kondik <steve@cyngn.com> | 2016-09-26 04:54:48 -0700 |
| commit | ccb7f0cd98d431bda93abf9ed6427f0d18dc01d1 (patch) | |
| tree | 28a9f47d82a6314b8026283549c6e38c680ecb4d | |
| parent | 4e874a0cd83488109dfb955df523619f6ebd3e6c (diff) | |
| download | android_packages_apps_Gallery2-ccb7f0cd98d431bda93abf9ed6427f0d18dc01d1.tar.gz android_packages_apps_Gallery2-ccb7f0cd98d431bda93abf9ed6427f0d18dc01d1.tar.bz2 android_packages_apps_Gallery2-ccb7f0cd98d431bda93abf9ed6427f0d18dc01d1.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
| -rw-r--r-- | src/com/android/gallery3d/app/FilterUtils.java | 4 | ||||
| -rwxr-xr-x | 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 bc28a9cc1..430f83b34 100644 --- a/src/com/android/gallery3d/app/FilterUtils.java +++ b/src/com/android/gallery3d/app/FilterUtils.java @@ -215,6 +215,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 f31e188a1..64df1ea64 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -1326,7 +1326,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()); |
