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

Commit 993d81a4 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Do not update root task layer without transition

All root tasks are organized, so the layer should only be set
with a transition.

Bug: 385142011
Flag: com.android.window.flags.update_root_task_layer_only_with_transition
Test: atest ZOrderingTests
Change-Id: I7e4c3bdae8fbff96e21c43f949f0acdecadc8919
parent 1b9f146b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -125,6 +125,17 @@ flag {
    is_fixed_read_only: true
}

flag {
  name: "update_root_task_layer_only_with_transition"
  namespace: "windowing_frontend"
  description: "Avoid changing root task layer outside transition"
  bug: "385142011"
  is_fixed_read_only: true
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "bg_priority_for_occluded_freeform_tasks"
  namespace: "windowing_frontend"
+4 −1
Original line number Diff line number Diff line
@@ -649,7 +649,10 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
    }

    void assignRootTaskOrdering(SurfaceControl.Transaction t) {
        if (getParent() == null) {
        if (!mTransitionController.mBuildingTransitionLayers
                && com.android.window.flags.Flags.updateRootTaskLayerOnlyWithTransition()
                && mTransitionController.isShellTransitionsEnabled()) {
            // All root tasks can be organized, so handle them centrally by shell transitions.
            return;
        }
        mTmpAlwaysOnTopChildren.clear();
+2 −0
Original line number Diff line number Diff line
@@ -298,6 +298,7 @@ public class ZOrderingTests extends WindowTestsBase {
        mDisplayContent.setImeLayeringTarget(imeAppTarget);
        assertWithMessage("IME control target was updated")
                .that(mDisplayContent.getImeControlTarget()).isEqualTo(imeAppTarget);
        mDisplayContent.mTransitionController.mBuildingTransitionLayers = true;
        mDisplayContent.assignChildLayers(mTransaction);

        // Ime should be above all app windows except for non-fullscreen app window above it and
@@ -374,6 +375,7 @@ public class ZOrderingTests extends WindowTestsBase {
                ACTIVITY_TYPE_HOME).setDisplay(mDisplayContent).build();
        final WindowState anyWindow2 = createWindow("anyWindow2");

        mDisplayContent.mTransitionController.mBuildingTransitionLayers = true;
        mDisplayContent.assignChildLayers(mTransaction);

        assertWindowHigher(dockedStackWindow, homeActivityWindow);