Remove DesktopTaskView.isDesktopModeSupported

- Use Flags.eanbleDesktopWindowingMode directly
- Also clean up unnecessary and improper flag usage

Bug: 309008406
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Test: presubmit
Change-Id: I86ce317ce577f279d2ce819d6dc1738204c2631e
This commit is contained in:
Alex Chau
2024-03-18 18:02:08 +00:00
parent 8896580b58
commit 59781a7d79
22 changed files with 54 additions and 61 deletions
@@ -62,7 +62,7 @@ import static com.android.launcher3.util.DisplayController.CHANGE_NAVIGATION_MOD
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.quickstep.util.AnimUtils.completeRunnableListCallback;
import static com.android.quickstep.util.SplitAnimationTimings.TABLET_HOME_TO_SPLIT;
import static com.android.quickstep.views.DesktopTaskView.isDesktopModeSupported;
import static com.android.window.flags.Flags.enableDesktopWindowingMode;
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY;
import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_50_50;
@@ -259,7 +259,7 @@ public class QuickstepLauncher extends Launcher {
getDepthController(), getStatsLogManager(),
systemUiProxy, RecentsModel.INSTANCE.get(this),
() -> onStateBack());
if (isDesktopModeSupported()) {
if (enableDesktopWindowingMode()) {
mDesktopRecentsTransitionController = new DesktopRecentsTransitionController(
getStateManager(), systemUiProxy, getIApplicationThread(),
getDepthController());
@@ -285,7 +285,7 @@ public class QuickstepLauncher extends Launcher {
mTISBindHelper = new TISBindHelper(this, this::onTISConnected);
mDepthController = new DepthController(this);
mDesktopVisibilityController = new DesktopVisibilityController(this);
if (isDesktopModeSupported()) {
if (enableDesktopWindowingMode()) {
mDesktopVisibilityController.registerSystemUiListener();
mSplitSelectStateController.initSplitFromDesktopController(this);
}
@@ -948,7 +948,7 @@ public class QuickstepLauncher extends Launcher {
@Override
public void setResumed() {
if (isDesktopModeSupported()) {
if (enableDesktopWindowingMode()) {
DesktopVisibilityController controller = mDesktopVisibilityController;
if (controller != null && controller.areFreeformTasksVisible()
&& !controller.isRecentsGestureInProgress()) {