131 lines
3.9 KiB
Java
131 lines
3.9 KiB
Java
package s.a;
|
|
|
|
import c.q.a.k.a;
|
|
import d0.k;
|
|
import d0.l;
|
|
import d0.w.e;
|
|
import d0.w.g.c;
|
|
import d0.w.h.a.g;
|
|
import d0.z.d.e0;
|
|
import kotlin.NoWhenBranchMatchedException;
|
|
import kotlin.coroutines.Continuation;
|
|
import kotlin.coroutines.CoroutineContext;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlinx.coroutines.CoroutineScope;
|
|
import kotlinx.coroutines.CoroutineStart;
|
|
import kotlinx.coroutines.Job;
|
|
/* compiled from: AbstractCoroutine.kt */
|
|
public abstract class b<T> extends e1 implements Job, Continuation<T>, CoroutineScope {
|
|
public final CoroutineContext j;
|
|
public final CoroutineContext k;
|
|
|
|
public b(CoroutineContext coroutineContext, boolean z2) {
|
|
super(z2);
|
|
this.k = coroutineContext;
|
|
this.j = coroutineContext.plus(this);
|
|
}
|
|
|
|
@Override // s.a.e1
|
|
public final void I(Throwable th) {
|
|
a.w(this.j, th);
|
|
}
|
|
|
|
@Override // s.a.e1
|
|
public String N() {
|
|
boolean z2 = x.a;
|
|
return super.N();
|
|
}
|
|
|
|
@Override // s.a.e1
|
|
public final void Q(Object obj) {
|
|
if (obj instanceof u) {
|
|
u uVar = (u) obj;
|
|
Throwable th = uVar.b;
|
|
int i = uVar._handled;
|
|
}
|
|
}
|
|
|
|
@Override // s.a.e1
|
|
public final void R() {
|
|
Z();
|
|
}
|
|
|
|
public void X(Object obj) {
|
|
m(obj);
|
|
}
|
|
|
|
public final void Y() {
|
|
J((Job) this.k.get(Job.h));
|
|
}
|
|
|
|
public void Z() {
|
|
}
|
|
|
|
@Override // s.a.e1, kotlinx.coroutines.Job
|
|
public boolean a() {
|
|
return super.a();
|
|
}
|
|
|
|
/* JADX INFO: finally extract failed */
|
|
public final <R> void a0(CoroutineStart coroutineStart, R r, Function2<? super R, ? super Continuation<? super T>, ? extends Object> function2) {
|
|
Y();
|
|
int ordinal = coroutineStart.ordinal();
|
|
if (ordinal == 0) {
|
|
a.R(function2, r, this, null, 4);
|
|
} else if (ordinal == 1) {
|
|
} else {
|
|
if (ordinal == 2) {
|
|
e.startCoroutine(function2, r, this);
|
|
} else if (ordinal == 3) {
|
|
Continuation probeCoroutineCreated = g.probeCoroutineCreated(this);
|
|
try {
|
|
CoroutineContext coroutineContext = this.j;
|
|
Object b = s.a.a.a.b(coroutineContext, null);
|
|
if (function2 != null) {
|
|
try {
|
|
Object invoke = ((Function2) e0.beforeCheckcastToFunctionOfArity(function2, 2)).invoke(r, probeCoroutineCreated);
|
|
s.a.a.a.a(coroutineContext, b);
|
|
if (invoke != c.getCOROUTINE_SUSPENDED()) {
|
|
k.a aVar = k.i;
|
|
probeCoroutineCreated.resumeWith(k.m78constructorimpl(invoke));
|
|
}
|
|
} catch (Throwable th) {
|
|
s.a.a.a.a(coroutineContext, b);
|
|
throw th;
|
|
}
|
|
} else {
|
|
throw new NullPointerException("null cannot be cast to non-null type (R, kotlin.coroutines.Continuation<T>) -> kotlin.Any?");
|
|
}
|
|
} catch (Throwable th2) {
|
|
k.a aVar2 = k.i;
|
|
probeCoroutineCreated.resumeWith(k.m78constructorimpl(l.createFailure(th2)));
|
|
}
|
|
} else {
|
|
throw new NoWhenBranchMatchedException();
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // kotlin.coroutines.Continuation
|
|
public final CoroutineContext getContext() {
|
|
return this.j;
|
|
}
|
|
|
|
@Override // kotlinx.coroutines.CoroutineScope
|
|
public CoroutineContext getCoroutineContext() {
|
|
return this.j;
|
|
}
|
|
|
|
@Override // s.a.e1
|
|
public String q() {
|
|
return getClass().getSimpleName() + " was cancelled";
|
|
}
|
|
|
|
@Override // kotlin.coroutines.Continuation
|
|
public final void resumeWith(Object obj) {
|
|
Object L = L(a.e0(obj, null));
|
|
if (L != f1.b) {
|
|
X(L);
|
|
}
|
|
}
|
|
}
|