2021-11-08 18:25:28 +00:00
|
|
|
package d0.w.i.a;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.w.d;
|
|
|
|
import d0.z.d.m;
|
2021-06-27 20:44:35 +00:00
|
|
|
import kotlin.coroutines.Continuation;
|
|
|
|
import kotlin.coroutines.CoroutineContext;
|
|
|
|
/* compiled from: ContinuationImpl.kt */
|
|
|
|
public abstract class d extends a {
|
|
|
|
private final CoroutineContext _context;
|
|
|
|
private transient Continuation<Object> intercepted;
|
|
|
|
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
|
|
public d(Continuation<Object> continuation) {
|
|
|
|
this(continuation, continuation != null ? continuation.getContext() : null);
|
|
|
|
}
|
|
|
|
|
|
|
|
public d(Continuation<Object> continuation, CoroutineContext coroutineContext) {
|
|
|
|
super(continuation);
|
|
|
|
this._context = coroutineContext;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // kotlin.coroutines.Continuation
|
|
|
|
public CoroutineContext getContext() {
|
|
|
|
CoroutineContext coroutineContext = this._context;
|
|
|
|
m.checkNotNull(coroutineContext);
|
|
|
|
return coroutineContext;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Continuation<Object> intercepted() {
|
|
|
|
Continuation<Object> continuation = this.intercepted;
|
|
|
|
if (continuation == null) {
|
|
|
|
CoroutineContext context = getContext();
|
2021-11-08 18:25:28 +00:00
|
|
|
int i = d0.w.d.e;
|
|
|
|
d0.w.d dVar = (d0.w.d) context.get(d.b.a);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (dVar == null || (continuation = dVar.interceptContinuation(this)) == null) {
|
|
|
|
continuation = this;
|
|
|
|
}
|
|
|
|
this.intercepted = continuation;
|
|
|
|
}
|
|
|
|
return continuation;
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // d0.w.i.a.a
|
2021-06-27 20:44:35 +00:00
|
|
|
public void releaseIntercepted() {
|
|
|
|
Continuation<?> continuation = this.intercepted;
|
|
|
|
if (!(continuation == null || continuation == this)) {
|
|
|
|
CoroutineContext context = getContext();
|
2021-11-08 18:25:28 +00:00
|
|
|
int i = d0.w.d.e;
|
2021-06-27 20:44:35 +00:00
|
|
|
CoroutineContext.Element element = context.get(d.b.a);
|
|
|
|
m.checkNotNull(element);
|
2021-11-08 18:25:28 +00:00
|
|
|
((d0.w.d) element).releaseInterceptedContinuation(continuation);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
this.intercepted = c.i;
|
|
|
|
}
|
|
|
|
}
|