File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
espresso/device/java/androidx/test/espresso/device/action Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,5 +24,6 @@ kt_android_library(
2424 "//runner/monitor" ,
2525 "@maven//:androidx_window_window" ,
2626 "@maven//:androidx_window_window_java" ,
27+ "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_android" ,
2728 ],
2829)
Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ import androidx.window.layout.WindowLayoutInfo
3030import java.util.concurrent.CountDownLatch
3131import java.util.concurrent.Executor
3232import java.util.concurrent.TimeUnit
33- import kotlinx.coroutines.CoroutineScope
34- import kotlinx.coroutines.asCoroutineDispatcher
33+ import kotlinx.coroutines.MainScope
3534import kotlinx.coroutines.flow.collect
3635import kotlinx.coroutines.flow.distinctUntilChanged
3736import kotlinx.coroutines.launch
@@ -62,7 +61,7 @@ internal open class BaseSingleFoldDeviceAction(
6261 val latch: CountDownLatch = CountDownLatch (1 )
6362 val windowInfoTracker = WindowInfoTracker .getOrCreate(activity)
6463
65- CoroutineScope (mainExecutor.asCoroutineDispatcher() ).launch {
64+ MainScope ( ).launch {
6665 windowInfoTracker.windowLayoutInfo(activity).distinctUntilChanged().collect {
6766 windowLayoutInfo: WindowLayoutInfo ->
6867 val foldingFeatures = windowLayoutInfo.displayFeatures.filterIsInstance<FoldingFeature >()
You can’t perform that action at this time.
0 commit comments