summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jorge Gil <jorgegil@google.com> 2025-02-04 15:13:14 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-04 15:13:14 -0800
commitca4589b982de6017619a7d0a946dafd8997b0059 (patch)
treea1ec37c6002b1f4384d4176e0487b8e6f5828755
parent33f6ddfdab696f9eea32f07043188328065183ba (diff)
parenteda4857791108356751bb65762e2d674d1622d33 (diff)
Merge "[10/N] Desks: Let non-root organized leaves use launch bounds" into main
-rw-r--r--services/core/java/com/android/server/wm/Task.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 4b07e9e232be..f75e7175b4d2 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -2390,18 +2390,17 @@ class Task extends TaskFragment {
mTaskSupervisor.mLaunchParamsPersister.saveTask(this, display);
}
- Rect updateOverrideConfigurationFromLaunchBounds() {
+ void updateOverrideConfigurationFromLaunchBounds() {
// If the task is controlled by another organized task, do not set override
// configurations and let its parent (organized task) to control it;
final Task rootTask = getRootTask();
- final Rect bounds = rootTask != this && rootTask.isOrganized() ? null : getLaunchBounds();
- setBounds(bounds);
- if (bounds != null && !bounds.isEmpty()) {
- // TODO: Review if we actually want to do this - we are setting the launch bounds
- // directly here.
- bounds.set(getRequestedOverrideBounds());
+ boolean shouldInheritBounds = rootTask != this && rootTask.isOrganized();
+ if (Flags.enableMultipleDesktopsBackend()) {
+ // Only inherit from organized parent when this task is not organized.
+ shouldInheritBounds &= !isOrganized();
}
- return bounds;
+ final Rect bounds = shouldInheritBounds ? null : getLaunchBounds();
+ setBounds(bounds);
}
/** Returns the bounds that should be used to launch this task. */