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

Commit 6f264a92 authored by Alex Chau's avatar Alex Chau
Browse files

Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag

Bug: 270397206
Test: OverviewActionsControllerTest
Flag: enableGridOnlyOverview
Change-Id: I1519e0e8d5b8a7e294d2d310c1614e8462649031
parent 2cce534c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,9 +21,9 @@ import android.content.Context;
import android.graphics.Rect;

import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.Flags;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.config.FeatureFlags;
import com.android.quickstep.views.RecentsView;

/**
@@ -72,7 +72,7 @@ public class OverviewModalTaskState extends OverviewState {

    @Override
    public boolean isTaskbarStashed(Launcher launcher) {
        if (FeatureFlags.enableGridOnlyOverview()) {
        if (Flags.enableGridOnlyOverview()) {
            return true;
        }
        return super.isTaskbarStashed(launcher);
+4 −4
Original line number Diff line number Diff line
@@ -50,10 +50,10 @@ import androidx.annotation.Nullable;
import androidx.annotation.UiThread;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Flags;
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.statehandlers.DepthController;
import com.android.launcher3.statehandlers.DesktopVisibilityController;
import com.android.launcher3.statemanager.BaseState;
@@ -242,7 +242,7 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
    public final void calculateTaskSize(Context context, DeviceProfile dp, Rect outRect,
            PagedOrientationHandler orientedState) {
        if (dp.isTablet) {
            if (FeatureFlags.enableGridOnlyOverview()) {
            if (Flags.enableGridOnlyOverview()) {
                calculateGridTaskSize(context, dp, outRect, orientedState);
            } else {
                calculateFocusTaskSize(context, dp, outRect);
@@ -339,7 +339,7 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
            PagedOrientationHandler orientedState) {
        Resources res = context.getResources();
        Rect potentialTaskRect = new Rect();
        if (FeatureFlags.enableGridOnlyOverview()) {
        if (Flags.enableGridOnlyOverview()) {
            calculateGridSize(dp, potentialTaskRect);
        } else {
            calculateFocusTaskSize(context, dp, potentialTaskRect);
@@ -371,7 +371,7 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
    public final void calculateModalTaskSize(Context context, DeviceProfile dp, Rect outRect,
            PagedOrientationHandler orientedState) {
        calculateTaskSize(context, dp, outRect, orientedState);
        boolean isGridOnlyOverview = dp.isTablet && FeatureFlags.enableGridOnlyOverview();
        boolean isGridOnlyOverview = dp.isTablet && Flags.enableGridOnlyOverview();
        int claimedSpaceBelow = isGridOnlyOverview
                ? dp.overviewActionsTopMarginPx + dp.overviewActionsHeight + dp.stashedTaskbarHeight
                : (dp.heightPx - outRect.bottom - dp.getInsets().bottom);
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ package com.android.quickstep;

import static android.os.Process.THREAD_PRIORITY_BACKGROUND;

import static com.android.launcher3.config.FeatureFlags.enableGridOnlyOverview;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;

+2 −2
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@ import androidx.annotation.RequiresApi;

import com.android.launcher3.BaseActivity;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.Flags;
import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.popup.SystemShortcut;
@@ -80,7 +80,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
        boolean isInLandscape = orientedState.getTouchRotation() != ROTATION_0;
        boolean isTablet = activity.getDeviceProfile().isTablet;

        boolean isGridOnlyOverview = isTablet && FeatureFlags.enableGridOnlyOverview();
        boolean isGridOnlyOverview = isTablet && Flags.enableGridOnlyOverview();
        // Add overview actions to the menu when in in-place rotate landscape mode, or in
        // grid-only overview.
        if ((!canLauncherRotate && isInLandscape) || isGridOnlyOverview) {
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 */
package com.android.quickstep;

import static com.android.launcher3.config.FeatureFlags.enableGridOnlyOverview;
import static com.android.launcher3.Flags.enableGridOnlyOverview;

import android.content.Context;
import android.content.res.Resources;
Loading