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

Commit 3323296f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove DesktopTaskView.isDesktopModeSupported" into main

parents 8944afda 59781a7d
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ import static android.view.View.VISIBLE;

import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.quickstep.views.DesktopTaskView.isDesktopModeSupported;
import static com.android.window.flags.Flags.enableDesktopWindowingMode;

import android.os.Debug;
import android.os.SystemProperties;
@@ -136,7 +136,7 @@ public class DesktopVisibilityController {
            Log.d(TAG, "setVisibleFreeformTasksCount: visibleTasksCount=" + visibleTasksCount
                    + " currentValue=" + mVisibleFreeformTasksCount);
        }
        if (!isDesktopModeSupported()) {
        if (!enableDesktopWindowingMode()) {
            return;
        }

@@ -180,7 +180,7 @@ public class DesktopVisibilityController {
            Log.d(TAG, "setOverviewStateEnabled: enabled=" + overviewStateEnabled
                    + " currentValue=" + mInOverviewState);
        }
        if (!isDesktopModeSupported()) {
        if (!enableDesktopWindowingMode()) {
            return;
        }
        if (overviewStateEnabled != mInOverviewState) {
@@ -202,7 +202,7 @@ public class DesktopVisibilityController {
            Log.d(TAG, "setBackgroundStateEnabled: enabled=" + backgroundStateEnabled
                    + " currentValue=" + mBackgroundStateEnabled);
        }
        if (!isDesktopModeSupported()) {
        if (!enableDesktopWindowingMode()) {
            return;
        }
        if (backgroundStateEnabled != mBackgroundStateEnabled) {
@@ -229,7 +229,7 @@ public class DesktopVisibilityController {
     * Notify controller that recents gesture has started.
     */
    public void setRecentsGestureStart() {
        if (!isDesktopModeSupported()) {
        if (!enableDesktopWindowingMode()) {
            return;
        }
        if (DEBUG) {
@@ -243,7 +243,7 @@ public class DesktopVisibilityController {
     * {@link com.android.quickstep.GestureState.GestureEndTarget}
     */
    public void setRecentsGestureEnd(@Nullable GestureState.GestureEndTarget endTarget) {
        if (!isDesktopModeSupported()) {
        if (!enableDesktopWindowingMode()) {
            return;
        }
        if (DEBUG) {
+3 −3
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 */
package com.android.launcher3.taskbar;

import static com.android.quickstep.views.DesktopTaskView.isDesktopModeSupported;
import static com.android.window.flags.Flags.enableDesktopWindowingMode;

import android.content.ComponentName;
import android.content.pm.ActivityInfo;
@@ -113,7 +113,7 @@ public final class KeyboardQuickSwitchController implements
        DesktopVisibilityController desktopController =
                LauncherActivityInterface.INSTANCE.getDesktopVisibilityController();
        final boolean onDesktop =
                isDesktopModeSupported()
                enableDesktopWindowingMode()
                        && desktopController != null
                        && desktopController.areFreeformTasksVisible();

@@ -154,7 +154,7 @@ public final class KeyboardQuickSwitchController implements

        // Hide all desktop tasks and show them on the hidden tile
        int hiddenDesktopTasks = 0;
        if (isDesktopModeSupported()) {
        if (enableDesktopWindowingMode()) {
            DesktopTask desktopTask = findDesktopTask(tasks);
            if (desktopTask != null) {
                hiddenDesktopTasks = desktopTask.tasks.size();
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ import static com.android.launcher3.statemanager.BaseState.FLAG_NON_INTERACTIVE;
import static com.android.launcher3.taskbar.TaskbarEduTooltipControllerKt.TOOLTIP_STEP_FEATURES;
import static com.android.launcher3.taskbar.TaskbarLauncherStateController.FLAG_VISIBLE;
import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS;
import static com.android.quickstep.views.DesktopTaskView.isDesktopModeSupported;
import static com.android.window.flags.Flags.enableDesktopWindowingMode;

import android.animation.Animator;
import android.animation.AnimatorSet;
@@ -209,7 +209,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
        DesktopVisibilityController desktopController =
                LauncherActivityInterface.INSTANCE.getDesktopVisibilityController();
        final boolean onDesktop =
                isDesktopModeSupported()
                enableDesktopWindowingMode()
                        && desktopController != null
                        && desktopController.areFreeformTasksVisible();
        if (onDesktop) {
+2 −2
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_IME_SWITCHER_BUTTON_TAP;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_OVERVIEW_BUTTON_LONGPRESS;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_OVERVIEW_BUTTON_TAP;
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.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
@@ -281,7 +281,7 @@ public class TaskbarNavButtonController implements TaskbarControllers.LoggableTa
    private void navigateHome() {
        TaskUtils.closeSystemWindowsAsync(CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY);

        if (isDesktopModeSupported()) {
        if (enableDesktopWindowingMode()) {
            DesktopVisibilityController desktopVisibilityController =
                    LauncherActivityInterface.INSTANCE.getDesktopVisibilityController();
            if (desktopVisibilityController != null) {
+4 −4
Original line number Diff line number Diff line
@@ -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()) {
Loading