2021-06-27 20:44:35 +00:00
|
|
|
package androidx.lifecycle;
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.l;
|
2021-12-17 22:03:14 +00:00
|
|
|
import d0.w.h.c;
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.w.i.a.e;
|
|
|
|
import d0.w.i.a.k;
|
|
|
|
import d0.z.d.m;
|
2021-06-27 20:44:35 +00:00
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.coroutines.Continuation;
|
|
|
|
import kotlin.jvm.functions.Function2;
|
2021-07-09 21:07:36 +00:00
|
|
|
import kotlinx.coroutines.CoroutineDispatcher;
|
2021-06-27 20:44:35 +00:00
|
|
|
import kotlinx.coroutines.CoroutineScope;
|
2021-11-08 18:25:28 +00:00
|
|
|
import s.a.a.n;
|
2021-12-17 22:03:14 +00:00
|
|
|
import s.a.b2.f;
|
|
|
|
import s.a.b2.g;
|
|
|
|
import s.a.k0;
|
|
|
|
import s.a.l1;
|
|
|
|
import s.a.x0;
|
2021-06-27 20:44:35 +00:00
|
|
|
/* compiled from: FlowLiveData.kt */
|
|
|
|
@e(c = "androidx.lifecycle.FlowLiveDataConversions$asFlow$1", f = "FlowLiveData.kt", l = {96, 100, 101}, m = "invokeSuspend")
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes.dex */
|
2021-12-17 22:03:14 +00:00
|
|
|
public final class FlowLiveDataConversions$asFlow$1 extends k implements Function2<s.a.c2.e<? super T>, Continuation<? super Unit>, Object> {
|
2021-06-27 20:44:35 +00:00
|
|
|
public final /* synthetic */ LiveData $this_asFlow;
|
|
|
|
private /* synthetic */ Object L$0;
|
|
|
|
public Object L$1;
|
|
|
|
public Object L$2;
|
|
|
|
public int label;
|
|
|
|
|
|
|
|
/* compiled from: FlowLiveData.kt */
|
|
|
|
@e(c = "androidx.lifecycle.FlowLiveDataConversions$asFlow$1$1", f = "FlowLiveData.kt", l = {}, m = "invokeSuspend")
|
|
|
|
/* renamed from: androidx.lifecycle.FlowLiveDataConversions$asFlow$1$1 reason: invalid class name */
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static final class AnonymousClass1 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
|
|
|
public final /* synthetic */ Observer $observer;
|
|
|
|
public int label;
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
|
|
public AnonymousClass1(Observer observer, Continuation continuation) {
|
2021-06-27 20:44:35 +00:00
|
|
|
super(2, continuation);
|
|
|
|
this.$observer = observer;
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2021-06-27 20:44:35 +00:00
|
|
|
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
|
|
|
m.checkNotNullParameter(continuation, "completion");
|
2022-03-02 20:59:20 +00:00
|
|
|
return new AnonymousClass1(this.$observer, continuation);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
|
|
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
|
|
|
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.a);
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2021-06-27 20:44:35 +00:00
|
|
|
public final Object invokeSuspend(Object obj) {
|
2021-12-17 22:03:14 +00:00
|
|
|
c.getCOROUTINE_SUSPENDED();
|
2021-06-27 20:44:35 +00:00
|
|
|
if (this.label == 0) {
|
|
|
|
l.throwOnFailure(obj);
|
2022-03-02 20:59:20 +00:00
|
|
|
FlowLiveDataConversions$asFlow$1.this.$this_asFlow.observeForever(this.$observer);
|
2021-06-27 20:44:35 +00:00
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: FlowLiveData.kt */
|
|
|
|
@e(c = "androidx.lifecycle.FlowLiveDataConversions$asFlow$1$2", f = "FlowLiveData.kt", l = {}, m = "invokeSuspend")
|
|
|
|
/* renamed from: androidx.lifecycle.FlowLiveDataConversions$asFlow$1$2 reason: invalid class name */
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public static final class AnonymousClass2 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
|
|
|
public final /* synthetic */ Observer $observer;
|
|
|
|
public int label;
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
|
|
public AnonymousClass2(Observer observer, Continuation continuation) {
|
2021-06-27 20:44:35 +00:00
|
|
|
super(2, continuation);
|
|
|
|
this.$observer = observer;
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2021-06-27 20:44:35 +00:00
|
|
|
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
|
|
|
m.checkNotNullParameter(continuation, "completion");
|
2022-03-02 20:59:20 +00:00
|
|
|
return new AnonymousClass2(this.$observer, continuation);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
|
|
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
|
|
|
return ((AnonymousClass2) create(coroutineScope, continuation)).invokeSuspend(Unit.a);
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2021-06-27 20:44:35 +00:00
|
|
|
public final Object invokeSuspend(Object obj) {
|
2021-12-17 22:03:14 +00:00
|
|
|
c.getCOROUTINE_SUSPENDED();
|
2021-06-27 20:44:35 +00:00
|
|
|
if (this.label == 0) {
|
|
|
|
l.throwOnFailure(obj);
|
2022-03-02 20:59:20 +00:00
|
|
|
FlowLiveDataConversions$asFlow$1.this.$this_asFlow.removeObserver(this.$observer);
|
2021-06-27 20:44:35 +00:00
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
2021-06-27 20:44:35 +00:00
|
|
|
public FlowLiveDataConversions$asFlow$1(LiveData liveData, Continuation continuation) {
|
|
|
|
super(2, continuation);
|
|
|
|
this.$this_asFlow = liveData;
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2021-06-27 20:44:35 +00:00
|
|
|
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
|
|
|
m.checkNotNullParameter(continuation, "completion");
|
|
|
|
FlowLiveDataConversions$asFlow$1 flowLiveDataConversions$asFlow$1 = new FlowLiveDataConversions$asFlow$1(this.$this_asFlow, continuation);
|
|
|
|
flowLiveDataConversions$asFlow$1.L$0 = obj;
|
|
|
|
return flowLiveDataConversions$asFlow$1;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
|
|
public final Object invoke(Object obj, Continuation<? super Unit> continuation) {
|
|
|
|
return ((FlowLiveDataConversions$asFlow$1) create(obj, continuation)).invokeSuspend(Unit.a);
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:27:0x0097 A[RETURN] */
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:28:0x0098 */
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:31:0x00a5 A[Catch: all -> 0x00d4, TRY_LEAVE, TryCatch #0 {all -> 0x00d4, blocks: (B:29:0x009d, B:31:0x00a5), top: B:44:0x009d }] */
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:35:0x00bc */
|
|
|
|
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:34:0x00b8 -> B:46:0x0089). Please submit an issue!!! */
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2022-03-02 20:59:20 +00:00
|
|
|
/*
|
|
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
|
|
*/
|
2021-06-27 20:44:35 +00:00
|
|
|
public final Object invokeSuspend(Object obj) {
|
2022-03-02 20:59:20 +00:00
|
|
|
s.a.c2.e eVar;
|
|
|
|
f fVar;
|
2021-12-17 22:03:14 +00:00
|
|
|
Observer observer;
|
2022-03-02 20:59:20 +00:00
|
|
|
g it;
|
2021-12-17 22:03:14 +00:00
|
|
|
FlowLiveDataConversions$asFlow$1 flowLiveDataConversions$asFlow$1;
|
2022-03-02 20:59:20 +00:00
|
|
|
Object a;
|
2021-12-17 22:03:14 +00:00
|
|
|
g gVar;
|
|
|
|
s.a.c2.e eVar2;
|
2022-03-02 20:59:20 +00:00
|
|
|
Observer observer2;
|
2021-12-17 22:03:14 +00:00
|
|
|
Object coroutine_suspended = c.getCOROUTINE_SUSPENDED();
|
2021-06-27 20:44:35 +00:00
|
|
|
int i = this.label;
|
2022-03-02 20:59:20 +00:00
|
|
|
Observer observer3 = 1;
|
|
|
|
try {
|
2021-06-27 20:44:35 +00:00
|
|
|
try {
|
2022-03-02 20:59:20 +00:00
|
|
|
if (i == 0) {
|
|
|
|
l.throwOnFailure(obj);
|
|
|
|
eVar = (s.a.c2.e) this.L$0;
|
|
|
|
f b2 = b.i.a.f.e.o.f.b(-1, null, null, 6);
|
|
|
|
observer = new FlowLiveDataConversions$asFlow$1$observer$1(b2);
|
|
|
|
CoroutineDispatcher coroutineDispatcher = k0.a;
|
2022-04-04 20:51:55 +00:00
|
|
|
l1 H = n.f3823b.H();
|
2022-03-02 20:59:20 +00:00
|
|
|
AnonymousClass1 r8 = new AnonymousClass1(observer, null);
|
|
|
|
this.L$0 = eVar;
|
|
|
|
this.L$1 = b2;
|
|
|
|
this.L$2 = observer;
|
|
|
|
this.label = 1;
|
|
|
|
if (b.i.a.f.e.o.f.C1(H, r8, this) == coroutine_suspended) {
|
|
|
|
return coroutine_suspended;
|
|
|
|
}
|
|
|
|
fVar = b2;
|
|
|
|
} else if (i != 1) {
|
2021-06-27 20:44:35 +00:00
|
|
|
try {
|
2022-03-02 20:59:20 +00:00
|
|
|
if (i == 2) {
|
|
|
|
gVar = (g) this.L$2;
|
|
|
|
observer2 = (Observer) this.L$1;
|
|
|
|
eVar2 = (s.a.c2.e) this.L$0;
|
|
|
|
l.throwOnFailure(obj);
|
|
|
|
flowLiveDataConversions$asFlow$1 = this;
|
|
|
|
if (!((Boolean) obj).booleanValue()) {
|
|
|
|
}
|
|
|
|
} else if (i == 3) {
|
|
|
|
it = (g) this.L$2;
|
|
|
|
observer3 = (Observer) this.L$1;
|
|
|
|
eVar = (s.a.c2.e) this.L$0;
|
|
|
|
l.throwOnFailure(obj);
|
|
|
|
flowLiveDataConversions$asFlow$1 = this;
|
2021-12-17 22:03:14 +00:00
|
|
|
flowLiveDataConversions$asFlow$1.L$0 = eVar;
|
2022-03-02 20:59:20 +00:00
|
|
|
flowLiveDataConversions$asFlow$1.L$1 = observer3;
|
|
|
|
flowLiveDataConversions$asFlow$1.L$2 = it;
|
|
|
|
flowLiveDataConversions$asFlow$1.label = 2;
|
|
|
|
a = it.a(flowLiveDataConversions$asFlow$1);
|
|
|
|
if (a == coroutine_suspended) {
|
|
|
|
return coroutine_suspended;
|
|
|
|
}
|
|
|
|
gVar = it;
|
|
|
|
obj = a;
|
|
|
|
eVar2 = eVar;
|
|
|
|
observer2 = observer3;
|
|
|
|
try {
|
|
|
|
if (!((Boolean) obj).booleanValue()) {
|
|
|
|
Object next = gVar.next();
|
|
|
|
flowLiveDataConversions$asFlow$1.L$0 = eVar2;
|
|
|
|
flowLiveDataConversions$asFlow$1.L$1 = observer2;
|
|
|
|
flowLiveDataConversions$asFlow$1.L$2 = gVar;
|
|
|
|
flowLiveDataConversions$asFlow$1.label = 3;
|
|
|
|
if (eVar2.emit(next, flowLiveDataConversions$asFlow$1) == coroutine_suspended) {
|
|
|
|
return coroutine_suspended;
|
|
|
|
}
|
|
|
|
it = gVar;
|
|
|
|
observer3 = observer2;
|
|
|
|
eVar = eVar2;
|
|
|
|
flowLiveDataConversions$asFlow$1.L$0 = eVar;
|
|
|
|
flowLiveDataConversions$asFlow$1.L$1 = observer3;
|
|
|
|
flowLiveDataConversions$asFlow$1.L$2 = it;
|
|
|
|
flowLiveDataConversions$asFlow$1.label = 2;
|
|
|
|
a = it.a(flowLiveDataConversions$asFlow$1);
|
|
|
|
if (a == coroutine_suspended) {
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
x0 x0Var = x0.j;
|
|
|
|
CoroutineDispatcher coroutineDispatcher2 = k0.a;
|
2022-04-04 20:51:55 +00:00
|
|
|
b.i.a.f.e.o.f.H0(x0Var, n.f3823b.H(), null, new AnonymousClass2(observer2, null), 2, null);
|
2022-03-02 20:59:20 +00:00
|
|
|
return Unit.a;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2022-03-02 20:59:20 +00:00
|
|
|
} catch (Throwable th) {
|
|
|
|
th = th;
|
|
|
|
observer3 = observer2;
|
|
|
|
x0 x0Var2 = x0.j;
|
|
|
|
CoroutineDispatcher coroutineDispatcher3 = k0.a;
|
2022-04-04 20:51:55 +00:00
|
|
|
b.i.a.f.e.o.f.H0(x0Var2, n.f3823b.H(), null, new AnonymousClass2(observer3, null), 2, null);
|
2022-03-02 20:59:20 +00:00
|
|
|
throw th;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2022-03-02 20:59:20 +00:00
|
|
|
} else {
|
|
|
|
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
} catch (Throwable th2) {
|
|
|
|
th = th2;
|
2022-03-02 20:59:20 +00:00
|
|
|
flowLiveDataConversions$asFlow$1 = this;
|
|
|
|
x0 x0Var22 = x0.j;
|
|
|
|
CoroutineDispatcher coroutineDispatcher32 = k0.a;
|
2022-04-04 20:51:55 +00:00
|
|
|
b.i.a.f.e.o.f.H0(x0Var22, n.f3823b.H(), null, new AnonymousClass2(observer3, null), 2, null);
|
2021-06-27 20:44:35 +00:00
|
|
|
throw th;
|
|
|
|
}
|
2022-03-02 20:59:20 +00:00
|
|
|
} else {
|
|
|
|
observer = (Observer) this.L$2;
|
|
|
|
fVar = (f) this.L$1;
|
|
|
|
eVar = (s.a.c2.e) this.L$0;
|
|
|
|
l.throwOnFailure(obj);
|
|
|
|
}
|
|
|
|
flowLiveDataConversions$asFlow$1.L$0 = eVar;
|
|
|
|
flowLiveDataConversions$asFlow$1.L$1 = observer3;
|
|
|
|
flowLiveDataConversions$asFlow$1.L$2 = it;
|
|
|
|
flowLiveDataConversions$asFlow$1.label = 2;
|
|
|
|
a = it.a(flowLiveDataConversions$asFlow$1);
|
|
|
|
if (a == coroutine_suspended) {
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
} catch (Throwable th3) {
|
|
|
|
th = th3;
|
2022-03-02 20:59:20 +00:00
|
|
|
x0 x0Var222 = x0.j;
|
|
|
|
CoroutineDispatcher coroutineDispatcher322 = k0.a;
|
2022-04-04 20:51:55 +00:00
|
|
|
b.i.a.f.e.o.f.H0(x0Var222, n.f3823b.H(), null, new AnonymousClass2(observer3, null), 2, null);
|
2021-12-17 22:03:14 +00:00
|
|
|
throw th;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2022-03-02 20:59:20 +00:00
|
|
|
it = fVar.iterator();
|
|
|
|
observer3 = observer;
|
2021-06-27 20:44:35 +00:00
|
|
|
flowLiveDataConversions$asFlow$1 = this;
|
2021-12-17 22:03:14 +00:00
|
|
|
} catch (Throwable th4) {
|
|
|
|
th = th4;
|
2022-03-02 20:59:20 +00:00
|
|
|
observer3 = observer;
|
2021-06-27 20:44:35 +00:00
|
|
|
flowLiveDataConversions$asFlow$1 = this;
|
2022-03-02 20:59:20 +00:00
|
|
|
x0 x0Var2222 = x0.j;
|
|
|
|
CoroutineDispatcher coroutineDispatcher3222 = k0.a;
|
2022-04-04 20:51:55 +00:00
|
|
|
b.i.a.f.e.o.f.H0(x0Var2222, n.f3823b.H(), null, new AnonymousClass2(observer3, null), 2, null);
|
2021-06-27 20:44:35 +00:00
|
|
|
throw th;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|