summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Christopher Tate <ctate@google.com> 2012-06-12 13:08:18 -0700
committer Christopher Tate <ctate@google.com> 2012-06-12 13:08:18 -0700
commit5007ddded6ec4b47c253d3c039806eb5dd77b40e (patch)
treee0c4a4446e13cf8833688b8df9fbfcec6905547b
parent0d8eba64b2ee2921915e0f6793ddd2d8f44e2428 (diff)
Make sure to stop noHistory="true" activities properly
The code was correctly inducing a 'finish' when such an activity was being stopped, but then was not continuing with the rest of the stop bookkeeping at that point. In some circumstances this could result in an inconsistent state, with the activity marked as finishing but neither in the foreground nor stopped. Bug 6585403 Change-Id: Ib5c5be885bc6534e099e040d87a8589f7b7454ce
-rwxr-xr-xservices/java/com/android/server/am/ActivityStack.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 6af7a88aed90..8a86fe7a28b1 100755
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -3282,7 +3282,9 @@ final class ActivityStack {
requestFinishActivityLocked(r.appToken, Activity.RESULT_CANCELED, null,
"no-history");
}
- } else if (r.app != null && r.app.thread != null) {
+ }
+
+ if (r.app != null && r.app.thread != null) {
if (mMainStack) {
if (mService.mFocusedActivity == r) {
mService.setFocusedActivityLocked(topRunningActivityLocked(null));