From 534271dfa72af35ba2faca79ab5cb448c138010b Mon Sep 17 00:00:00 2001 From: Jeff Chang Date: Wed, 24 May 2023 03:10:19 +0000 Subject: [PATCH] Remove the launch root switch logic The launch root switching logic is handled from the wm shell now. We can remove the similar logic from the wm core. Bug: 282712995 Test: atest ActivityStarterTests Change-Id: I2e48c705a4ef50276935d28d79649af80e29622a --- .../core/java/com/android/server/wm/ActivityStarter.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index 3e3eb570d0e3f..7f9352b32ac5d 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -2925,15 +2925,6 @@ class ActivityStarter { } } - // If the matching task is already in the adjacent task of the launch target. Adjust to use - // the adjacent task as its launch target. So the existing task will be launched into the - // closer one and won't be reparent redundantly. - final Task adjacentTargetTask = mTargetRootTask.getAdjacentTask(); - if (adjacentTargetTask != null && intentActivity.isDescendantOf(adjacentTargetTask) - && intentTask.isOnTop()) { - mTargetRootTask = adjacentTargetTask; - } - // If the target task is not in the front, then we need to bring it to the front... // except... well, with SINGLE_TASK_LAUNCH it's not entirely clear. We'd like to have // the same behavior as if a new instance was being started, which means not bringing it