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

Commit 3f4e5812 authored by Brian Isganitis's avatar Brian Isganitis Committed by Android (Google) Code Review
Browse files

Merge "Prevent meta shortcut from cancelling split select state." into main

parents 42d496d1 84fbec0b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -425,14 +425,14 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
    }

    @Override
    protected boolean isInOverview() {
        return mTaskbarLauncherStateController.isInOverview();
    protected boolean isInOverviewUi() {
        return mTaskbarLauncherStateController.isInOverviewUi();
    }

    @Override
    protected boolean canToggleHomeAllApps() {
        return mLauncher.isResumed()
                && !mTaskbarLauncherStateController.isInOverview()
                && !mTaskbarLauncherStateController.isInOverviewUi()
                && !mLauncher.areFreeformTasksVisible();
    }

+1 −1
Original line number Diff line number Diff line
@@ -665,7 +665,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {

        LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
                LauncherAtom.TaskBarContainer.newBuilder();
        if (mControllers.uiController.isInOverview()) {
        if (mControllers.uiController.isInOverviewUi()) {
            taskbarBuilder.setTaskSwitcherContainer(
                    LauncherAtom.TaskSwitcherContainer.newBuilder());
        }
+1 −1
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas
        ) {
            // Taskbar has some touchable elements, take over the full taskbar area
            if (
                controllers.uiController.isInOverview &&
                controllers.uiController.isInOverviewUi &&
                    DisplayController.isTransientTaskbar(context)
            ) {
                val region =
+2 −2
Original line number Diff line number Diff line
@@ -666,8 +666,8 @@ public class TaskbarLauncherStateController {
                && !mLauncher.getWorkspace().isOverlayShown();
    }

    boolean isInOverview() {
        return mLauncherState == LauncherState.OVERVIEW;
    boolean isInOverviewUi() {
        return mLauncherState.overviewUi;
    }

    private void playStateTransitionAnim(AnimatorSet animatorSet, long duration,
+5 −4
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.statemanager.StatefulActivity;
@@ -339,12 +340,12 @@ public class TaskbarManager {

    /**
     * Toggles All Apps for Taskbar or Launcher depending on the current state.
     *
     * @param homeAllAppsIntent Intent used if Taskbar is not enabled or Launcher is resumed.
     */
    public void toggleAllApps(Intent homeAllAppsIntent) {
    public void toggleAllApps() {
        if (mTaskbarActivityContext == null || mTaskbarActivityContext.canToggleHomeAllApps()) {
            mContext.startActivity(homeAllAppsIntent);
            // Home All Apps should be toggled from this class, because the controllers are not
            // initialized when Taskbar is disabled (i.e. TaskbarActivityContext is null).
            if (mActivity instanceof Launcher l) l.toggleAllAppsSearch();
        } else {
            mTaskbarActivityContext.toggleAllAppsSearch();
        }
Loading