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

Commit 3fe2b163 authored by Alp Yalcin's avatar Alp Yalcin
Browse files

[2/n] Update default initial bounds scale to 72% (from 75%)

Currently, default initial bounds are based off 75% device screen size. We are changing it to 72% of device screen size to align with the updated UI/UX specifications.

Flag: EXEMPT approved by product & UX teams
Test: atest WmTests:DesktopModeLaunchParamsModifierTests, atest WMShellUnitTests:DesktopTasksControllerTest
Bug: 399581767
Change-Id: Ia3451b47d3b5247a10f2e4f90396521df0d9aa79
parent dac39549
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ import kotlin.math.max
import kotlin.math.min

val DESKTOP_MODE_INITIAL_BOUNDS_SCALE: Float =
    SystemProperties.getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 75) / 100f
    SystemProperties.getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 72) / 100f

val DESKTOP_MODE_LANDSCAPE_APP_PADDING: Int =
    SystemProperties.getInt("persist.wm.debug.desktop_mode_landscape_app_padding", 25)
+2 −1
Original line number Diff line number Diff line
@@ -5656,9 +5656,10 @@ class DesktopTasksController(
    }

    companion object {
        // TODO(b/434658423): Consolidate below constant among DesktopModeUtils and this file.
        @JvmField
        val DESKTOP_MODE_INITIAL_BOUNDS_SCALE =
            SystemProperties.getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 75) / 100f
            SystemProperties.getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 72) / 100f

        // Timeout used for CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD, this is longer than the
        // default timeout to avoid timing out in the middle of a drag action.
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ fun FlickerTest.appWindowHasDesktopModeInitialBoundsAtTheEnd(component: ICompone
            entry.physicalDisplayBounds ?: error("Missing physical display bounds")
        val stableBounds = WindowUtils.getInsetDisplayBounds(scenario.endRotation)
        val desktopModeInitialBoundsScale =
            SystemProperties.getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 75) /
            SystemProperties.getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 72) /
                100f

        val desiredWidth = displayBounds.width().times(desktopModeInitialBoundsScale)
+11 −11
Original line number Diff line number Diff line
@@ -313,12 +313,12 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
    private val SECONDARY_DISPLAY_ID = 1
    private val DISPLAY_DIMENSION_SHORT = 1600
    private val DISPLAY_DIMENSION_LONG = 2560
    private val DEFAULT_LANDSCAPE_BOUNDS = Rect(320, 75, 2240, 1275)
    private val DEFAULT_PORTRAIT_BOUNDS = Rect(200, 165, 1400, 2085)
    private val DEFAULT_LANDSCAPE_BOUNDS = Rect(358, 93, 2201, 1245)
    private val DEFAULT_PORTRAIT_BOUNDS = Rect(224, 193, 1376, 2036)
    private val RESIZABLE_LANDSCAPE_BOUNDS = Rect(25, 435, 1575, 1635)
    private val RESIZABLE_PORTRAIT_BOUNDS = Rect(680, 75, 1880, 1275)
    private val RESIZABLE_PORTRAIT_BOUNDS = Rect(680, 93, 1880, 1245)
    private val UNRESIZABLE_LANDSCAPE_BOUNDS = Rect(25, 448, 1575, 1611)
    private val UNRESIZABLE_PORTRAIT_BOUNDS = Rect(830, 75, 1730, 1275)
    private val UNRESIZABLE_PORTRAIT_BOUNDS = Rect(848, 93, 1712, 1245)
    private val wallpaperToken = MockToken().token()
    private val homeComponentName = ComponentName(HOME_LAUNCHER_PACKAGE_NAME, /* class */ "")
    private val secondDisplayArea =
@@ -9536,7 +9536,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR,
            PointF(1200f, 700f),
            Rect(240, 700, 2160, 1900),
            Rect(279, 700, 2122, 1852),
            tabTearingMinimizeAnimationFlagEnabled = true,
            tabTearingLaunchAnimationFlagEnabled = true,
        )
@@ -9549,7 +9549,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR,
            PointF(1200f, 700f),
            Rect(240, 700, 2160, 1900),
            Rect(279, 700, 2122, 1852),
            tabTearingMinimizeAnimationFlagEnabled = true,
            tabTearingLaunchAnimationFlagEnabled = false,
        )
@@ -9562,7 +9562,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR,
            PointF(1200f, 700f),
            Rect(240, 700, 2160, 1900),
            Rect(279, 700, 2122, 1852),
            tabTearingMinimizeAnimationFlagEnabled = false,
            tabTearingLaunchAnimationFlagEnabled = true,
        )
@@ -9577,7 +9577,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR,
            PointF(1200f, 700f),
            Rect(240, 700, 2160, 1900),
            Rect(279, 700, 2122, 1852),
            tabTearingMinimizeAnimationFlagEnabled = false,
            tabTearingLaunchAnimationFlagEnabled = false,
        )
@@ -9764,7 +9764,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.NO_INDICATOR,
            PointF(1200f, 700f),
            Rect(240, 700, 2160, 1900),
            Rect(279, 700, 2122, 1852),
            tabTearingMinimizeAnimationFlagEnabled = true,
            tabTearingLaunchAnimationFlagEnabled = true,
            destinationDisplayId = SECOND_DISPLAY,
@@ -9787,7 +9787,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.NO_INDICATOR,
            PointF(1200f, 700f),
            Rect(240, 700, 2160, 1900),
            Rect(279, 700, 2122, 1852),
            tabTearingMinimizeAnimationFlagEnabled = true,
            tabTearingLaunchAnimationFlagEnabled = true,
            destinationDisplayId = SECOND_DISPLAY,
@@ -9807,7 +9807,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.NO_INDICATOR,
            PointF(1200f, 700f),
            Rect(240, 700, 2160, 1900),
            Rect(279, 700, 2122, 1852),
            tabTearingMinimizeAnimationFlagEnabled = true,
            tabTearingLaunchAnimationFlagEnabled = true,
            destinationDisplayId = SECOND_DISPLAY,
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ import java.util.function.Consumer;
public final class DesktopModeBoundsCalculator {

    public static final float DESKTOP_MODE_INITIAL_BOUNDS_SCALE = SystemProperties
            .getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 75) / 100f;
            .getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 72) / 100f;
    public static final int DESKTOP_MODE_LANDSCAPE_APP_PADDING = SystemProperties
            .getInt("persist.wm.debug.desktop_mode_landscape_app_padding", 25);

Loading