Merge "Update the assertion to get correct navigation mode value." into tm-qpr-dev

This commit is contained in:
Mateusz Cicheński
2022-06-23 20:48:20 +00:00
committed by Android (Google) Code Review

View File

@@ -21,8 +21,10 @@ import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.flicker.traces.region.RegionSubject import com.android.server.wm.flicker.traces.region.RegionSubject
import com.android.server.wm.traces.common.FlickerComponentName import com.android.server.wm.traces.common.FlickerComponentName
val LAUNCHER_COMPONENT = FlickerComponentName("com.google.android.apps.nexuslauncher", val LAUNCHER_COMPONENT = FlickerComponentName(
"com.google.android.apps.nexuslauncher.NexusLauncherActivity") "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 * Checks that [FlickerComponentName.STATUS_BAR] window is visible and above the app windows in
@@ -112,7 +114,7 @@ fun FlickerTestParameter.navBarLayerPositionStart() {
val display = this.entry.displays.minByOrNull { it.id } val display = this.entry.displays.minByOrNull { it.id }
?: throw RuntimeException("There is no display!") ?: throw RuntimeException("There is no display!")
this.visibleRegion(FlickerComponentName.NAV_BAR) this.visibleRegion(FlickerComponentName.NAV_BAR)
.coversExactly(WindowUtils.getNavigationBarPosition(display)) .coversExactly(WindowUtils.getNavigationBarPosition(display, isGesturalNavigation))
} }
} }
@@ -125,7 +127,7 @@ fun FlickerTestParameter.navBarLayerPositionEnd() {
val display = this.entry.displays.minByOrNull { it.id } val display = this.entry.displays.minByOrNull { it.id }
?: throw RuntimeException("There is no display!") ?: throw RuntimeException("There is no display!")
this.visibleRegion(FlickerComponentName.NAV_BAR) this.visibleRegion(FlickerComponentName.NAV_BAR)
.coversExactly(WindowUtils.getNavigationBarPosition(display)) .coversExactly(WindowUtils.getNavigationBarPosition(display, isGesturalNavigation))
} }
} }