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

Commit f32f5179 authored by Ats Jenk's avatar Ats Jenk
Browse files

Remove desktop tile from proto 1 of desktop windowing

Separate desktop tile in overview that groups together all open desktop
tasks, is only available with prototype 2. In prototype 1 of desktop
windowing, each task will show up as a separate tile.

Bug: 266711786
Test: with proto1 enabled, launch some apps, open overview and observe each
  app having their own tile
Test: with proto1 enabled, tap on any tile in overview and observe that
  task is added to existing apps on desktop
Change-Id: Ic9385ff047e0c8908a74d88f88ae5c46e0309cfd
parent ba73400f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package com.android.quickstep;

import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.quickstep.views.DesktopTaskView.DESKTOP_MODE_SUPPORTED;
import static com.android.quickstep.views.DesktopTaskView.DESKTOP_IS_PROTO2_ENABLED;
import static com.android.wm.shell.util.GroupedRecentTaskInfo.TYPE_FREEFORM;

import android.annotation.TargetApi;
@@ -270,7 +270,7 @@ public class RecentTasksList {
        TaskLoadResult allTasks = new TaskLoadResult(requestId, loadKeysOnly, rawTasks.size());

        for (GroupedRecentTaskInfo rawTask : rawTasks) {
            if (DESKTOP_MODE_SUPPORTED && rawTask.getType() == TYPE_FREEFORM) {
            if (DESKTOP_IS_PROTO2_ENABLED && rawTask.getType() == TYPE_FREEFORM) {
                GroupTask desktopTask = createDesktopTask(rawTask);
                allTasks.add(desktopTask);
                continue;
+5 −2
Original line number Diff line number Diff line
@@ -61,14 +61,17 @@ import java.util.function.Consumer;
// TODO(b/249371338): TaskView needs to be refactored to have better support for N tasks.
public class DesktopTaskView extends TaskView {

    /** Flag to indicate whether desktop windowing proto 1 is enabled */
    private static final boolean DESKTOP_IS_PROTO1_ENABLED = SystemProperties.getBoolean(
            "persist.wm.debug.desktop_mode", false);

    /** Flag to indicate whether desktop windowing proto 2 is enabled */
    public static final boolean DESKTOP_IS_PROTO2_ENABLED = SystemProperties.getBoolean(
            "persist.wm.debug.desktop_mode_2", false);

    /** Flags to indicate whether desktop mode is available on the device */
    public static final boolean DESKTOP_MODE_SUPPORTED =
            SystemProperties.getBoolean("persist.wm.debug.desktop_mode", false)
                    || DESKTOP_IS_PROTO2_ENABLED;
            DESKTOP_IS_PROTO1_ENABLED || DESKTOP_IS_PROTO2_ENABLED;

    private static final String TAG = DesktopTaskView.class.getSimpleName();