Disregard closing activities when blocking previous activities.

- Extending the check added in ag/2468582, if a translucent assistant
  is started on top of a fullscreen activity and subsequently launches
  another fullscreen activity, then returning to the assistant should
  not preclude the otherwise visible fullscreen activity under the
  assistant.  To do that, this logic should only stop checking for
  the visibility of the activities if the task is not finishing and
  will return to another task (otherwise this results in a black
  screen).

Bug: 37527727
Bug: 63581322
Test: android.server.cts.ActivityManagerAssistantStackTests
Test: go/wm-smoke
Change-Id: Ib935b6023b55bda0797f7cb9849595d821ef7d11
This commit is contained in:
Winson Chung
2017-07-19 11:58:59 -07:00
parent 8aaa5adae6
commit 031570278f

View File

@@ -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;
}
}