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

Commit 6e1c2153 authored by Jiaming Liu's avatar Jiaming Liu
Browse files

Add TRANSACT_EFFECTS_LIFECYCLE after reorder operations

After updating the child layers, TRANSACT_EFFECTS_LIFECYCLE is still
needed, otherwise the surface transaction is not applied

Bug: 320720349
Test: atest TaskFragmentOrganizerControllerTest
Change-Id: I057b710d20bae6dca56ba50b6163da08cdd4a92c
parent ad685048
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -1471,12 +1471,11 @@ 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 {
                        if (!taskFragment.hasChild()) {
                            // Ensure that the child layers are updated if the TaskFragment is empty
                            task.assignChildLayers();
                        }
                        effects |= TRANSACT_EFFECTS_LIFECYCLE;
                    }
                }
                break;
@@ -1491,12 +1490,11 @@ 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 {
                    if (!taskFragment.hasChild()) {
                        // Ensure that the child layers are updated if the TaskFragment is empty.
                        task.assignChildLayers();
                    }
                    effects |= TRANSACT_EFFECTS_LIFECYCLE;
                }
                break;
            }
@@ -1505,12 +1503,11 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                if (task != null) {
                    task.mChildren.remove(taskFragment);
                    task.mChildren.add(taskFragment);
                    if (taskFragment.hasChild()) {
                        effects |= TRANSACT_EFFECTS_LIFECYCLE;
                    } else {
                    if (!taskFragment.hasChild()) {
                        // Ensure that the child layers are updated if the TaskFragment is empty.
                        task.assignChildLayers();
                    }
                    effects |= TRANSACT_EFFECTS_LIFECYCLE;
                }
                break;
            }