Rename val

This commit is contained in:
Benoit Marty 2022-05-04 17:51:14 +02:00
parent 2d98cbd915
commit 3ecde755e0
1 changed files with 2 additions and 2 deletions

View File

@ -172,9 +172,9 @@ fun activityIdlingResource(activityClass: Class<*>): IdlingResource {
val res = object : IdlingResource, ActivityLifecycleCallback { val res = object : IdlingResource, ActivityLifecycleCallback {
private var callback: IdlingResource.ResourceCallback? = null private var callback: IdlingResource.ResourceCallback? = null
private var resumedActivity: Activity? = null private var resumedActivity: Activity? = null
private val uniqTS = Random.nextLong() private val uniqueSuffix = Random.nextLong()
override fun getName() = "activityIdlingResource_${activityClass.name}_$uniqTS" override fun getName() = "activityIdlingResource_${activityClass.name}_$uniqueSuffix"
override fun isIdleNow(): Boolean { override fun isIdleNow(): Boolean {
val activity = resumedActivity ?: ActivityLifecycleMonitorRegistry.getInstance().getActivitiesInStage(Stage.RESUMED).firstOrNull { val activity = resumedActivity ?: ActivityLifecycleMonitorRegistry.getInstance().getActivitiesInStage(Stage.RESUMED).firstOrNull {