summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWale Ogunwale <ogunwale@google.com>2015-08-12 00:44:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-12 00:44:00 +0000
commitb3a6244c814d0e5fc6c35875352610d3290a9825 (patch)
tree4465ae80574ff2b649ef361fed84f27e4c6ca1e8
parent5717273b04f9164834f6a713d6e82c3641197124 (diff)
parentceada4fd80a7502b0057cf683661b2ea65a2652d (diff)
downloadframeworks_base-b3a6244c814d0e5fc6c35875352610d3290a9825.zip
frameworks_base-b3a6244c814d0e5fc6c35875352610d3290a9825.tar.gz
frameworks_base-b3a6244c814d0e5fc6c35875352610d3290a9825.tar.bz2
am ceada4fd: am e43d43c3: Merge "Fixed issue with moveTaskToBack on single stack devices" into mnc-dev
* commit 'ceada4fd80a7502b0057cf683661b2ea65a2652d': Fixed issue with moveTaskToBack on single stack devices
-rw-r--r--services/core/java/com/android/server/am/ActivityStack.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index a75cc48..6e34876 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -3740,7 +3740,12 @@ final class ActivityStack {
if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare to back transition: task=" + taskId);
boolean prevIsHome = false;
- if (tr.isOverHomeStack()) {
+
+ // If true, we should resume the home activity next if the task we are moving to the
+ // back is over the home stack. We force to false if the task we are moving to back
+ // is the home task and we don't want it resumed after moving to the back.
+ final boolean canGoHome = !tr.isHomeTask() && tr.isOverHomeStack();
+ if (canGoHome) {
final TaskRecord nextTask = getNextTask(tr);
if (nextTask != null) {
nextTask.setTaskToReturnTo(tr.getTaskToReturnTo());
@@ -3774,8 +3779,7 @@ final class ActivityStack {
}
final TaskRecord task = mResumedActivity != null ? mResumedActivity.task : null;
- if (prevIsHome || task == tr && tr.isOverHomeStack()
- || numTasks <= 1 && isOnHomeDisplay()) {
+ if (prevIsHome || (task == tr && canGoHome) || (numTasks <= 1 && isOnHomeDisplay())) {
if (!mService.mBooting && !mService.mBooted) {
// Not ready yet!
return false;