Empty region should cover at most any provided region

Test: atest com.android.wm.shell.flicker.pip.EnterPipOnUserLeaveHintTest
Bug: 293577434
Change-Id: I56b822712288c7903d0a6358573c78e1851afcef
This commit is contained in:
Pablo Gamito
2023-07-31 09:04:23 +00:00
parent 4b81e3870f
commit c705acbdc7

View File

@@ -265,6 +265,7 @@ fun LayerTraceEntrySubject.splitAppLayerBoundsSnapToDivider(
val dividerRegion =
layer(SPLIT_SCREEN_DIVIDER_COMPONENT)?.visibleRegion?.region
?: error("$SPLIT_SCREEN_DIVIDER_COMPONENT component not found")
visibleRegion(component).isNotEmpty()
visibleRegion(component)
.coversAtMost(
if (displayBounds.width > displayBounds.height) {