mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 01:47:17 +01:00
73 lines
3.8 KiB
Java
73 lines
3.8 KiB
Java
package androidx.lifecycle;
|
|
|
|
import androidx.exifinterface.media.ExifInterface;
|
|
import kotlin.Metadata;
|
|
import kotlin.ResultKt;
|
|
import kotlin.Unit;
|
|
import kotlin.coroutines.Continuation;
|
|
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
|
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
|
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlinx.coroutines.flow.Flow;
|
|
import kotlinx.coroutines.flow.FlowCollector;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* JADX INFO: Add missing generic type declarations: [T] */
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003H\n"}, d2 = {"<anonymous>", "", ExifInterface.GPS_DIRECTION_TRUE, "Landroidx/lifecycle/LiveDataScope;"}, k = 3, mv = {2, 0, 0}, xi = 48)
|
|
@DebugMetadata(c = "androidx.lifecycle.FlowLiveDataConversions$asLiveData$1", f = "FlowLiveData.kt", i = {}, l = {78}, m = "invokeSuspend", n = {}, s = {}, v = 1)
|
|
/* loaded from: classes14.dex */
|
|
public final class FlowLiveDataConversions$asLiveData$1<T> extends SuspendLambda implements Function2<LiveDataScope<T>, Continuation<? super Unit>, Object> {
|
|
final /* synthetic */ Flow<T> $this_asLiveData;
|
|
private /* synthetic */ Object L$0;
|
|
int label;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public FlowLiveDataConversions$asLiveData$1(Flow<? extends T> flow, Continuation<? super FlowLiveDataConversions$asLiveData$1> continuation) {
|
|
super(2, continuation);
|
|
this.$this_asLiveData = flow;
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
|
FlowLiveDataConversions$asLiveData$1 flowLiveDataConversions$asLiveData$1 = new FlowLiveDataConversions$asLiveData$1(this.$this_asLiveData, continuation);
|
|
flowLiveDataConversions$asLiveData$1.L$0 = obj;
|
|
return flowLiveDataConversions$asLiveData$1;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
public final Object invoke(LiveDataScope<T> liveDataScope, Continuation<? super Unit> continuation) {
|
|
return ((FlowLiveDataConversions$asLiveData$1) create(liveDataScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
public final Object invokeSuspend(Object obj) {
|
|
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
|
int i = this.label;
|
|
if (i == 0) {
|
|
ResultKt.throwOnFailure(obj);
|
|
final LiveDataScope liveDataScope = (LiveDataScope) this.L$0;
|
|
Flow<T> flow = this.$this_asLiveData;
|
|
FlowCollector<? super T> flowCollector = new FlowCollector() { // from class: androidx.lifecycle.FlowLiveDataConversions$asLiveData$1.1
|
|
@Override // kotlinx.coroutines.flow.FlowCollector
|
|
public final Object emit(T t, Continuation<? super Unit> continuation) {
|
|
Object emit = liveDataScope.emit(t, continuation);
|
|
return emit == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? emit : Unit.INSTANCE;
|
|
}
|
|
};
|
|
this.label = 1;
|
|
if (flow.collect(flowCollector, this) == coroutine_suspended) {
|
|
return coroutine_suspended;
|
|
}
|
|
} else {
|
|
if (i != 1) {
|
|
Single$$ExternalSyntheticBUOutline0.m$2("call to 'resume' before 'invoke' with coroutine");
|
|
return null;
|
|
}
|
|
ResultKt.throwOnFailure(obj);
|
|
}
|
|
return Unit.INSTANCE;
|
|
}
|
|
}
|