Loading core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -226,3 +226,14 @@ flag { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "respect_leaf_task_bounds" description: "Respect the override bounds of the leaf tasks that are organized by root tasks" bug: "410745462" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } services/core/java/com/android/server/wm/ActivityRecord.java +1 −3 Original line number Diff line number Diff line Loading @@ -1521,9 +1521,7 @@ final class ActivityRecord extends WindowToken { // First time we are adding the activity to the system. mVoiceInteraction = newTask.voiceSession != null; // TODO(b/36505427): Maybe this call should be moved inside // updateOverrideConfiguration() newTask.updateOverrideConfigurationFromLaunchBounds(); newTask.setInitialBoundsIfNeeded(); // When an activity is started directly into a split-screen fullscreen root task, we // need to update the initial multi-window modes so that the callbacks are scheduled // correctly when the user leaves that mode. Loading services/core/java/com/android/server/wm/Task.java +17 −5 Original line number Diff line number Diff line Loading @@ -1188,10 +1188,7 @@ class Task extends TaskFragment { // First time we are adding the task to the system. if (oldParent == null && newParent != null) { // TODO: Super random place to be doing this, but aligns with what used to be done // before we unified Task level. Look into if this can be done in a better place. updateOverrideConfigurationFromLaunchBounds(); setInitialBoundsIfNeeded(); } mRootWindowContainer.updateUIDsPresentOnDisplay(); Loading Loading @@ -2402,7 +2399,22 @@ class Task extends TaskFragment { mTaskSupervisor.mLaunchParamsPersister.saveTask(this, display); } void updateOverrideConfigurationFromLaunchBounds() { /** * Called when the Task is newly added to the hierarchy. Updates the Task bounds from the * persist task bounds if needed. */ void setInitialBoundsIfNeeded() { if (!com.android.window.flags.Flags.respectLeafTaskBounds()) { updateOverrideConfigurationFromLaunchBounds(); } else if (persistTaskBounds(getWindowConfiguration()) && getRequestedOverrideBounds().isEmpty()) { // Sets the Task bounds to the non-fullscreen bounds persisted last time if the Task // has no override bounds set. setBounds(mLastNonFullscreenBounds); } } private void updateOverrideConfigurationFromLaunchBounds() { final Task rootTask = getRootTask(); final boolean hasParentTask = rootTask != this; final int windowingMode = getWindowingMode(); Loading Loading
core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -226,3 +226,14 @@ flag { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "respect_leaf_task_bounds" description: "Respect the override bounds of the leaf tasks that are organized by root tasks" bug: "410745462" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } }
services/core/java/com/android/server/wm/ActivityRecord.java +1 −3 Original line number Diff line number Diff line Loading @@ -1521,9 +1521,7 @@ final class ActivityRecord extends WindowToken { // First time we are adding the activity to the system. mVoiceInteraction = newTask.voiceSession != null; // TODO(b/36505427): Maybe this call should be moved inside // updateOverrideConfiguration() newTask.updateOverrideConfigurationFromLaunchBounds(); newTask.setInitialBoundsIfNeeded(); // When an activity is started directly into a split-screen fullscreen root task, we // need to update the initial multi-window modes so that the callbacks are scheduled // correctly when the user leaves that mode. Loading
services/core/java/com/android/server/wm/Task.java +17 −5 Original line number Diff line number Diff line Loading @@ -1188,10 +1188,7 @@ class Task extends TaskFragment { // First time we are adding the task to the system. if (oldParent == null && newParent != null) { // TODO: Super random place to be doing this, but aligns with what used to be done // before we unified Task level. Look into if this can be done in a better place. updateOverrideConfigurationFromLaunchBounds(); setInitialBoundsIfNeeded(); } mRootWindowContainer.updateUIDsPresentOnDisplay(); Loading Loading @@ -2402,7 +2399,22 @@ class Task extends TaskFragment { mTaskSupervisor.mLaunchParamsPersister.saveTask(this, display); } void updateOverrideConfigurationFromLaunchBounds() { /** * Called when the Task is newly added to the hierarchy. Updates the Task bounds from the * persist task bounds if needed. */ void setInitialBoundsIfNeeded() { if (!com.android.window.flags.Flags.respectLeafTaskBounds()) { updateOverrideConfigurationFromLaunchBounds(); } else if (persistTaskBounds(getWindowConfiguration()) && getRequestedOverrideBounds().isEmpty()) { // Sets the Task bounds to the non-fullscreen bounds persisted last time if the Task // has no override bounds set. setBounds(mLastNonFullscreenBounds); } } private void updateOverrideConfigurationFromLaunchBounds() { final Task rootTask = getRootTask(); final boolean hasParentTask = rootTask != this; final int windowingMode = getWindowingMode(); Loading