Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +3 −4 Original line number Diff line number Diff line Loading @@ -5781,16 +5781,15 @@ class DesktopTasksController( ) { // Inherit parent's bounds. newWindowBounds.set(taskInfo.configuration.windowConfiguration.bounds) // TODO: (b/436504714) - Implement the new positioning logic here. } else { // Use default bounds, but with the top-center at the drop point. newWindowBounds.set(calculateDefaultDesktopTaskBounds(displayLayout)) } // Create the new window from the top-center at the drop point. newWindowBounds.offsetTo( dragEvent.x.toInt() - (newWindowBounds.width() / 2), dragEvent.y.toInt(), ) } } IndicatorType.TO_SPLIT_RIGHT_INDICATOR -> { newWindowBounds.set(getSnapBounds(destinationDisplay, SnapPosition.RIGHT)) } Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt +4 −4 Original line number Diff line number Diff line Loading @@ -10030,7 +10030,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() testOnUnhandledDrag( DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR, PointF(1200f, 700f), Rect(100, 100, 300, 300), Rect(1100, 700, 1300, 900), tabTearingMinimizeAnimationFlagEnabled = true, tabTearingLaunchAnimationFlagEnabled = true, ) Loading @@ -10046,7 +10046,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() testOnUnhandledDrag( DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR, PointF(1200f, 700f), Rect(100, 100, 300, 300), Rect(1100, 700, 1300, 900), tabTearingMinimizeAnimationFlagEnabled = true, tabTearingLaunchAnimationFlagEnabled = false, ) Loading @@ -10062,7 +10062,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() testOnUnhandledDrag( DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR, PointF(1200f, 700f), Rect(100, 100, 300, 300), Rect(1100, 700, 1300, 900), tabTearingMinimizeAnimationFlagEnabled = false, tabTearingLaunchAnimationFlagEnabled = true, ) Loading @@ -10078,7 +10078,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() testOnUnhandledDrag( DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR, PointF(1200f, 700f), Rect(100, 100, 300, 300), Rect(1100, 700, 1300, 900), tabTearingMinimizeAnimationFlagEnabled = false, tabTearingLaunchAnimationFlagEnabled = false, ) Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +3 −4 Original line number Diff line number Diff line Loading @@ -5781,16 +5781,15 @@ class DesktopTasksController( ) { // Inherit parent's bounds. newWindowBounds.set(taskInfo.configuration.windowConfiguration.bounds) // TODO: (b/436504714) - Implement the new positioning logic here. } else { // Use default bounds, but with the top-center at the drop point. newWindowBounds.set(calculateDefaultDesktopTaskBounds(displayLayout)) } // Create the new window from the top-center at the drop point. newWindowBounds.offsetTo( dragEvent.x.toInt() - (newWindowBounds.width() / 2), dragEvent.y.toInt(), ) } } IndicatorType.TO_SPLIT_RIGHT_INDICATOR -> { newWindowBounds.set(getSnapBounds(destinationDisplay, SnapPosition.RIGHT)) } Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt +4 −4 Original line number Diff line number Diff line Loading @@ -10030,7 +10030,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() testOnUnhandledDrag( DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR, PointF(1200f, 700f), Rect(100, 100, 300, 300), Rect(1100, 700, 1300, 900), tabTearingMinimizeAnimationFlagEnabled = true, tabTearingLaunchAnimationFlagEnabled = true, ) Loading @@ -10046,7 +10046,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() testOnUnhandledDrag( DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR, PointF(1200f, 700f), Rect(100, 100, 300, 300), Rect(1100, 700, 1300, 900), tabTearingMinimizeAnimationFlagEnabled = true, tabTearingLaunchAnimationFlagEnabled = false, ) Loading @@ -10062,7 +10062,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() testOnUnhandledDrag( DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR, PointF(1200f, 700f), Rect(100, 100, 300, 300), Rect(1100, 700, 1300, 900), tabTearingMinimizeAnimationFlagEnabled = false, tabTearingLaunchAnimationFlagEnabled = true, ) Loading @@ -10078,7 +10078,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() testOnUnhandledDrag( DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR, PointF(1200f, 700f), Rect(100, 100, 300, 300), Rect(1100, 700, 1300, 900), tabTearingMinimizeAnimationFlagEnabled = false, tabTearingLaunchAnimationFlagEnabled = false, ) Loading