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

Commit 5c7a0ae1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "DeviceProfile.overviewRowSpacing should exclude extra top margin on...

Merge "DeviceProfile.overviewRowSpacing should exclude extra top margin on grid tasks" into sc-v2-dev am: 953873dd am: a370c888

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16440097

Change-Id: I5ce9a676cd30790b89a5a63ffbbc390c602f7f7e
parents 890bfc89 a370c888
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import com.android.launcher3.tapl.LauncherInstrumentation.NavigationModel;
import com.android.launcher3.tapl.Overview;
import com.android.launcher3.tapl.OverviewActions;
import com.android.launcher3.tapl.OverviewTask;
import com.android.launcher3.tapl.TestHelpers;
import com.android.launcher3.ui.TaplTestsLauncher3;
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
@@ -321,7 +322,8 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
    @Test
    @PortraitLandscape
    public void testOverviewForTablet() throws Exception {
        if (!mLauncher.isTablet()) {
        // TODO(b/210158657): Re-enable for OOP
        if (!mLauncher.isTablet() || !TestHelpers.isInLauncherProcess()) {
            return;
        }
        for (int i = 2; i <= 14; i++) {
+7 −1
Original line number Diff line number Diff line
@@ -395,7 +395,13 @@ public class DeviceProfile {
        }
        overviewActionsMarginThreeButtonPx = res.getDimensionPixelSize(
                R.dimen.overview_actions_margin_three_button);
        overviewRowSpacing = res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing);
        // Grid task's top margin is only overviewTaskIconSizePx + overviewTaskMarginGridPx, but
        // overviewTaskThumbnailTopMarginPx is applied to all TaskThumbnailView, so exclude the
        // extra  margin when calculating row spacing.
        int extraTopMargin = overviewTaskThumbnailTopMarginPx - overviewTaskIconSizePx
                - overviewTaskMarginGridPx;
        overviewRowSpacing = res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing)
                - extraTopMargin;
        overviewGridSideMargin = isLandscape
                ? res.getDimensionPixelSize(R.dimen.overview_grid_side_margin_landscape)
                : res.getDimensionPixelSize(R.dimen.overview_grid_side_margin_portrait);