Loading core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -181,3 +181,14 @@ flag { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "fix_no_container_update_without_resize" description: "Fix the containers not being updated when the Task is brought to front and has the same configuration" bug: "344721335" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java +10 −1 Original line number Diff line number Diff line Loading @@ -904,14 +904,23 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen @GuardedBy("mLock") void updateContainersInTaskIfVisible(@NonNull WindowContainerTransaction wct, int taskId) { final TaskContainer taskContainer = getTaskContainer(taskId); if (taskContainer != null && taskContainer.isVisible()) { if (taskContainer == null) { return; } if (taskContainer.isVisible()) { updateContainersInTask(wct, taskContainer); } else if (Flags.fixNoContainerUpdateWithoutResize()) { // the TaskFragmentContainers need to be updated when the task becomes visible taskContainer.mTaskFragmentContainersNeedsUpdate = true; } } @GuardedBy("mLock") private void updateContainersInTask(@NonNull WindowContainerTransaction wct, @NonNull TaskContainer taskContainer) { taskContainer.mTaskFragmentContainersNeedsUpdate = false; // Update all TaskFragments in the Task. Make a copy of the list since some may be // removed on updating. final List<TaskFragmentContainer> containers = taskContainer.getTaskFragmentContainers(); Loading libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskContainer.java +8 −1 Original line number Diff line number Diff line Loading @@ -107,6 +107,12 @@ class TaskContainer { */ private boolean mPlaceholderRuleSuppressed; /** * {@code true} if the TaskFragments in this Task needs to be updated next time the Task * becomes visible. See {@link #shouldUpdateContainer(TaskFragmentParentInfo)} */ boolean mTaskFragmentContainersNeedsUpdate; /** * The {@link TaskContainer} constructor * Loading Loading @@ -185,7 +191,8 @@ class TaskContainer { // If the task properties equals regardless of starting position, don't // need to update the container. return mInfo.getConfiguration().diffPublicOnly(configuration) != 0 return mTaskFragmentContainersNeedsUpdate || mInfo.getConfiguration().diffPublicOnly(configuration) != 0 || mInfo.getDisplayId() != info.getDisplayId(); } Loading Loading
core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -181,3 +181,14 @@ flag { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "fix_no_container_update_without_resize" description: "Fix the containers not being updated when the Task is brought to front and has the same configuration" bug: "344721335" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } }
libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java +10 −1 Original line number Diff line number Diff line Loading @@ -904,14 +904,23 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen @GuardedBy("mLock") void updateContainersInTaskIfVisible(@NonNull WindowContainerTransaction wct, int taskId) { final TaskContainer taskContainer = getTaskContainer(taskId); if (taskContainer != null && taskContainer.isVisible()) { if (taskContainer == null) { return; } if (taskContainer.isVisible()) { updateContainersInTask(wct, taskContainer); } else if (Flags.fixNoContainerUpdateWithoutResize()) { // the TaskFragmentContainers need to be updated when the task becomes visible taskContainer.mTaskFragmentContainersNeedsUpdate = true; } } @GuardedBy("mLock") private void updateContainersInTask(@NonNull WindowContainerTransaction wct, @NonNull TaskContainer taskContainer) { taskContainer.mTaskFragmentContainersNeedsUpdate = false; // Update all TaskFragments in the Task. Make a copy of the list since some may be // removed on updating. final List<TaskFragmentContainer> containers = taskContainer.getTaskFragmentContainers(); Loading
libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskContainer.java +8 −1 Original line number Diff line number Diff line Loading @@ -107,6 +107,12 @@ class TaskContainer { */ private boolean mPlaceholderRuleSuppressed; /** * {@code true} if the TaskFragments in this Task needs to be updated next time the Task * becomes visible. See {@link #shouldUpdateContainer(TaskFragmentParentInfo)} */ boolean mTaskFragmentContainersNeedsUpdate; /** * The {@link TaskContainer} constructor * Loading Loading @@ -185,7 +191,8 @@ class TaskContainer { // If the task properties equals regardless of starting position, don't // need to update the container. return mInfo.getConfiguration().diffPublicOnly(configuration) != 0 return mTaskFragmentContainersNeedsUpdate || mInfo.getConfiguration().diffPublicOnly(configuration) != 0 || mInfo.getDisplayId() != info.getDisplayId(); } Loading