From 3f74b33211fd428c838deed0168719b05c683410 Mon Sep 17 00:00:00 2001 From: Garfield Tan Date: Thu, 23 Jul 2020 10:56:06 -0700 Subject: [PATCH] Stop keeping freeform activities visible. This logic was introduced when there could be multiple tasks in the freeform stack so it was necessary to keep freeform tasks visible even when they are not in the front. However right now stack and task are the same so activities became the children of the original stack, and we don't have the need to keep activities behind the top activity always visible. Bug: 161366153 Test: atest ActivityVisibilityTests#testConvert* on freeform first devices. Change-Id: Ibeeba5ca8b6b60583eec9cbee9b7209ee17b1037 --- .../android/server/wm/EnsureActivitiesVisibleHelper.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java b/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java index c7cba77f67975..e2c07491db012 100644 --- a/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java +++ b/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java @@ -16,8 +16,6 @@ package com.android.server.wm; -import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; - import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_VISIBILITY; import static com.android.server.wm.Task.TAG_VISIBILITY; @@ -174,12 +172,7 @@ class EnsureActivitiesVisibleHelper { } final int windowingMode = mContiner.getWindowingMode(); - if (windowingMode == WINDOWING_MODE_FREEFORM) { - // The visibility of tasks and the activities they contain in freeform stack are - // determined individually unlike other stacks where the visibility or fullscreen - // status of an activity in a previous task affects other. - mBehindFullscreenActivity = !mContainerShouldBeVisible; - } else if (!mBehindFullscreenActivity && mContiner.isActivityTypeHome() + if (!mBehindFullscreenActivity && mContiner.isActivityTypeHome() && r.isRootOfTask()) { if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Home task: at " + mContiner + " stackShouldBeVisible=" + mContainerShouldBeVisible