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

Commit 00f16abc authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Tweak fullscreen transition region." into main

parents e616ea26 6a78ba4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -569,7 +569,7 @@
    <!-- The thickness in dp for all desktop drag transition regions. -->
    <dimen name="desktop_mode_transition_region_thickness">44dp</dimen>

    <item type="dimen" format="float" name="desktop_mode_fullscreen_region_scale">0.4</item>
    <item type="dimen" format="float" name="desktop_mode_fullscreen_region_scale">0.2</item>

    <!-- The height on the screen where drag to the left or right edge will result in a
    desktop task snapping to split size. The empty space between this and the top is to allow
+2 −2
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import android.view.animation.DecelerateInterpolator;

import androidx.annotation.VisibleForTesting;

import com.android.internal.policy.SystemBarUtils;
import com.android.wm.shell.R;
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
import com.android.wm.shell.common.DisplayController;
@@ -173,8 +174,7 @@ public class DesktopModeVisualIndicator {
        final Region region = new Region();
        int transitionHeight = mDragStartState == DragStartState.FROM_FREEFORM
                || mDragStartState == DragStartState.DRAGGED_INTENT
                ? mContext.getResources().getDimensionPixelSize(
                com.android.wm.shell.R.dimen.desktop_mode_transition_region_thickness)
                ? SystemBarUtils.getStatusBarHeight(mContext)
                : 2 * layout.stableInsets().top;
        // A Rect at the top of the screen that takes up the center 40%.
        if (mDragStartState == DragStartState.FROM_FREEFORM) {
+2 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.graphics.Region
import android.testing.AndroidTestingRunner
import android.view.SurfaceControl
import androidx.test.filters.SmallTest
import com.android.internal.policy.SystemBarUtils
import com.android.wm.shell.R
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.ShellTestCase
@@ -67,8 +68,7 @@ class DesktopModeVisualIndicatorTest : ShellTestCase() {

        createVisualIndicator(DesktopModeVisualIndicator.DragStartState.FROM_FREEFORM)
        testRegion = visualIndicator.calculateFullscreenRegion(displayLayout, CAPTION_HEIGHT)
        val transitionHeight = context.resources.getDimensionPixelSize(
            R.dimen.desktop_mode_transition_region_thickness)
        val transitionHeight = SystemBarUtils.getStatusBarHeight(context)
        val toFullscreenScale = mContext.resources.getFloat(
            R.dimen.desktop_mode_fullscreen_region_scale
        )