Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
package kotlinx.coroutines.channels;
/* loaded from: classes5.dex */
public enum BufferOverflow {
SUSPEND,
DROP_OLDEST,
DROP_LATEST
}

View File

@@ -0,0 +1,28 @@
package kotlinx.coroutines.channels;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
/* loaded from: classes5.dex */
public final class BufferedChannel$receiveCatching$1 extends ContinuationImpl {
public int label;
public /* synthetic */ Object result;
public final /* synthetic */ BufferedChannel this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public BufferedChannel$receiveCatching$1(BufferedChannel bufferedChannel, Continuation continuation) {
super(continuation);
this.this$0 = bufferedChannel;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
this.result = obj;
this.label |= Integer.MIN_VALUE;
Object m4122receiveCatchingJP2dKIU$suspendImpl = BufferedChannel.m4122receiveCatchingJP2dKIU$suspendImpl(this.this$0, this);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return m4122receiveCatchingJP2dKIU$suspendImpl == coroutine_suspended ? m4122receiveCatchingJP2dKIU$suspendImpl : ChannelResult.m4127boximpl(m4122receiveCatchingJP2dKIU$suspendImpl);
}
}

View File

@@ -0,0 +1,33 @@
package kotlinx.coroutines.channels;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
/* loaded from: classes5.dex */
public final class BufferedChannel$receiveCatchingOnNoWaiterSuspend$1 extends ContinuationImpl {
public int I$0;
public long J$0;
public Object L$0;
public Object L$1;
public int label;
public /* synthetic */ Object result;
public final /* synthetic */ BufferedChannel this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public BufferedChannel$receiveCatchingOnNoWaiterSuspend$1(BufferedChannel bufferedChannel, Continuation continuation) {
super(continuation);
this.this$0 = bufferedChannel;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object m4124receiveCatchingOnNoWaiterSuspendGKJJFZk;
Object coroutine_suspended;
this.result = obj;
this.label |= Integer.MIN_VALUE;
m4124receiveCatchingOnNoWaiterSuspendGKJJFZk = this.this$0.m4124receiveCatchingOnNoWaiterSuspendGKJJFZk(null, 0, 0L, this);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return m4124receiveCatchingOnNoWaiterSuspendGKJJFZk == coroutine_suspended ? m4124receiveCatchingOnNoWaiterSuspendGKJJFZk : ChannelResult.m4127boximpl(m4124receiveCatchingOnNoWaiterSuspendGKJJFZk);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
package kotlinx.coroutines.channels;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.FunctionReferenceImpl;
/* loaded from: classes5.dex */
public /* synthetic */ class BufferedChannelKt$createSegmentFunction$1 extends FunctionReferenceImpl implements Function2 {
public static final BufferedChannelKt$createSegmentFunction$1 INSTANCE = new BufferedChannelKt$createSegmentFunction$1();
public BufferedChannelKt$createSegmentFunction$1() {
super(2, BufferedChannelKt.class, "createSegment", "createSegment(JLkotlinx/coroutines/channels/ChannelSegment;)Lkotlinx/coroutines/channels/ChannelSegment;", 1);
}
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
return invoke(((Number) obj).longValue(), (ChannelSegment) obj2);
}
public final ChannelSegment invoke(long j, ChannelSegment channelSegment) {
ChannelSegment createSegment;
createSegment = BufferedChannelKt.createSegment(j, channelSegment);
return createSegment;
}
}

View File

@@ -0,0 +1,101 @@
package kotlinx.coroutines.channels;
import kotlin.jvm.functions.Function1;
import kotlin.reflect.KFunction;
import kotlinx.coroutines.CancellableContinuation;
import kotlinx.coroutines.internal.Symbol;
import kotlinx.coroutines.internal.SystemPropsKt__SystemProps_commonKt;
/* loaded from: classes5.dex */
public abstract class BufferedChannelKt {
public static final Symbol BUFFERED;
public static final Symbol CHANNEL_CLOSED;
public static final Symbol CLOSE_HANDLER_CLOSED;
public static final Symbol CLOSE_HANDLER_INVOKED;
public static final Symbol DONE_RCV;
public static final int EXPAND_BUFFER_COMPLETION_WAIT_ITERATIONS;
public static final Symbol FAILED;
public static final Symbol INTERRUPTED_RCV;
public static final Symbol INTERRUPTED_SEND;
public static final Symbol IN_BUFFER;
public static final Symbol NO_CLOSE_CAUSE;
public static final Symbol NO_RECEIVE_RESULT;
public static final ChannelSegment NULL_SEGMENT = new ChannelSegment(-1, null, null, 0);
public static final Symbol POISONED;
public static final Symbol RESUMING_BY_EB;
public static final Symbol RESUMING_BY_RCV;
public static final int SEGMENT_SIZE;
public static final Symbol SUSPEND;
public static final Symbol SUSPEND_NO_WAITER;
public static final long constructEBCompletedAndPauseFlag(long j, boolean z) {
return (z ? 4611686018427387904L : 0L) + j;
}
public static final long constructSendersAndCloseStatus(long j, int i) {
return (i << 60) + j;
}
public static final Symbol getCHANNEL_CLOSED() {
return CHANNEL_CLOSED;
}
public static final long initialBufferEnd(int i) {
if (i == 0) {
return 0L;
}
if (i != Integer.MAX_VALUE) {
return i;
}
return Long.MAX_VALUE;
}
public static final KFunction createSegmentFunction() {
return BufferedChannelKt$createSegmentFunction$1.INSTANCE;
}
public static final ChannelSegment createSegment(long j, ChannelSegment channelSegment) {
return new ChannelSegment(j, channelSegment, channelSegment.getChannel(), 0);
}
static {
int systemProp$default;
int systemProp$default2;
systemProp$default = SystemPropsKt__SystemProps_commonKt.systemProp$default("kotlinx.coroutines.bufferedChannel.segmentSize", 32, 0, 0, 12, (Object) null);
SEGMENT_SIZE = systemProp$default;
systemProp$default2 = SystemPropsKt__SystemProps_commonKt.systemProp$default("kotlinx.coroutines.bufferedChannel.expandBufferCompletionWaitIterations", 10000, 0, 0, 12, (Object) null);
EXPAND_BUFFER_COMPLETION_WAIT_ITERATIONS = systemProp$default2;
BUFFERED = new Symbol("BUFFERED");
IN_BUFFER = new Symbol("SHOULD_BUFFER");
RESUMING_BY_RCV = new Symbol("S_RESUMING_BY_RCV");
RESUMING_BY_EB = new Symbol("RESUMING_BY_EB");
POISONED = new Symbol("POISONED");
DONE_RCV = new Symbol("DONE_RCV");
INTERRUPTED_SEND = new Symbol("INTERRUPTED_SEND");
INTERRUPTED_RCV = new Symbol("INTERRUPTED_RCV");
CHANNEL_CLOSED = new Symbol("CHANNEL_CLOSED");
SUSPEND = new Symbol("SUSPEND");
SUSPEND_NO_WAITER = new Symbol("SUSPEND_NO_WAITER");
FAILED = new Symbol("FAILED");
NO_RECEIVE_RESULT = new Symbol("NO_RECEIVE_RESULT");
CLOSE_HANDLER_CLOSED = new Symbol("CLOSE_HANDLER_CLOSED");
CLOSE_HANDLER_INVOKED = new Symbol("CLOSE_HANDLER_INVOKED");
NO_CLOSE_CAUSE = new Symbol("NO_CLOSE_CAUSE");
}
public static /* synthetic */ boolean tryResume0$default(CancellableContinuation cancellableContinuation, Object obj, Function1 function1, int i, Object obj2) {
if ((i & 2) != 0) {
function1 = null;
}
return tryResume0(cancellableContinuation, obj, function1);
}
public static final boolean tryResume0(CancellableContinuation cancellableContinuation, Object obj, Function1 function1) {
Object tryResume = cancellableContinuation.tryResume(obj, null, function1);
if (tryResume == null) {
return false;
}
cancellableContinuation.completeResume(tryResume);
return true;
}
}

View File

@@ -0,0 +1,17 @@
package kotlinx.coroutines.channels;
import kotlinx.coroutines.internal.SystemPropsKt;
/* loaded from: classes5.dex */
public interface Channel extends SendChannel, ReceiveChannel {
public static final Factory Factory = Factory.$$INSTANCE;
public static final class Factory {
public static final /* synthetic */ Factory $$INSTANCE = new Factory();
public static final int CHANNEL_DEFAULT_CAPACITY = SystemPropsKt.systemProp("kotlinx.coroutines.channels.defaultBuffer", 64, 1, 2147483646);
public final int getCHANNEL_DEFAULT_CAPACITY$kotlinx_coroutines_core() {
return CHANNEL_DEFAULT_CAPACITY;
}
}
}

View File

@@ -0,0 +1,96 @@
package kotlinx.coroutines.channels;
import java.util.concurrent.CancellationException;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.jvm.functions.Function1;
import kotlinx.coroutines.AbstractCoroutine;
import kotlinx.coroutines.JobCancellationException;
import kotlinx.coroutines.JobSupport;
/* loaded from: classes5.dex */
public abstract class ChannelCoroutine extends AbstractCoroutine implements Channel {
public final Channel _channel;
@Override // kotlinx.coroutines.channels.SendChannel
public boolean close(Throwable th) {
return this._channel.close(th);
}
public final Channel getChannel() {
return this;
}
public final Channel get_channel() {
return this._channel;
}
@Override // kotlinx.coroutines.channels.SendChannel
public void invokeOnClose(Function1 function1) {
this._channel.invokeOnClose(function1);
}
@Override // kotlinx.coroutines.channels.SendChannel
public boolean isClosedForSend() {
return this._channel.isClosedForSend();
}
@Override // kotlinx.coroutines.channels.ReceiveChannel
public ChannelIterator iterator() {
return this._channel.iterator();
}
@Override // kotlinx.coroutines.channels.ReceiveChannel
public Object receive(Continuation continuation) {
return this._channel.receive(continuation);
}
@Override // kotlinx.coroutines.channels.ReceiveChannel
/* renamed from: receiveCatching-JP2dKIU */
public Object mo4123receiveCatchingJP2dKIU(Continuation continuation) {
Object mo4123receiveCatchingJP2dKIU = this._channel.mo4123receiveCatchingJP2dKIU(continuation);
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return mo4123receiveCatchingJP2dKIU;
}
@Override // kotlinx.coroutines.channels.SendChannel
public Object send(Object obj, Continuation continuation) {
return this._channel.send(obj, continuation);
}
@Override // kotlinx.coroutines.channels.ReceiveChannel
/* renamed from: tryReceive-PtdJZtk */
public Object mo4125tryReceivePtdJZtk() {
return this._channel.mo4125tryReceivePtdJZtk();
}
@Override // kotlinx.coroutines.channels.SendChannel
/* renamed from: trySend-JP2dKIU */
public Object mo4126trySendJP2dKIU(Object obj) {
return this._channel.mo4126trySendJP2dKIU(obj);
}
public ChannelCoroutine(CoroutineContext coroutineContext, Channel channel, boolean z, boolean z2) {
super(coroutineContext, z, z2);
this._channel = channel;
}
@Override // kotlinx.coroutines.JobSupport, kotlinx.coroutines.Job
public final void cancel(CancellationException cancellationException) {
if (isCancelled()) {
return;
}
if (cancellationException == null) {
cancellationException = new JobCancellationException(cancellationExceptionMessage(), null, this);
}
cancelInternal(cancellationException);
}
@Override // kotlinx.coroutines.JobSupport
public void cancelInternal(Throwable th) {
CancellationException cancellationException$default = JobSupport.toCancellationException$default(this, th, null, 1, null);
this._channel.cancel(cancellationException$default);
cancelCoroutine(cancellationException$default);
}
}

View File

@@ -0,0 +1,10 @@
package kotlinx.coroutines.channels;
import kotlin.coroutines.Continuation;
/* loaded from: classes5.dex */
public interface ChannelIterator {
Object hasNext(Continuation continuation);
Object next();
}

View File

@@ -0,0 +1,45 @@
package kotlinx.coroutines.channels;
import kotlin.jvm.functions.Function1;
/* loaded from: classes5.dex */
public abstract class ChannelKt {
public static /* synthetic */ Channel Channel$default(int i, BufferOverflow bufferOverflow, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
i = 0;
}
if ((i2 & 2) != 0) {
bufferOverflow = BufferOverflow.SUSPEND;
}
if ((i2 & 4) != 0) {
function1 = null;
}
return Channel(i, bufferOverflow, function1);
}
public static final Channel Channel(int i, BufferOverflow bufferOverflow, Function1 function1) {
Channel bufferedChannel;
if (i == -2) {
bufferedChannel = bufferOverflow == BufferOverflow.SUSPEND ? new BufferedChannel(Channel.Factory.getCHANNEL_DEFAULT_CAPACITY$kotlinx_coroutines_core(), function1) : new ConflatedBufferedChannel(1, bufferOverflow, function1);
} else {
if (i == -1) {
if (bufferOverflow != BufferOverflow.SUSPEND) {
throw new IllegalArgumentException("CONFLATED capacity cannot be used with non-default onBufferOverflow".toString());
}
return new ConflatedBufferedChannel(1, BufferOverflow.DROP_OLDEST, function1);
}
if (i != 0) {
if (i != Integer.MAX_VALUE) {
return bufferOverflow == BufferOverflow.SUSPEND ? new BufferedChannel(i, function1) : new ConflatedBufferedChannel(i, bufferOverflow, function1);
}
return new BufferedChannel(Integer.MAX_VALUE, function1);
}
if (bufferOverflow == BufferOverflow.SUSPEND) {
bufferedChannel = new BufferedChannel(0, function1);
} else {
bufferedChannel = new ConflatedBufferedChannel(1, bufferOverflow, function1);
}
}
return bufferedChannel;
}
}

