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
2023-10-12 09:24:56 -07:00
parent 24231d9994
commit 5c25c3a19d
23 changed files with 75 additions and 68 deletions
@@ -30,6 +30,7 @@ import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PR
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_TRANSLATE;
import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
import static com.android.quickstep.views.DesktopTaskView.isDesktopModeSupported;
import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET;
import static com.android.quickstep.views.RecentsView.RECENTS_SCALE_PROPERTY;
import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD;
@@ -48,7 +49,6 @@ import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.NavigationMode;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.TaskUtils;
import com.android.quickstep.views.DesktopTaskView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
@@ -79,7 +79,7 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll
if ((ev.getEdgeFlags() & Utilities.EDGE_NAV_BAR) == 0) {
return false;
}
if (DesktopTaskView.DESKTOP_MODE_SUPPORTED) {
if (isDesktopModeSupported()) {
// TODO(b/268075592): add support for quickswitch to/from desktop
return false;
}