summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shengsong Tan <sstan@google.com> 2022-07-05 11:00:42 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-07-05 11:00:42 +0000
commit3f5ba376754ca53c69bd413652fa4756f355c696 (patch)
tree3c2b8a718c9b2af3e44d70f1b55dbbb7be62cbe1
parent692d4e65c91a08b3cdd76a1cbb0f234fb547e840 (diff)
parented7fc7970fc82c03d8c83eb45a8b464e3932521e (diff)
Merge "Check is leaf task before remove its child containers" into tm-qpr-dev
-rw-r--r--services/core/java/com/android/server/wm/Task.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 3d127742d7bd..3b97e637a20a 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -738,8 +738,9 @@ class Task extends TaskFragment {
"removeTask:" + reason + " deferring removing taskId=" + mTaskId);
return;
}
+ final boolean isLeafTask = isLeafTask();
removeImmediately(reason);
- if (isLeafTask()) {
+ if (isLeafTask) {
mAtmService.getTaskChangeNotificationController().notifyTaskRemoved(mTaskId);
final TaskDisplayArea taskDisplayArea = getDisplayArea();