Merge "Reuse cached flicker objects"

This commit is contained in:
Nataniel Borges
2022-08-16 06:25:31 +00:00
committed by Android (Google) Code Review
3 changed files with 14 additions and 3 deletions

View File

@@ -49,7 +49,10 @@ abstract class BaseTest @JvmOverloads constructor(
) {
init {
testSpec.setIsTablet(
WindowManagerStateHelper(instrumentation).currentState.wmState.isTablet
WindowManagerStateHelper(
instrumentation,
clearCacheAfterParsing = false
).currentState.wmState.isTablet
)
}

View File

@@ -38,7 +38,10 @@ abstract class BaseTest @JvmOverloads constructor(
) {
init {
testSpec.setIsTablet(
WindowManagerStateHelper(instrumentation).currentState.wmState.isTablet
WindowManagerStateHelper(
instrumentation,
clearCacheAfterParsing = false
).currentState.wmState.isTablet
)
tapl.setExpectedRotationCheckEnabled(true)
}

View File

@@ -26,4 +26,9 @@ import com.android.server.wm.flicker.rules.ChangeDisplayOrientationRule
* @param rotation New device rotation
*/
fun Flicker.setRotation(rotation: Int) =
ChangeDisplayOrientationRule.setRotation(rotation, instrumentation, wmHelper)
ChangeDisplayOrientationRule.setRotation(
rotation,
instrumentation,
clearCacheAfterParsing = false,
wmHelper = wmHelper
)