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

Commit 074a0ca5 authored by Mateusz Cicheński's avatar Mateusz Cicheński
Browse files

Update the assertion to get correct navigation mode value.

Test: atest WMShellFlickerTests:PipRotationTest
Bug: 206753786

Change-Id: Ie7ecaf1ca7df3055f270029fdfbb8c229a28ee7f
parent 20f893dd
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -20,8 +20,10 @@ package com.android.server.wm.flicker
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.traces.common.FlickerComponentName

val LAUNCHER_COMPONENT = FlickerComponentName("com.google.android.apps.nexuslauncher",
        "com.google.android.apps.nexuslauncher.NexusLauncherActivity")
val LAUNCHER_COMPONENT = FlickerComponentName(
    "com.google.android.apps.nexuslauncher",
    "com.google.android.apps.nexuslauncher.NexusLauncherActivity"
)

/**
 * Checks that [FlickerComponentName.STATUS_BAR] window is visible and above the app windows in
@@ -111,7 +113,7 @@ fun FlickerTestParameter.navBarLayerPositionStart() {
        val display = this.entry.displays.minByOrNull { it.id }
            ?: throw RuntimeException("There is no display!")
        this.visibleRegion(FlickerComponentName.NAV_BAR)
                .coversExactly(WindowUtils.getNavigationBarPosition(display))
            .coversExactly(WindowUtils.getNavigationBarPosition(display, isGesturalNavigation))
    }
}

@@ -124,7 +126,7 @@ fun FlickerTestParameter.navBarLayerPositionEnd() {
        val display = this.entry.displays.minByOrNull { it.id }
            ?: throw RuntimeException("There is no display!")
        this.visibleRegion(FlickerComponentName.NAV_BAR)
                .coversExactly(WindowUtils.getNavigationBarPosition(display))
            .coversExactly(WindowUtils.getNavigationBarPosition(display, isGesturalNavigation))
    }
}