From 05ea960d877c3f186024ec768b0c750e6709a50a Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Thu, 17 Oct 2024 05:55:03 +0000 Subject: Fix task cannot exit split if the app is request for moveTaskToBack Regression from aosp/3304112. Use #isDescendantOf to check the hierarchy relationship. Flag: EXEMPT bugfix Bug: 373542340 Test: follow issue steps. Change-Id: Id0e9029484e040458d291620c03d263696edf978 --- services/core/java/com/android/server/wm/Task.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 7b270842b3c5..cbf6c5a02ae3 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -5807,9 +5807,9 @@ class Task extends TaskFragment { } private boolean canMoveTaskToBack(Task task) { - // Checks whether a task is a child of this task because it can be reparetned when + // Checks whether a task is a child of this task because it can be reparented when // transition is deferred. - if (task != this && task.getParent() != this) { + if (task != this && !task.isDescendantOf(this)) { return false; } -- cgit v1.2.3-59-g8ed1b