Use aconfig flag for desktop mode

Refactors all flag access in Launcher to be from DesktopTaskView and using a method instead of a static field.
Also using static import for the method so if we need to move it, only imports needs to be updated.

Bug: 304778354
Flag: ACONFIG com.android.wm.shell.enable_desktop_windowing TEAMFOOD
Test: enable the aconfig flag, check that desktop windowing is available

Change-Id: Ia2bdfd865802a635878d72cfb5a90c21dad6ed08
This commit is contained in:
Ats Jenk committed 2023-10-27 10:58:07 -07:00
1 parent 24231d9994
commit 5c25c3a19d
23 files changed
+75 -68

No files matched your search

@@ -20,7 +20,7 @@ import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.quickstep.util.SplitScreenUtils.convertShellSplitBoundsToLauncher;
import static com.android.quickstep.views.DesktopTaskView.DESKTOP_MODE_SUPPORTED;
import static com.android.quickstep.views.DesktopTaskView.isDesktopModeSupported;
import static com.android.wm.shell.util.GroupedRecentTaskInfo.TYPE_FREEFORM;
import android.annotation.TargetApi;
@@ -273,7 +273,7 @@ public class RecentTasksList {
int numVisibleTasks = 0;
for (GroupedRecentTaskInfo rawTask : rawTasks) {
if (DESKTOP_MODE_SUPPORTED && rawTask.getType() == TYPE_FREEFORM) {
if (isDesktopModeSupported() && rawTask.getType() == TYPE_FREEFORM) {
GroupTask desktopTask = createDesktopTask(rawTask);
allTasks.add(desktopTask);
continue;