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

Commit 5e47e78a authored by Alex Chau's avatar Alex Chau Committed by Android (Google) Code Review
Browse files

Merge "Taskbar in overview" into tm-qpr-dev

parents 8ff85dc7 d67ddc49
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import com.android.launcher3.LauncherState;
import com.android.launcher3.QuickstepTransitionManager;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.InstanceId;
import com.android.launcher3.logging.InstanceIdSequence;
import com.android.launcher3.model.data.ItemInfo;
@@ -116,7 +117,8 @@ public class LauncherTaskbarUIController extends TaskbarUIController {

    @Override
    protected boolean isTaskbarTouchable() {
        return !mTaskbarLauncherStateController.isAnimatingToLauncher();
        return !(mTaskbarLauncherStateController.isAnimatingToLauncher()
                && mTaskbarLauncherStateController.goingToAlignedLauncherState());
    }

    public void setShouldDelayLauncherStateAnim(boolean shouldDelayLauncherStateAnim) {
@@ -291,10 +293,15 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
    @Override
    public void setSystemGestureInProgress(boolean inProgress) {
        super.setSystemGestureInProgress(inProgress);
        // TODO(b/250645563): Don't show round corners when leaving in-app state, and remove
        // forceHideBackground call entirely.
        if (!FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get()) {
            // Launcher's ScrimView will draw the background throughout the gesture. But once the
        // gesture ends, start drawing taskbar's background again since launcher might stop drawing.
            // gesture ends, start drawing taskbar's background again since launcher might stop
            // drawing.
            forceHideBackground(inProgress);
        }
    }

    /**
     * Animates Taskbar elements during a transition to a Launcher state that should use in-app
+7 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.Themes;
import com.android.quickstep.util.LayoutUtils;
@@ -104,7 +105,12 @@ public class OverviewState extends LauncherState {

    @Override
    public boolean isTaskbarStashed(Launcher launcher) {
        return true;
        return !FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get();
    }

    @Override
    public boolean isTaskbarAlignedWithHotseat(Launcher launcher) {
        return !FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get();
    }

    @Override
+5 −1
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import androidx.annotation.Nullable;

import com.android.launcher3.CellLayout.ContainerType;
import com.android.launcher3.DevicePaddings.DevicePadding;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.icons.DotRenderer;
import com.android.launcher3.icons.IconNormalizer;
import com.android.launcher3.model.data.ItemInfo;
@@ -1276,7 +1277,10 @@ public class DeviceProfile {
            return ((taskbarSize - overviewActionsHeight) / 2) + getTaskbarOffsetY();
        }

        return isTaskbarPresent ? stashedTaskbarSize : mInsets.bottom;
        if (isTaskbarPresent) {
            return FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get() ? taskbarSize : stashedTaskbarSize;
        }
        return mInsets.bottom;
    }

    /** Gets the space that the overview actions will take, including bottom margin. */
+4 −0
Original line number Diff line number Diff line
@@ -235,6 +235,10 @@ public final class FeatureFlags {
            "ENABLE_ALL_APPS_ONE_SEARCH_IN_TASKBAR", false,
            "Enables One Search box in Taskbar All Apps.");

    public static final BooleanFlag ENABLE_TASKBAR_IN_OVERVIEW = getDebugFlag(
            "ENABLE_TASKBAR_IN_OVERVIEW", false,
            "Enables accessing the system Taskbar in overview.");

    public static final BooleanFlag ENABLE_SPLIT_FROM_WORKSPACE = getDebugFlag(
            "ENABLE_SPLIT_FROM_WORKSPACE", true,
            "Enable initiating split screen from workspace.");