Loading libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubblePositionerTest.kt +20 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,26 @@ class BubblePositionerTest { .isEqualTo(expectedExpandedViewY) } @Test fun testGetTaskViewContentWidth_onLeft() { positioner.update(defaultDeviceConfig.copy(insets = Insets.of(100, 0, 200, 0))) val taskViewWidth = positioner.getTaskViewContentWidth(true /* onLeft */) val paddings = positioner.getExpandedViewContainerPadding(true /* onLeft */, false /* isOverflow */) assertThat(taskViewWidth).isEqualTo( positioner.screenRect.width() - paddings[0] - paddings[2]) } @Test fun testGetTaskViewContentWidth_onRight() { positioner.update(defaultDeviceConfig.copy(insets = Insets.of(100, 0, 200, 0))) val taskViewWidth = positioner.getTaskViewContentWidth(false /* onLeft */) val paddings = positioner.getExpandedViewContainerPadding(false /* onLeft */, false /* isOverflow */) assertThat(taskViewWidth).isEqualTo( positioner.screenRect.width() - paddings[0] - paddings[2]) } private val defaultYPosition: Float /** * Calculates the Y position bubbles should be placed based on the config. Based on the Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java +1 −1 Original line number Diff line number Diff line Loading @@ -395,7 +395,7 @@ public class BubblePositioner { public int getTaskViewContentWidth(boolean onLeft) { int[] paddings = getExpandedViewContainerPadding(onLeft, /* isOverflow = */ false); int pointerOffset = showBubblesVertically() ? getPointerSize() : 0; return mPositionRect.width() - paddings[0] - paddings[2] - pointerOffset; return mScreenRect.width() - paddings[0] - paddings[2] - pointerOffset; } /** Gets the y position of the expanded view if it was top-aligned. */ Loading Loading
libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubblePositionerTest.kt +20 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,26 @@ class BubblePositionerTest { .isEqualTo(expectedExpandedViewY) } @Test fun testGetTaskViewContentWidth_onLeft() { positioner.update(defaultDeviceConfig.copy(insets = Insets.of(100, 0, 200, 0))) val taskViewWidth = positioner.getTaskViewContentWidth(true /* onLeft */) val paddings = positioner.getExpandedViewContainerPadding(true /* onLeft */, false /* isOverflow */) assertThat(taskViewWidth).isEqualTo( positioner.screenRect.width() - paddings[0] - paddings[2]) } @Test fun testGetTaskViewContentWidth_onRight() { positioner.update(defaultDeviceConfig.copy(insets = Insets.of(100, 0, 200, 0))) val taskViewWidth = positioner.getTaskViewContentWidth(false /* onLeft */) val paddings = positioner.getExpandedViewContainerPadding(false /* onLeft */, false /* isOverflow */) assertThat(taskViewWidth).isEqualTo( positioner.screenRect.width() - paddings[0] - paddings[2]) } private val defaultYPosition: Float /** * Calculates the Y position bubbles should be placed based on the config. Based on the Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java +1 −1 Original line number Diff line number Diff line Loading @@ -395,7 +395,7 @@ public class BubblePositioner { public int getTaskViewContentWidth(boolean onLeft) { int[] paddings = getExpandedViewContainerPadding(onLeft, /* isOverflow = */ false); int pointerOffset = showBubblesVertically() ? getPointerSize() : 0; return mPositionRect.width() - paddings[0] - paddings[2] - pointerOffset; return mScreenRect.width() - paddings[0] - paddings[2] - pointerOffset; } /** Gets the y position of the expanded view if it was top-aligned. */ Loading