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

Commit eed511fd authored by Ioana Moraru's avatar Ioana Moraru Committed by Android (Google) Code Review
Browse files

Merge "Use the display 0 transform for assertions"

parents a7ea9845 02724c04
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -89,14 +89,14 @@ fun FlickerTestParameter.statusBarLayerIsVisible() {

fun FlickerTestParameter.navBarLayerRotatesAndScales() {
    assertLayersStart {
        val rotation = this.entry.displays.firstOrNull()?.transform?.getRotation()
            ?: Surface.ROTATION_0
        val rotation = this.entry.displays.sortedBy { it.id }
            .firstOrNull()?.transform?.getRotation() ?: Surface.ROTATION_0
        this.visibleRegion(FlickerComponentName.NAV_BAR)
                .coversExactly(WindowUtils.getNavigationBarPosition(rotation))
    }
    assertLayersEnd {
        val rotation = this.entry.displays.firstOrNull()?.transform?.getRotation()
            ?: Surface.ROTATION_0
        val rotation = this.entry.displays.sortedBy { it.id }
            .firstOrNull()?.transform?.getRotation() ?: Surface.ROTATION_0
        this.visibleRegion(FlickerComponentName.NAV_BAR)
                .coversExactly(WindowUtils.getNavigationBarPosition(rotation))
    }
@@ -104,14 +104,14 @@ fun FlickerTestParameter.navBarLayerRotatesAndScales() {

fun FlickerTestParameter.statusBarLayerRotatesScales() {
    assertLayersStart {
        val rotation = this.entry.displays.firstOrNull()?.transform?.getRotation()
            ?: Surface.ROTATION_0
        val rotation = this.entry.displays.sortedBy { it.id }
            .firstOrNull()?.transform?.getRotation() ?: Surface.ROTATION_0
        this.visibleRegion(FlickerComponentName.STATUS_BAR)
            .coversExactly(WindowUtils.getStatusBarPosition(rotation))
    }
    assertLayersEnd {
        val rotation = this.entry.displays.firstOrNull()?.transform?.getRotation()
            ?: Surface.ROTATION_0
        val rotation = this.entry.displays.sortedBy { it.id }
            .firstOrNull()?.transform?.getRotation() ?: Surface.ROTATION_0
        this.visibleRegion(FlickerComponentName.STATUS_BAR)
            .coversExactly(WindowUtils.getStatusBarPosition(rotation))
    }