Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76146168 authored by Jiaming Liu's avatar Jiaming Liu
Browse files

Update layers after reorder operations

The reorder operations do not always result in visibility changes, and
when not, the child layers are not updated. This change ensures that the
window hierarchy change is always reflected in the child layers for
OP_TYPE_REORDER_TO_FRONT, OP_TYPE_REORDER_TO_BOTTOM_OF_TASK, and
OP_TYPE_REORDER_TO_TOP_OF_TASK

Bug: 320720349
Test: atest TaskFragmentOrganizerControllerTest
Change-Id: Ieb850308e11aa67ab59c8c8eff9fdc69f27071fe
parent ca045f28
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -1471,7 +1471,12 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                        final int index = task.mChildren.indexOf(topTaskFragment);
                        task.mChildren.remove(taskFragment);
                        task.mChildren.add(index, taskFragment);
                        if (taskFragment.hasChild()) {
                            effects |= TRANSACT_EFFECTS_LIFECYCLE;
                        } else {
                            // Ensure that the child layers are updated if the TaskFragment is empty
                            task.assignChildLayers();
                        }
                    }
                }
                break;
@@ -1486,7 +1491,12 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                if (task != null) {
                    task.mChildren.remove(taskFragment);
                    task.mChildren.add(0, taskFragment);
                    if (taskFragment.hasChild()) {
                        effects |= TRANSACT_EFFECTS_LIFECYCLE;
                    } else {
                        // Ensure that the child layers are updated if the TaskFragment is empty.
                        task.assignChildLayers();
                    }
                }
                break;
            }
@@ -1495,7 +1505,12 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                if (task != null) {
                    task.mChildren.remove(taskFragment);
                    task.mChildren.add(taskFragment);
                    if (taskFragment.hasChild()) {
                        effects |= TRANSACT_EFFECTS_LIFECYCLE;
                    } else {
                        // Ensure that the child layers are updated if the TaskFragment is empty.
                        task.assignChildLayers();
                    }
                }
                break;
            }