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

Commit 316587fa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Use the display 0 transform for assertions""

parents 251fa87f 2a0277cb
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.sortedBy { it.id }
            .firstOrNull()?.transform?.getRotation() ?: Surface.ROTATION_0
        val rotation = this.entry.displays.firstOrNull()?.transform?.getRotation()
            ?: Surface.ROTATION_0
        this.visibleRegion(FlickerComponentName.NAV_BAR)
                .coversExactly(WindowUtils.getNavigationBarPosition(rotation))
    }
    assertLayersEnd {
        val rotation = this.entry.displays.sortedBy { it.id }
            .firstOrNull()?.transform?.getRotation() ?: Surface.ROTATION_0
        val rotation = this.entry.displays.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.sortedBy { it.id }
            .firstOrNull()?.transform?.getRotation() ?: Surface.ROTATION_0
        val rotation = this.entry.displays.firstOrNull()?.transform?.getRotation()
            ?: Surface.ROTATION_0
        this.visibleRegion(FlickerComponentName.STATUS_BAR)
            .coversExactly(WindowUtils.getStatusBarPosition(rotation))
    }
    assertLayersEnd {
        val rotation = this.entry.displays.sortedBy { it.id }
            .firstOrNull()?.transform?.getRotation() ?: Surface.ROTATION_0
        val rotation = this.entry.displays.firstOrNull()?.transform?.getRotation()
            ?: Surface.ROTATION_0
        this.visibleRegion(FlickerComponentName.STATUS_BAR)
            .coversExactly(WindowUtils.getStatusBarPosition(rotation))
    }