summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2012-10-23 18:53:05 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-23 18:53:05 -0700
commit5d3e665359272f8b7b379461ede24918d6b4537e (patch)
tree879fae234c81770edfbdd9b6daed9c991c9a4d48 /src/com
parentf46da69aefd9afe0b4326a2fcea8e33c294136bb (diff)
parent5b1e444b4b6544b04c58be3b9b9a9a64ca4b572d (diff)
downloadandroid_packages_apps_Gallery2-5d3e665359272f8b7b379461ede24918d6b4537e.tar.gz
android_packages_apps_Gallery2-5d3e665359272f8b7b379461ede24918d6b4537e.tar.bz2
android_packages_apps_Gallery2-5d3e665359272f8b7b379461ede24918d6b4537e.zip
Merge "Stay in AlbumPage when dismissing a popup from AP" into gb-ub-photos-arches
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/gallery3d/app/AlbumPage.java8
-rw-r--r--src/com/android/gallery3d/app/StateManager.java7
2 files changed, 7 insertions, 8 deletions
diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java
index c8f296afc..4c945a45b 100644
--- a/src/com/android/gallery3d/app/AlbumPage.java
+++ b/src/com/android/gallery3d/app/AlbumPage.java
@@ -454,14 +454,6 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster
clearLoadingBit(BIT_LOADING_SYNC);
}
mActionModeHandler.pause();
-
- // The camera app should always launch in capture mode when
- // resumed, so make the next resume faster by closing the grid
- // view now
- if (mInCameraAndWantQuitOnPause) {
- if (mActivity.getStateManager().getTopState() == this)
- mActivity.getStateManager().finishState(this, false);
- }
}
@Override
diff --git a/src/com/android/gallery3d/app/StateManager.java b/src/com/android/gallery3d/app/StateManager.java
index 3293e40f7..d77279f78 100644
--- a/src/com/android/gallery3d/app/StateManager.java
+++ b/src/com/android/gallery3d/app/StateManager.java
@@ -160,6 +160,13 @@ public class StateManager {
finishState(state, true);
}
+ public void clearTasks() {
+ // Remove all the states that are on top of the bottom PhotoPage state
+ while (mStack.size() > 1) {
+ mStack.pop().activityState.onDestroy();
+ }
+ }
+
void finishState(ActivityState state, boolean fireOnPause) {
// The finish() request could be rejected (only happens under Monkey),
// If it is rejected, we won't close the last page.