summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/am/ActivityStack.java8
1 files changed, 5 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 777a36887440..51e0e3bfd022 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -1912,9 +1912,11 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
} else if (mStackId == FULLSCREEN_WORKSPACE_STACK_ID) {
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Skipping after task=" + task
+ " returning to non-application type=" + task.getTaskToReturnTo());
- // Once we reach a fullscreen task that should return to another task, then no
- // other activities behind that one should be visible.
- if (task.getTaskToReturnTo() != APPLICATION_ACTIVITY_TYPE) {
+ // Once we reach a fullscreen stack task that has a running activity and should
+ // return to another stack task, then no other activities behind that one should
+ // be visible.
+ if (task.topRunningActivityLocked() != null &&
+ task.getTaskToReturnTo() != APPLICATION_ACTIVITY_TYPE) {
behindFullscreenActivity = true;
}
}