2021-06-27 20:44:35 +00:00
package androidx.lifecycle ;
import androidx.lifecycle.Lifecycle ;
import d0.w.f ;
import d0.z.d.o ;
import kotlin.Unit ;
import kotlin.jvm.functions.Function0 ;
import kotlin.jvm.functions.Function1 ;
2021-06-27 20:53:42 +00:00
import kotlinx.coroutines.CoroutineDispatcher ;
2021-06-27 20:44:35 +00:00
/* compiled from: WithLifecycleState.kt */
public final class WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 extends o implements Function1 < Throwable , Unit > {
public final /* synthetic */ Function0 $block$inlined ;
public final /* synthetic */ boolean $dispatchNeeded$inlined ;
2021-06-27 20:53:42 +00:00
public final /* synthetic */ CoroutineDispatcher $lifecycleDispatcher$inlined ;
2021-06-27 20:44:35 +00:00
public final /* synthetic */ WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$1 $observer ;
public final /* synthetic */ Lifecycle . State $state$inlined ;
public final /* synthetic */ Lifecycle $this_suspendWithStateAtLeastUnchecked$inlined ;
/* compiled from: WithLifecycleState.kt */
/* renamed from: androidx.lifecycle.WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3$1 reason: invalid class name */
public static final class AnonymousClass1 implements Runnable {
public final /* synthetic */ WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 this $0 ;
public AnonymousClass1 ( WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 withLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 ) {
this . this$0 = withLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 ;
}
@Override // java.lang.Runnable
public final void run ( ) {
WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 withLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 = this . this$0 ;
withLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 . $this_suspendWithStateAtLeastUnchecked$inlined . removeObserver ( withLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 . $observer ) ;
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
2021-06-27 20:53:42 +00:00
public WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$3 ( WithLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$1 withLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$1 , Lifecycle lifecycle , Lifecycle . State state , Function0 function0 , boolean z2 , CoroutineDispatcher coroutineDispatcher ) {
2021-06-27 20:44:35 +00:00
super ( 1 ) ;
this . $observer = withLifecycleStateKt$suspendWithStateAtLeastUnchecked$$inlined$suspendCancellableCoroutine$lambda$1 ;
this . $this_suspendWithStateAtLeastUnchecked$inlined = lifecycle ;
this . $state$inlined = state ;
this . $block$inlined = function0 ;
this . $dispatchNeeded$inlined = z2 ;
2021-06-27 20:53:42 +00:00
this . $lifecycleDispatcher$inlined = coroutineDispatcher ;
2021-06-27 20:44:35 +00:00
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke ( Throwable th ) {
invoke ( th ) ;
return Unit . a ;
}
public final void invoke ( Throwable th ) {
2021-06-27 20:53:42 +00:00
CoroutineDispatcher coroutineDispatcher = this . $lifecycleDispatcher$inlined ;
2021-06-27 20:44:35 +00:00
f fVar = f . i ;
2021-06-27 20:53:42 +00:00
if ( coroutineDispatcher . isDispatchNeeded ( fVar ) ) {
2021-06-27 20:44:35 +00:00
this . $lifecycleDispatcher$inlined . dispatch ( fVar , new AnonymousClass1 ( this ) ) ;
} else {
this . $this_suspendWithStateAtLeastUnchecked$inlined . removeObserver ( this . $observer ) ;
}
}
}