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

Commit 28b7f414 authored by Alp Yalcin's avatar Alp Yalcin Committed by Android (Google) Code Review
Browse files

Merge "Consolidate DESKTOP_MODE_INITIAL_BOUNDS_SCALE constant among...

Merge "Consolidate DESKTOP_MODE_INITIAL_BOUNDS_SCALE constant among DesktopTasksController and DesktopModeUtils.kt files" into main
parents 5946889e a64e9a35
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import kotlin.math.ceil
import kotlin.math.max
import kotlin.math.min

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

+0 −5
Original line number Diff line number Diff line
@@ -6167,11 +6167,6 @@ 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", 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.
        private val APP_HANDLE_DRAG_HOLD_CUJ_TIMEOUT_MS: Long = TimeUnit.SECONDS.toMillis(10L)
+1 −1
Original line number Diff line number Diff line
@@ -569,7 +569,7 @@ constructor(

                    IndicatorType.TO_DESKTOP_INDICATOR -> {
                        val adjustmentPercentage =
                            (1f - DesktopTasksController.DESKTOP_MODE_INITIAL_BOUNDS_SCALE)
                            (1f - DESKTOP_MODE_INITIAL_BOUNDS_SCALE)
                        return Rect(
                            (adjustmentPercentage * desktopStableBounds.width() / 2).toInt(),
                            (adjustmentPercentage * desktopStableBounds.height() / 2).toInt(),
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ import static android.util.RotationUtils.rotateBounds;
import static com.android.wm.shell.ShellTaskOrganizer.TASK_LISTENER_TYPE_PIP;
import static com.android.wm.shell.ShellTaskOrganizer.taskListenerTypeToString;
import static com.android.wm.shell.desktopmode.DesktopModeUtils.calculateInitialBounds;
import static com.android.wm.shell.desktopmode.DesktopTasksController.DESKTOP_MODE_INITIAL_BOUNDS_SCALE;
import static com.android.wm.shell.desktopmode.DesktopModeUtils.DESKTOP_MODE_INITIAL_BOUNDS_SCALE;
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_EXPAND_OR_UNEXPAND;
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_LEAVE_PIP;
import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTION_LEAVE_PIP_TO_SPLIT_SCREEN;