View File

@@ -0,0 +1,146 @@
package kotlinx.coroutines.channels;
import com.facebook.internal.AnalyticsEvents;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes5.dex */
public final class ChannelResult {
public static final Companion Companion = new Companion(null);
public static final Failed failed = new Failed();
public final Object holder;
public static class Failed {
public String toString() {
return AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_FAILED;
}
}
/* renamed from: box-impl, reason: not valid java name */
public static final /* synthetic */ ChannelResult m4127boximpl(Object obj) {
return new ChannelResult(obj);
}
/* renamed from: constructor-impl, reason: not valid java name */
public static Object m4128constructorimpl(Object obj) {
return obj;
}
/* renamed from: equals-impl, reason: not valid java name */
public static boolean m4129equalsimpl(Object obj, Object obj2) {
return (obj2 instanceof ChannelResult) && Intrinsics.areEqual(obj, ((ChannelResult) obj2).m4136unboximpl());
}
/* renamed from: hashCode-impl, reason: not valid java name */
public static int m4132hashCodeimpl(Object obj) {
if (obj == null) {
return 0;
}
return obj.hashCode();
}
public boolean equals(Object obj) {
return m4129equalsimpl(this.holder, obj);
}
public int hashCode() {
return m4132hashCodeimpl(this.holder);
}
/* renamed from: unbox-impl, reason: not valid java name */
public final /* synthetic */ Object m4136unboximpl() {
return this.holder;
}
public /* synthetic */ ChannelResult(Object obj) {
this.holder = obj;
}
/* renamed from: isSuccess-impl, reason: not valid java name */
public static final boolean m4134isSuccessimpl(Object obj) {
return !(obj instanceof Failed);
}
/* renamed from: isClosed-impl, reason: not valid java name */
public static final boolean m4133isClosedimpl(Object obj) {
return obj instanceof Closed;
}
/* renamed from: getOrNull-impl, reason: not valid java name */
public static final Object m4131getOrNullimpl(Object obj) {
if (obj instanceof Failed) {
return null;
}
return obj;
}
/* renamed from: exceptionOrNull-impl, reason: not valid java name */
public static final Throwable m4130exceptionOrNullimpl(Object obj) {
Closed closed = obj instanceof Closed ? (Closed) obj : null;
if (closed != null) {
return closed.cause;
}
return null;
}
public static final class Closed extends Failed {
public final Throwable cause;
public Closed(Throwable th) {
this.cause = th;
}
public boolean equals(Object obj) {
return (obj instanceof Closed) && Intrinsics.areEqual(this.cause, ((Closed) obj).cause);
}
public int hashCode() {
Throwable th = this.cause;
if (th != null) {
return th.hashCode();
}
return 0;
}
@Override // kotlinx.coroutines.channels.ChannelResult.Failed
public String toString() {
return "Closed(" + this.cause + ')';
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public Companion() {
}
/* renamed from: success-JP2dKIU, reason: not valid java name */
public final Object m4139successJP2dKIU(Object obj) {
return ChannelResult.m4128constructorimpl(obj);
}
/* renamed from: failure-PtdJZtk, reason: not valid java name */
public final Object m4138failurePtdJZtk() {
return ChannelResult.m4128constructorimpl(ChannelResult.failed);
}
/* renamed from: closed-JP2dKIU, reason: not valid java name */
public final Object m4137closedJP2dKIU(Throwable th) {
return ChannelResult.m4128constructorimpl(new Closed(th));
}
}
public String toString() {
return m4135toStringimpl(this.holder);
}
/* renamed from: toString-impl, reason: not valid java name */
public static String m4135toStringimpl(Object obj) {
if (obj instanceof Closed) {
return ((Closed) obj).toString();
}
return "Value(" + obj + ')';
}
}

View File

@@ -0,0 +1,15 @@
package kotlinx.coroutines.channels;
import java.util.concurrent.atomic.AtomicReferenceArray;
/* loaded from: classes5.dex */
public abstract /* synthetic */ class ChannelSegment$$ExternalSyntheticBackportWithForwarding0 {
public static /* synthetic */ boolean m(AtomicReferenceArray atomicReferenceArray, int i, Object obj, Object obj2) {
while (!atomicReferenceArray.compareAndSet(i, obj, obj2)) {
if (atomicReferenceArray.get(i) != obj) {
return false;
}
}
return true;
}
}

View File

@@ -0,0 +1,198 @@
package kotlinx.coroutines.channels;
import java.util.concurrent.atomic.AtomicReferenceArray;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.internal.Segment;
/* loaded from: classes5.dex */
public final class ChannelSegment extends Segment {
public final BufferedChannel _channel;
public final AtomicReferenceArray data;
public ChannelSegment(long j, ChannelSegment channelSegment, BufferedChannel bufferedChannel, int i) {
super(j, channelSegment, i);
this._channel = bufferedChannel;
this.data = new AtomicReferenceArray(BufferedChannelKt.SEGMENT_SIZE * 2);
}
public final BufferedChannel getChannel() {
BufferedChannel bufferedChannel = this._channel;
Intrinsics.checkNotNull(bufferedChannel);
return bufferedChannel;
}
@Override // kotlinx.coroutines.internal.Segment
public int getNumberOfSlots() {
return BufferedChannelKt.SEGMENT_SIZE;
}
public final void storeElement$kotlinx_coroutines_core(int i, Object obj) {
setElementLazy(i, obj);
}
public final Object getElement$kotlinx_coroutines_core(int i) {
return this.data.get(i * 2);
}
public final Object retrieveElement$kotlinx_coroutines_core(int i) {
Object element$kotlinx_coroutines_core = getElement$kotlinx_coroutines_core(i);
cleanElement$kotlinx_coroutines_core(i);
return element$kotlinx_coroutines_core;
}
public final void cleanElement$kotlinx_coroutines_core(int i) {
setElementLazy(i, null);
}
public final void setElementLazy(int i, Object obj) {
this.data.lazySet(i * 2, obj);
}
public final Object getState$kotlinx_coroutines_core(int i) {
return this.data.get((i * 2) + 1);
}
public final void setState$kotlinx_coroutines_core(int i, Object obj) {
this.data.set((i * 2) + 1, obj);
}
public final boolean casState$kotlinx_coroutines_core(int i, Object obj, Object obj2) {
return ChannelSegment$$ExternalSyntheticBackportWithForwarding0.m(this.data, (i * 2) + 1, obj, obj2);
}
public final Object getAndSetState$kotlinx_coroutines_core(int i, Object obj) {
return this.data.getAndSet((i * 2) + 1, obj);
}
/* JADX WARN: Code restructure failed: missing block: B:54:0x0063, code lost:
cleanElement$kotlinx_coroutines_core(r4);
*/
/* JADX WARN: Code restructure failed: missing block: B:55:0x0066, code lost:
if (r0 == false) goto L65;
*/
/* JADX WARN: Code restructure failed: missing block: B:56:0x0068, code lost:
r4 = getChannel().onUndeliveredElement;
*/
/* JADX WARN: Code restructure failed: missing block: B:57:0x006e, code lost:
if (r4 == null) goto L66;
*/
/* JADX WARN: Code restructure failed: missing block: B:58:0x0070, code lost:
kotlinx.coroutines.internal.OnUndeliveredElementKt.callUndeliveredElement(r4, r5, r6);
*/
/* JADX WARN: Code restructure failed: missing block: B:59:0x0073, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:60:?, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:61:?, code lost:
return;
*/
@Override // kotlinx.coroutines.internal.Segment
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void onCancellation(int r4, java.lang.Throwable r5, kotlin.coroutines.CoroutineContext r6) {
/*
r3 = this;
int r5 = kotlinx.coroutines.channels.BufferedChannelKt.SEGMENT_SIZE
if (r4 < r5) goto L6
r0 = 1
goto L7
L6:
r0 = 0
L7:
if (r0 == 0) goto La
int r4 = r4 - r5
La:
java.lang.Object r5 = r3.getElement$kotlinx_coroutines_core(r4)
Le:
java.lang.Object r1 = r3.getState$kotlinx_coroutines_core(r4)
boolean r2 = r1 instanceof kotlinx.coroutines.Waiter
if (r2 != 0) goto L74
boolean r2 = r1 instanceof kotlinx.coroutines.channels.WaiterEB
if (r2 == 0) goto L1b
goto L74
L1b:
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getINTERRUPTED_SEND$p()
if (r1 == r2) goto L63
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getINTERRUPTED_RCV$p()
if (r1 != r2) goto L28
goto L63
L28:
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getRESUMING_BY_EB$p()
if (r1 == r2) goto Le
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getRESUMING_BY_RCV$p()
if (r1 != r2) goto L35
goto Le
L35:
kotlinx.coroutines.internal.Symbol r4 = kotlinx.coroutines.channels.BufferedChannelKt.access$getDONE_RCV$p()
if (r1 == r4) goto L62
kotlinx.coroutines.internal.Symbol r4 = kotlinx.coroutines.channels.BufferedChannelKt.BUFFERED
if (r1 != r4) goto L40
goto L62
L40:
kotlinx.coroutines.internal.Symbol r4 = kotlinx.coroutines.channels.BufferedChannelKt.getCHANNEL_CLOSED()
if (r1 != r4) goto L47
return
L47:
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
java.lang.StringBuilder r5 = new java.lang.StringBuilder
r5.<init>()
java.lang.String r6 = "unexpected state: "
r5.append(r6)
r5.append(r1)
java.lang.String r5 = r5.toString()
java.lang.String r5 = r5.toString()
r4.<init>(r5)
throw r4
L62:
return
L63:
r3.cleanElement$kotlinx_coroutines_core(r4)
if (r0 == 0) goto L73
kotlinx.coroutines.channels.BufferedChannel r4 = r3.getChannel()
kotlin.jvm.functions.Function1 r4 = r4.onUndeliveredElement
if (r4 == 0) goto L73
kotlinx.coroutines.internal.OnUndeliveredElementKt.callUndeliveredElement(r4, r5, r6)
L73:
return
L74:
if (r0 == 0) goto L7b
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getINTERRUPTED_SEND$p()
goto L7f
L7b:
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getINTERRUPTED_RCV$p()
L7f:
boolean r1 = r3.casState$kotlinx_coroutines_core(r4, r1, r2)
if (r1 == 0) goto Le
r3.cleanElement$kotlinx_coroutines_core(r4)
r1 = r0 ^ 1
r3.onCancelledRequest(r4, r1)
if (r0 == 0) goto L9a
kotlinx.coroutines.channels.BufferedChannel r4 = r3.getChannel()
kotlin.jvm.functions.Function1 r4 = r4.onUndeliveredElement
if (r4 == 0) goto L9a
kotlinx.coroutines.internal.OnUndeliveredElementKt.callUndeliveredElement(r4, r5, r6)
L9a:
return
*/
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelSegment.onCancellation(int, java.lang.Throwable, kotlin.coroutines.CoroutineContext):void");
}
public final void onCancelledRequest(int i, boolean z) {
if (z) {
getChannel().waitExpandBufferCompletion$kotlinx_coroutines_core((this.id * BufferedChannelKt.SEGMENT_SIZE) + i);
}
onSlotCleaned();
}
}

View File

@@ -0,0 +1,12 @@
package kotlinx.coroutines.channels;
/* loaded from: classes5.dex */
public abstract class ChannelsKt {
public static final void cancelConsumed(ReceiveChannel receiveChannel, Throwable th) {
ChannelsKt__Channels_commonKt.cancelConsumed(receiveChannel, th);
}
public static final Object trySendBlocking(SendChannel sendChannel, Object obj) {
return ChannelsKt__ChannelsKt.trySendBlocking(sendChannel, obj);
}
}

View File

@@ -0,0 +1,67 @@
package kotlinx.coroutines.channels;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes5.dex */
public final class ChannelsKt__ChannelsKt$trySendBlocking$2 extends SuspendLambda implements Function2 {
public final /* synthetic */ Object $element;
public final /* synthetic */ SendChannel $this_trySendBlocking;
public /* synthetic */ Object L$0;
public int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ChannelsKt__ChannelsKt$trySendBlocking$2(SendChannel sendChannel, Object obj, Continuation continuation) {
super(2, continuation);
this.$this_trySendBlocking = sendChannel;
this.$element = obj;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
ChannelsKt__ChannelsKt$trySendBlocking$2 channelsKt__ChannelsKt$trySendBlocking$2 = new ChannelsKt__ChannelsKt$trySendBlocking$2(this.$this_trySendBlocking, this.$element, continuation);
channelsKt__ChannelsKt$trySendBlocking$2.L$0 = obj;
return channelsKt__ChannelsKt$trySendBlocking$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((ChannelsKt__ChannelsKt$trySendBlocking$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
Object m4060constructorimpl;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
try {
if (i == 0) {
ResultKt.throwOnFailure(obj);
SendChannel sendChannel = this.$this_trySendBlocking;
Object obj2 = this.$element;
Result.Companion companion = Result.Companion;
this.label = 1;
if (sendChannel.send(obj2, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
m4060constructorimpl = Result.m4060constructorimpl(Unit.INSTANCE);
} catch (Throwable th) {
Result.Companion companion2 = Result.Companion;
m4060constructorimpl = Result.m4060constructorimpl(ResultKt.createFailure(th));
}
return ChannelResult.m4127boximpl(Result.m4065isSuccessimpl(m4060constructorimpl) ? ChannelResult.Companion.m4139successJP2dKIU(Unit.INSTANCE) : ChannelResult.Companion.m4137closedJP2dKIU(Result.m4062exceptionOrNullimpl(m4060constructorimpl)));
}
}

View File

@@ -0,0 +1,18 @@
package kotlinx.coroutines.channels;
import kotlin.Unit;
import kotlinx.coroutines.BuildersKt__BuildersKt;
import kotlinx.coroutines.channels.ChannelResult;
/* loaded from: classes5.dex */
public abstract /* synthetic */ class ChannelsKt__ChannelsKt {
public static final Object trySendBlocking(SendChannel sendChannel, Object obj) {
Object runBlocking$default;
Object mo4126trySendJP2dKIU = sendChannel.mo4126trySendJP2dKIU(obj);
if (mo4126trySendJP2dKIU instanceof ChannelResult.Failed) {
runBlocking$default = BuildersKt__BuildersKt.runBlocking$default(null, new ChannelsKt__ChannelsKt$trySendBlocking$2(sendChannel, obj, null), 1, null);
return ((ChannelResult) runBlocking$default).m4136unboximpl();
}
return ChannelResult.Companion.m4139successJP2dKIU(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,17 @@
package kotlinx.coroutines.channels;
import java.util.concurrent.CancellationException;
import kotlinx.coroutines.ExceptionsKt;
/* loaded from: classes5.dex */
public abstract /* synthetic */ class ChannelsKt__Channels_commonKt {
public static final void cancelConsumed(ReceiveChannel receiveChannel, Throwable th) {
if (th != null) {
r0 = th instanceof CancellationException ? (CancellationException) th : null;
if (r0 == null) {
r0 = ExceptionsKt.CancellationException("Channel was consumed, consumer had failed", th);
}
}
receiveChannel.cancel(r0);
}
}

View File

@@ -0,0 +1,10 @@
package kotlinx.coroutines.channels;
import java.util.NoSuchElementException;
/* loaded from: classes5.dex */
public final class ClosedReceiveChannelException extends NoSuchElementException {
public ClosedReceiveChannelException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,8 @@
package kotlinx.coroutines.channels;
/* loaded from: classes5.dex */
public final class ClosedSendChannelException extends IllegalStateException {
public ClosedSendChannelException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,138 @@
package kotlinx.coroutines.channels;
import kotlin.ExceptionsKt__ExceptionsKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Reflection;
import kotlinx.coroutines.Waiter;
import kotlinx.coroutines.channels.ChannelResult;
import kotlinx.coroutines.internal.OnUndeliveredElementKt;
import kotlinx.coroutines.internal.UndeliveredElementException;
/* loaded from: classes5.dex */
public class ConflatedBufferedChannel extends BufferedChannel {
public final int capacity;
public final BufferOverflow onBufferOverflow;
@Override // kotlinx.coroutines.channels.BufferedChannel, kotlinx.coroutines.channels.SendChannel
public Object send(Object obj, Continuation continuation) {
return send$suspendImpl(this, obj, continuation);
}
public ConflatedBufferedChannel(int i, BufferOverflow bufferOverflow, Function1 function1) {
super(i, function1);
this.capacity = i;
this.onBufferOverflow = bufferOverflow;
if (bufferOverflow == BufferOverflow.SUSPEND) {
throw new IllegalArgumentException(("This implementation does not support suspension for senders, use " + Reflection.getOrCreateKotlinClass(BufferedChannel.class).getSimpleName() + " instead").toString());
}
if (i >= 1) {
return;
}
throw new IllegalArgumentException(("Buffered channel capacity must be at least 1, but " + i + " was specified").toString());
}
@Override // kotlinx.coroutines.channels.BufferedChannel
public boolean isConflatedDropOldest() {
return this.onBufferOverflow == BufferOverflow.DROP_OLDEST;
}
public static /* synthetic */ Object send$suspendImpl(ConflatedBufferedChannel conflatedBufferedChannel, Object obj, Continuation continuation) {
UndeliveredElementException callUndeliveredElementCatchingException$default;
Object m4142trySendImplMj0NB7M = conflatedBufferedChannel.m4142trySendImplMj0NB7M(obj, true);
if (m4142trySendImplMj0NB7M instanceof ChannelResult.Closed) {
ChannelResult.m4130exceptionOrNullimpl(m4142trySendImplMj0NB7M);
Function1 function1 = conflatedBufferedChannel.onUndeliveredElement;
if (function1 != null && (callUndeliveredElementCatchingException$default = OnUndeliveredElementKt.callUndeliveredElementCatchingException$default(function1, obj, null, 2, null)) != null) {
ExceptionsKt__ExceptionsKt.addSuppressed(callUndeliveredElementCatchingException$default, conflatedBufferedChannel.getSendException());
throw callUndeliveredElementCatchingException$default;
}
throw conflatedBufferedChannel.getSendException();
}
return Unit.INSTANCE;
}
@Override // kotlinx.coroutines.channels.BufferedChannel, kotlinx.coroutines.channels.SendChannel
/* renamed from: trySend-JP2dKIU */
public Object mo4126trySendJP2dKIU(Object obj) {
return m4142trySendImplMj0NB7M(obj, false);
}
/* renamed from: trySendImpl-Mj0NB7M, reason: not valid java name */
public final Object m4142trySendImplMj0NB7M(Object obj, boolean z) {
return this.onBufferOverflow == BufferOverflow.DROP_LATEST ? m4140trySendDropLatestMj0NB7M(obj, z) : m4141trySendDropOldestJP2dKIU(obj);
}
/* renamed from: trySendDropLatest-Mj0NB7M, reason: not valid java name */
public final Object m4140trySendDropLatestMj0NB7M(Object obj, boolean z) {
Function1 function1;
UndeliveredElementException callUndeliveredElementCatchingException$default;
Object mo4126trySendJP2dKIU = super.mo4126trySendJP2dKIU(obj);
if (ChannelResult.m4134isSuccessimpl(mo4126trySendJP2dKIU) || ChannelResult.m4133isClosedimpl(mo4126trySendJP2dKIU)) {
return mo4126trySendJP2dKIU;
}
if (z && (function1 = this.onUndeliveredElement) != null && (callUndeliveredElementCatchingException$default = OnUndeliveredElementKt.callUndeliveredElementCatchingException$default(function1, obj, null, 2, null)) != null) {
throw callUndeliveredElementCatchingException$default;
}
return ChannelResult.Companion.m4139successJP2dKIU(Unit.INSTANCE);
}
/* renamed from: trySendDropOldest-JP2dKIU, reason: not valid java name */
public final Object m4141trySendDropOldestJP2dKIU(Object obj) {
ChannelSegment channelSegment;
Object obj2 = BufferedChannelKt.BUFFERED;
ChannelSegment channelSegment2 = (ChannelSegment) BufferedChannel.sendSegment$FU.get(this);
while (true) {
long andIncrement = BufferedChannel.sendersAndCloseStatus$FU.getAndIncrement(this);
long j = andIncrement & 1152921504606846975L;
boolean isClosedForSend0 = isClosedForSend0(andIncrement);
int i = BufferedChannelKt.SEGMENT_SIZE;
long j2 = j / i;
int i2 = (int) (j % i);
if (channelSegment2.id != j2) {
ChannelSegment findSegmentSend = findSegmentSend(j2, channelSegment2);
if (findSegmentSend != null) {
channelSegment = findSegmentSend;
} else if (isClosedForSend0) {
return ChannelResult.Companion.m4137closedJP2dKIU(getSendException());
}
} else {
channelSegment = channelSegment2;
}
int updateCellSend = updateCellSend(channelSegment, i2, obj, j, obj2, isClosedForSend0);
if (updateCellSend == 0) {
channelSegment.cleanPrev();
return ChannelResult.Companion.m4139successJP2dKIU(Unit.INSTANCE);
}
if (updateCellSend == 1) {
return ChannelResult.Companion.m4139successJP2dKIU(Unit.INSTANCE);
}
if (updateCellSend == 2) {
if (isClosedForSend0) {
channelSegment.onSlotCleaned();
return ChannelResult.Companion.m4137closedJP2dKIU(getSendException());
}
Waiter waiter = obj2 instanceof Waiter ? (Waiter) obj2 : null;
if (waiter != null) {
prepareSenderForSuspension(waiter, channelSegment, i2);
}
dropFirstElementUntilTheSpecifiedCellIsInTheBuffer((channelSegment.id * i) + i2);
return ChannelResult.Companion.m4139successJP2dKIU(Unit.INSTANCE);
}
if (updateCellSend == 3) {
throw new IllegalStateException("unexpected".toString());
}
if (updateCellSend == 4) {
if (j < getReceiversCounter$kotlinx_coroutines_core()) {
channelSegment.cleanPrev();
}
return ChannelResult.Companion.m4137closedJP2dKIU(getSendException());
}
if (updateCellSend == 5) {
channelSegment.cleanPrev();
}
channelSegment2 = channelSegment;
}
}
}

View File

@@ -0,0 +1,23 @@
package kotlinx.coroutines.channels;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
/* loaded from: classes5.dex */
public final class ProduceKt$awaitClose$1 extends ContinuationImpl {
public Object L$0;
public Object L$1;
public int label;
public /* synthetic */ Object result;
public ProduceKt$awaitClose$1(Continuation continuation) {
super(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return ProduceKt.awaitClose(null, null, this);
}
}

View File

@@ -0,0 +1,128 @@
package kotlinx.coroutines.channels;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.EmptyCoroutineContext;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineContextKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineStart;
/* loaded from: classes5.dex */
public abstract class ProduceKt {
/* JADX WARN: Removed duplicated region for block: B:17:0x003c */
/* JADX WARN: Removed duplicated region for block: B:9:0x0023 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static final java.lang.Object awaitClose(kotlinx.coroutines.channels.ProducerScope r4, kotlin.jvm.functions.Function0 r5, kotlin.coroutines.Continuation r6) {
/*
boolean r0 = r6 instanceof kotlinx.coroutines.channels.ProduceKt$awaitClose$1
if (r0 == 0) goto L13
r0 = r6
kotlinx.coroutines.channels.ProduceKt$awaitClose$1 r0 = (kotlinx.coroutines.channels.ProduceKt$awaitClose$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
kotlinx.coroutines.channels.ProduceKt$awaitClose$1 r0 = new kotlinx.coroutines.channels.ProduceKt$awaitClose$1
r0.<init>(r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L3c
if (r2 != r3) goto L34
java.lang.Object r4 = r0.L$1
r5 = r4
kotlin.jvm.functions.Function0 r5 = (kotlin.jvm.functions.Function0) r5
java.lang.Object r4 = r0.L$0
kotlinx.coroutines.channels.ProducerScope r4 = (kotlinx.coroutines.channels.ProducerScope) r4
kotlin.ResultKt.throwOnFailure(r6) // Catch: java.lang.Throwable -> L32
goto L75
L32:
r4 = move-exception
goto L7b
L34:
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
r4.<init>(r5)
throw r4
L3c:
kotlin.ResultKt.throwOnFailure(r6)
kotlin.coroutines.CoroutineContext r6 = r0.getContext()
kotlinx.coroutines.Job$Key r2 = kotlinx.coroutines.Job.Key
kotlin.coroutines.CoroutineContext$Element r6 = r6.get(r2)
if (r6 != r4) goto L7f
r0.L$0 = r4 // Catch: java.lang.Throwable -> L32
r0.L$1 = r5 // Catch: java.lang.Throwable -> L32
r0.label = r3 // Catch: java.lang.Throwable -> L32
kotlinx.coroutines.CancellableContinuationImpl r6 = new kotlinx.coroutines.CancellableContinuationImpl // Catch: java.lang.Throwable -> L32
kotlin.coroutines.Continuation r2 = kotlin.coroutines.intrinsics.IntrinsicsKt.intercepted(r0) // Catch: java.lang.Throwable -> L32
r6.<init>(r2, r3) // Catch: java.lang.Throwable -> L32
r6.initCancellability() // Catch: java.lang.Throwable -> L32
kotlinx.coroutines.channels.ProduceKt$awaitClose$4$1 r2 = new kotlinx.coroutines.channels.ProduceKt$awaitClose$4$1 // Catch: java.lang.Throwable -> L32
r2.<init>() // Catch: java.lang.Throwable -> L32
r4.invokeOnClose(r2) // Catch: java.lang.Throwable -> L32
java.lang.Object r4 = r6.getResult() // Catch: java.lang.Throwable -> L32
java.lang.Object r6 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED() // Catch: java.lang.Throwable -> L32
if (r4 != r6) goto L72
kotlin.coroutines.jvm.internal.DebugProbesKt.probeCoroutineSuspended(r0) // Catch: java.lang.Throwable -> L32
L72:
if (r4 != r1) goto L75
return r1
L75:
r5.invoke()
kotlin.Unit r4 = kotlin.Unit.INSTANCE
return r4
L7b:
r5.invoke()
throw r4
L7f:
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
java.lang.String r5 = "awaitClose() can only be invoked from the producer context"
java.lang.String r5 = r5.toString()
r4.<init>(r5)
throw r4
*/
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ProduceKt.awaitClose(kotlinx.coroutines.channels.ProducerScope, kotlin.jvm.functions.Function0, kotlin.coroutines.Continuation):java.lang.Object");
}
public static /* synthetic */ ReceiveChannel produce$default(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, BufferOverflow bufferOverflow, CoroutineStart coroutineStart, Function1 function1, Function2 function2, int i2, Object obj) {
if ((i2 & 1) != 0) {
coroutineContext = EmptyCoroutineContext.INSTANCE;
}
CoroutineContext coroutineContext2 = coroutineContext;
if ((i2 & 2) != 0) {
i = 0;
}
int i3 = i;
if ((i2 & 4) != 0) {
bufferOverflow = BufferOverflow.SUSPEND;
}
BufferOverflow bufferOverflow2 = bufferOverflow;
if ((i2 & 8) != 0) {
coroutineStart = CoroutineStart.DEFAULT;
}
CoroutineStart coroutineStart2 = coroutineStart;
if ((i2 & 16) != 0) {
function1 = null;
}
return produce(coroutineScope, coroutineContext2, i3, bufferOverflow2, coroutineStart2, function1, function2);
}
public static final ReceiveChannel produce(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, BufferOverflow bufferOverflow, CoroutineStart coroutineStart, Function1 function1, Function2 function2) {
ProducerCoroutine producerCoroutine = new ProducerCoroutine(CoroutineContextKt.newCoroutineContext(coroutineScope, coroutineContext), ChannelKt.Channel$default(i, bufferOverflow, null, 4, null));
if (function1 != null) {
producerCoroutine.invokeOnCompletion(function1);
}
producerCoroutine.start(coroutineStart, producerCoroutine, function2);
return producerCoroutine;
}
}

View File

@@ -0,0 +1,36 @@
package kotlinx.coroutines.channels;
import kotlin.Unit;
import kotlin.coroutines.CoroutineContext;
import kotlinx.coroutines.CoroutineExceptionHandlerKt;
import kotlinx.coroutines.channels.SendChannel;
/* loaded from: classes5.dex */
public final class ProducerCoroutine extends ChannelCoroutine implements ProducerScope {
@Override // kotlinx.coroutines.channels.ProducerScope
public /* bridge */ /* synthetic */ SendChannel getChannel() {
return getChannel();
}
public ProducerCoroutine(CoroutineContext coroutineContext, Channel channel) {
super(coroutineContext, channel, true, true);
}
@Override // kotlinx.coroutines.AbstractCoroutine, kotlinx.coroutines.JobSupport, kotlinx.coroutines.Job
public boolean isActive() {
return super.isActive();
}
@Override // kotlinx.coroutines.AbstractCoroutine
public void onCompleted(Unit unit) {
SendChannel.DefaultImpls.close$default(get_channel(), null, 1, null);
}
@Override // kotlinx.coroutines.AbstractCoroutine
public void onCancelled(Throwable th, boolean z) {
if (get_channel().close(th) || z) {
return;
}
CoroutineExceptionHandlerKt.handleCoroutineException(getContext(), th);
}
}

View File

@@ -0,0 +1,8 @@
package kotlinx.coroutines.channels;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes5.dex */
public interface ProducerScope extends CoroutineScope, SendChannel {
SendChannel getChannel();
}

View File

@@ -0,0 +1,19 @@
package kotlinx.coroutines.channels;
import kotlinx.coroutines.CancellableContinuationImpl;
import kotlinx.coroutines.Waiter;
import kotlinx.coroutines.internal.Segment;
/* loaded from: classes5.dex */
public final class ReceiveCatching implements Waiter {
public final CancellableContinuationImpl cont;
@Override // kotlinx.coroutines.Waiter
public void invokeOnCancellation(Segment segment, int i) {
this.cont.invokeOnCancellation(segment, i);
}
public ReceiveCatching(CancellableContinuationImpl cancellableContinuationImpl) {
this.cont = cancellableContinuationImpl;
}
}

View File

@@ -0,0 +1,19 @@
package kotlinx.coroutines.channels;
import java.util.concurrent.CancellationException;
import kotlin.coroutines.Continuation;
/* loaded from: classes5.dex */
public interface ReceiveChannel {
void cancel(CancellationException cancellationException);
ChannelIterator iterator();
Object receive(Continuation continuation);
/* renamed from: receiveCatching-JP2dKIU */
Object mo4123receiveCatchingJP2dKIU(Continuation continuation);
/* renamed from: tryReceive-PtdJZtk */
Object mo4125tryReceivePtdJZtk();
}

View File

@@ -0,0 +1,30 @@
package kotlinx.coroutines.channels;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function1;
/* loaded from: classes5.dex */
public interface SendChannel {
boolean close(Throwable th);
void invokeOnClose(Function1 function1);
boolean isClosedForSend();
Object send(Object obj, Continuation continuation);
/* renamed from: trySend-JP2dKIU */
Object mo4126trySendJP2dKIU(Object obj);
public static final class DefaultImpls {
public static /* synthetic */ boolean close$default(SendChannel sendChannel, Throwable th, int i, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: close");
}
if ((i & 1) != 0) {
th = null;
}
return sendChannel.close(th);
}
}
}

View File

@@ -0,0 +1,16 @@
package kotlinx.coroutines.channels;
import kotlinx.coroutines.Waiter;
/* loaded from: classes5.dex */
public final class WaiterEB {
public final Waiter waiter;
public WaiterEB(Waiter waiter) {
this.waiter = waiter;
}
public String toString() {
return "WaiterEB(" + this.waiter + ')';
}
}