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

Commit fde7df6a authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove forcing wallpaper visible for freeform task

Since secondary home and desktop mode (DesktopWallpaperActivity) is
introduced, it no longer needs the special case to make wallpaper
visible for freeform task.
 i.e. Remove I6553c0fcec770e931c08bed8ef5c533b47afe1b8

This reduces looping all tasks when there is no freeform tasks on
a device which supports freeform.

Bug: 433694978
Flag: com.android.window.flags.do_not_force_wallpaper_for_freeform_task
Test: CtsWindowManagerDeviceWindow
Change-Id: Ib10578c1ade6d70117a39722601de5396e4d8bcf
parent 5d23bdf5
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -135,6 +135,17 @@ flag {
  }
}

flag {
  name: "do_not_force_wallpaper_for_freeform_task"
  namespace: "windowing_frontend"
  description: "Remove legacy condition to reduce overhead"
  bug: "433694978"
  is_fixed_read_only: true
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "bg_priority_for_occluded_freeform_tasks"
  namespace: "windowing_frontend"
+2 −1
Original line number Diff line number Diff line
@@ -676,7 +676,8 @@ class WallpaperController {

    private void findWallpaperTarget() {
        mFindResults.reset();
        if (mService.mAtmService.mSupportsFreeformWindowManagement
        if (!com.android.window.flags.Flags.doNotForceWallpaperForFreeformTask()
                && mService.mAtmService.mSupportsFreeformWindowManagement
                && mDisplayContent.getDefaultTaskDisplayArea()
                .isRootTaskVisible(WINDOWING_MODE_FREEFORM)) {
            // In freeform mode we set the wallpaper as its own target, so we don't need an
+0 −5
Original line number Diff line number Diff line
@@ -1066,18 +1066,13 @@ public class DisplayContentTests extends WindowTestsBase {
                .setDisplay(dc)
                .setCreateActivity(true)
                .build();
        doReturn(true).when(rootTask).isVisible();

        final Task freeformRootTask = new TaskBuilder(mSupervisor)
                .setDisplay(dc)
                .setCreateActivity(true)
                .setWindowingMode(WINDOWING_MODE_FREEFORM)
                .build();
        doReturn(true).when(freeformRootTask).isVisible();
        freeformRootTask.getTopChild().setBounds(100, 100, 300, 400);

        assertTrue(dc.getDefaultTaskDisplayArea().isRootTaskVisible(WINDOWING_MODE_FREEFORM));

        freeformRootTask.getTopNonFinishingActivity().setOrientation(SCREEN_ORIENTATION_LANDSCAPE);
        rootTask.getTopNonFinishingActivity().setOrientation(SCREEN_ORIENTATION_PORTRAIT);
        assertEquals(SCREEN_ORIENTATION_PORTRAIT, dc.getOrientation());