[2.13.0-arhc-opt] merge

This commit is contained in:
zhongchao
2023-02-07 15:00:25 +08:00
parent ed71827687
commit a382fc36c1
66 changed files with 1116 additions and 1182 deletions

View File

@@ -5,7 +5,7 @@ import androidx.test.core.app.ActivityScenario
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
import com.mogo.eagle.core.function.hmi.ui.MoGoHmiFragment
import com.mogo.eagle.core.function.hmi.ui.MoGoHmiProvider
import com.mogo.eagle.core.function.main.MainLauncherActivity
import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
@@ -35,15 +35,15 @@ class MapDataCollectTest {
CallerMapDataCollectorManager.setIsInit()
delay(TimeUnit.HOURS.toMillis(1))
}
private suspend fun ensureMoGoHmiFragmentShow(): MoGoHmiFragment = suspendCancellableCoroutine {
private suspend fun ensureMoGoHmiFragmentShow(): MoGoHmiProvider = suspendCancellableCoroutine {
launch.onActivity { itx ->
val executor = Executors.newSingleThreadScheduledExecutor()
executor.scheduleAtFixedRate({
var find =
itx.supportFragmentManager.fragments.find { it is MoGoHmiFragment } as? MoGoHmiFragment
itx.supportFragmentManager.fragments.find { it is MoGoHmiProvider } as? MoGoHmiProvider
while (find == null) {
find =
itx.supportFragmentManager.fragments.find { it is MoGoHmiFragment } as? MoGoHmiFragment
itx.supportFragmentManager.fragments.find { it is MoGoHmiProvider } as? MoGoHmiProvider
}
while (!find.isResumed) {