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

Commit 4f850a42 authored by Vinit Nayak's avatar Vinit Nayak Committed by Android (Google) Code Review
Browse files

Merge changes I9e56ddbe,I8767deea into main

* changes:
  Disallow taskbar long click when in split selection state
  Add method to determine if launcher is in split selection state
parents 01849e4c 114293fb
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.launcher3.QuickstepTransitionManager;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.anim.AnimatorListeners;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
@@ -209,7 +210,10 @@ public class TaskbarLauncherStateController {
                        updateStateForFlag(FLAG_RESUMED, true);
                    }
                    applyState();
                    boolean disallowLongClick = finalState == LauncherState.OVERVIEW_SPLIT_SELECT;
                    boolean disallowLongClick =
                            FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE.get()
                                    ? mLauncher.isSplitSelectionEnabled()
                                    : finalState == LauncherState.OVERVIEW_SPLIT_SELECT;
                    com.android.launcher3.taskbar.Utilities.setOverviewDragState(
                            mControllers, finalState.disallowTaskbarGlobalDrag(),
                            disallowLongClick, finalState.allowTaskbarInitialSplitSelection());
+1 −1
Original line number Diff line number Diff line
@@ -689,7 +689,7 @@ public class QuickstepLauncher extends Launcher {
    }

    @Override
    protected boolean isSplitSelectionEnabled() {
    public boolean isSplitSelectionEnabled() {
        return mSplitSelectStateController.isSplitSelectActive();
    }

+1 −1
Original line number Diff line number Diff line
@@ -3111,7 +3111,7 @@ public class Launcher extends StatefulActivity<LauncherState>
    }

    /** To be overridden by subclasses */
    protected boolean isSplitSelectionEnabled() {
    public boolean isSplitSelectionEnabled() {
        // Overridden
        return false;
    }
+9 −0
Original line number Diff line number Diff line
@@ -145,6 +145,15 @@ public interface ActivityContext {
        // Overridden, intentionally empty
    }

    /**
     * @return {@code true} if user has selected the first split app and is in the process of
     *         selecting the second
     */
    default boolean isSplitSelectionEnabled() {
        // Overridden
        return false;
    }

    /**
     * The root view to support drag-and-drop and popup support.
     */