From 22e49fac094c16fe03e3e536877e920f5b938f4e Mon Sep 17 00:00:00 2001 From: Issei Suzuki Date: Fri, 7 Jan 2022 16:35:48 +0000 Subject: [PATCH] Follow up change to clean up the code (no-op). Bug: 205189147 Test: atest AppTransitionControllerTest Change-Id: I4827b652d40516e7f99b50360758b3514f07a9fe --- .../android/server/wm/AppTransitionController.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/wm/AppTransitionController.java b/services/core/java/com/android/server/wm/AppTransitionController.java index 3d37278cd4003..475a9fb36f920 100644 --- a/services/core/java/com/android/server/wm/AppTransitionController.java +++ b/services/core/java/com/android/server/wm/AppTransitionController.java @@ -799,19 +799,18 @@ public class AppTransitionController { } /** - * Returns {@code true} if a given {@link WindowContainer} is an embedded Task. + * Returns {@code true} if a given {@link WindowContainer} is an embedded Task in + * {@link com.android.wm.shell.TaskView}. * * Note that this is a short term workaround to support Android Auto until it migrate to * ShellTransition. This should only be used by {@link #getAnimationTargets}. * * TODO(b/213312721): Remove this predicate and its callers once ShellTransition is enabled. */ - private static boolean isEmbeddedTask(WindowContainer wc) { + private static boolean isTaskViewTask(WindowContainer wc) { // We use Task#mRemoveWithTaskOrganizer to identify an embedded Task, but this is a hack and // it is not guaranteed to work this logic in the future version. - return !WindowManagerService.sEnableShellTransitions - && wc instanceof Task - && ((Task) wc).mRemoveWithTaskOrganizer; + return wc instanceof Task && ((Task) wc).mRemoveWithTaskOrganizer; } /** @@ -860,7 +859,7 @@ public class AppTransitionController { siblings.add(current); boolean canPromote = true; - if (isEmbeddedTask(current)) { + if (isTaskViewTask(current)) { // Don't animate an embedded Task in app transition. This is a short term workaround // to prevent conflict of surface hierarchy changes between legacy app transition // and TaskView (b/205189147). @@ -909,7 +908,7 @@ public class AppTransitionController { for (int j = 0; j < parent.getChildCount(); ++j) { final WindowContainer sibling = parent.getChildAt(j); if (candidates.remove(sibling)) { - if (!isEmbeddedTask(sibling)) { + if (!isTaskViewTask(sibling)) { // Don't animate an embedded Task in app transition. This is a short // term workaround to prevent conflict of surface hierarchy changes // between legacy app transition and TaskView (b/205189147).