Merge "Remove illegal supertype" into main
diff --git a/packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt b/packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt
index d3409c7..e3aeaa8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt
@@ -484,14 +484,12 @@
private fun CoroutineScope.repeatWhenAttached(): DisposableHandle {
return view.repeatWhenAttached(
coroutineContext = coroutineContext,
- block = block,
+ block = { block.invoke(this) },
)
}
- private class Block : suspend LifecycleOwner.(View) -> Unit {
- data class Invocation(
- val lifecycleOwner: LifecycleOwner,
- ) {
+ private class Block {
+ data class Invocation(val lifecycleOwner: LifecycleOwner) {
val lifecycleState: Lifecycle.State
get() = lifecycleOwner.lifecycle.currentState
}
@@ -504,7 +502,7 @@
val latestLifecycleState: Lifecycle.State
get() = _invocations.last().lifecycleState
- override suspend fun invoke(lifecycleOwner: LifecycleOwner, view: View) {
+ fun invoke(lifecycleOwner: LifecycleOwner) {
_invocations.add(Invocation(lifecycleOwner))
}
}