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

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

Merge "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig" into main

parents d56ec1ad e1955fe4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -13,3 +13,10 @@ flag {
    description: "Enables two line label inside all apps."
    bug: "270390937"
}

flag {
    name: "enable_grid_only_overview"
    namespace: "launcher"
    description: "Enable a grid-only overview without a focused task."
    bug: "270397206"
}
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ public class OverviewModalTaskState extends OverviewState {

    @Override
    public boolean isTaskbarStashed(Launcher launcher) {
        if (FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW.get()) {
        if (FeatureFlags.enableGridOnlyOverview()) {
            return true;
        }
        return super.isTaskbarStashed(launcher);
+3 −3
Original line number Diff line number Diff line
@@ -239,7 +239,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.ENABLE_GRID_ONLY_OVERVIEW.get()) {
            if (FeatureFlags.enableGridOnlyOverview()) {
                calculateGridTaskSize(context, dp, outRect, orientedState);
            } else {
                calculateFocusTaskSize(context, dp, outRect);
@@ -336,7 +336,7 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
            PagedOrientationHandler orientedState) {
        Resources res = context.getResources();
        Rect potentialTaskRect = new Rect();
        if (FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW.get()) {
        if (FeatureFlags.enableGridOnlyOverview()) {
            calculateGridSize(dp, potentialTaskRect);
        } else {
            calculateFocusTaskSize(context, dp, potentialTaskRect);
@@ -368,7 +368,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.ENABLE_GRID_ONLY_OVERVIEW.get();
        boolean isGridOnlyOverview = dp.isTablet && FeatureFlags.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
@@ -80,7 +80,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
        boolean isInLandscape = orientedState.getTouchRotation() != ROTATION_0;
        boolean isTablet = activity.getDeviceProfile().isTablet;

        boolean isGridOnlyOverview = isTablet && FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW.get();
        boolean isGridOnlyOverview = isTablet && FeatureFlags.enableGridOnlyOverview();
        // Add overview actions to the menu when in in-place rotate landscape mode, or in
        // grid-only overview.
        if ((!canLauncherRotate && isInLandscape) || isGridOnlyOverview) {
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package com.android.quickstep.views;

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

import android.content.Context;
import android.util.AttributeSet;
@@ -251,7 +251,7 @@ public class ClearAllButton extends Button {
    private float getOriginalTranslationY() {
        DeviceProfile deviceProfile = mActivity.getDeviceProfile();
        if (deviceProfile.isTablet) {
            if (ENABLE_GRID_ONLY_OVERVIEW.get()) {
            if (enableGridOnlyOverview()) {
                return (getRecentsView().getLastComputedTaskSize().height()
                        + deviceProfile.overviewTaskThumbnailTopMarginPx) / 2.0f
                        + deviceProfile.overviewRowSpacing;
Loading