mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-16 10:57:17 +01:00
168 lines
10 KiB
Java
168 lines
10 KiB
Java
package androidx.paging;
|
|
|
|
import androidx.exifinterface.media.ExifInterface;
|
|
import kotlin.Metadata;
|
|
import kotlin.Pair;
|
|
import kotlin.Unit;
|
|
import kotlin.coroutines.Continuation;
|
|
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
|
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
|
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import kotlinx.coroutines.flow.Flow;
|
|
import kotlinx.coroutines.flow.FlowCollector;
|
|
import kotlinx.coroutines.flow.MutableStateFlow;
|
|
import kotlinx.coroutines.flow.StateFlowKt;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\b\u0000\u0018\u0000*\b\b\u0000\u0010\u0001*\u00020\u00022\u00020\u0002B\u0011\u0012\n\b\u0002\u0010\u0003\u001a\u0004\u0018\u00018\u0000¢\u0006\u0002\u0010\u0004J\u0013\u0010\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00028\u0000¢\u0006\u0002\u0010\u0004R\u0017\u0010\u0005\u001a\b\u0012\u0004\u0012\u00028\u00000\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\"\u0010\t\u001a\u0016\u0012\u0012\u0012\u0010\u0012\u0004\u0012\u00020\f\u0012\u0006\u0012\u0004\u0018\u00018\u00000\u000b0\nX\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0010"}, d2 = {"Landroidx/paging/ConflatedEventBus;", ExifInterface.GPS_DIRECTION_TRUE, "", "initialValue", "(Ljava/lang/Object;)V", "flow", "Lkotlinx/coroutines/flow/Flow;", "getFlow", "()Lkotlinx/coroutines/flow/Flow;", "state", "Lkotlinx/coroutines/flow/MutableStateFlow;", "Lkotlin/Pair;", "", "send", "", "data", "paging-common"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nConflatedEventBus.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ConflatedEventBus.kt\nandroidx/paging/ConflatedEventBus\n+ 2 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 3 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt\n+ 4 SafeCollector.common.kt\nkotlinx/coroutines/flow/internal/SafeCollector_commonKt\n*L\n1#1,35:1\n54#2:36\n57#2:40\n50#3:37\n55#3:39\n106#4:38\n*S KotlinDebug\n*F\n+ 1 ConflatedEventBus.kt\nandroidx/paging/ConflatedEventBus\n*L\n30#1:36\n30#1:40\n30#1:37\n30#1:39\n30#1:38\n*E\n"})
|
|
/* loaded from: classes14.dex */
|
|
public final class ConflatedEventBus<T> {
|
|
|
|
@NotNull
|
|
private final Flow<T> flow;
|
|
|
|
@NotNull
|
|
private final MutableStateFlow<Pair<Integer, T>> state;
|
|
|
|
public ConflatedEventBus(@Nullable T t) {
|
|
final MutableStateFlow<Pair<Integer, T>> MutableStateFlow = StateFlowKt.MutableStateFlow(new Pair(Integer.MIN_VALUE, t));
|
|
this.state = MutableStateFlow;
|
|
this.flow = new Flow<T>() { // from class: androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0007\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u00032\u0006\u0010\u0004\u001a\u0002H\u0002H\u008a@¢\u0006\u0004\b\u0005\u0010\u0006¨\u0006\b"}, d2 = {"<anonymous>", "", ExifInterface.GPS_DIRECTION_TRUE, "R", "value", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1", "kotlinx/coroutines/flow/FlowKt__TransformKt$mapNotNull$$inlined$unsafeTransform$1$2"}, k = 3, mv = {1, 8, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1\n+ 2 Transform.kt\nkotlinx/coroutines/flow/FlowKt__TransformKt\n+ 3 ConflatedEventBus.kt\nandroidx/paging/ConflatedEventBus\n*L\n1#1,222:1\n55#2:223\n56#2:225\n30#3:224\n*E\n"})
|
|
/* renamed from: androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1$2, reason: invalid class name */
|
|
public static final class AnonymousClass2<T> implements FlowCollector {
|
|
final /* synthetic */ FlowCollector $this_unsafeFlow;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
|
@DebugMetadata(c = "androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1$2", f = "ConflatedEventBus.kt", i = {}, l = {225}, m = "emit", n = {}, s = {})
|
|
@SourceDebugExtension({"SMAP\nEmitters.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Emitters.kt\nkotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1$emit$1\n*L\n1#1,222:1\n*E\n"})
|
|
/* renamed from: androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1$2$1, reason: invalid class name */
|
|
public static final class AnonymousClass1 extends ContinuationImpl {
|
|
Object L$0;
|
|
int label;
|
|
/* synthetic */ Object result;
|
|
|
|
public AnonymousClass1(Continuation continuation) {
|
|
super(continuation);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
@Nullable
|
|
public final Object invokeSuspend(@NotNull Object obj) {
|
|
this.result = obj;
|
|
this.label |= Integer.MIN_VALUE;
|
|
return AnonymousClass2.this.emit(null, this);
|
|
}
|
|
}
|
|
|
|
public AnonymousClass2(FlowCollector flowCollector) {
|
|
this.$this_unsafeFlow = flowCollector;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:15:0x0030 */
|
|
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
|
|
@Override // kotlinx.coroutines.flow.FlowCollector
|
|
@org.jetbrains.annotations.Nullable
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.lang.Object emit(java.lang.Object r5, @org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation r6) {
|
|
/*
|
|
r4 = this;
|
|
boolean r0 = r6 instanceof androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1.AnonymousClass2.AnonymousClass1
|
|
if (r0 == 0) goto L13
|
|
r0 = r6
|
|
androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1$2$1 r0 = (androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1.AnonymousClass2.AnonymousClass1) 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:
|
|
androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1$2$1 r0 = new androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1$2$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 L30
|
|
if (r2 != r3) goto L29
|
|
kotlin.ResultKt.throwOnFailure(r6)
|
|
goto L46
|
|
L29:
|
|
java.lang.String r4 = "call to 'resume' before 'invoke' with coroutine"
|
|
rx.Single$$ExternalSyntheticBUOutline0.m$2(r4)
|
|
r4 = 0
|
|
return r4
|
|
L30:
|
|
kotlin.ResultKt.throwOnFailure(r6)
|
|
kotlinx.coroutines.flow.FlowCollector r4 = r4.$this_unsafeFlow
|
|
kotlin.Pair r5 = (kotlin.Pair) r5
|
|
java.lang.Object r5 = r5.getSecond()
|
|
if (r5 == 0) goto L46
|
|
r0.label = r3
|
|
java.lang.Object r4 = r4.emit(r5, r0)
|
|
if (r4 != r1) goto L46
|
|
return r1
|
|
L46:
|
|
kotlin.Unit r4 = kotlin.Unit.INSTANCE
|
|
return r4
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: androidx.paging.ConflatedEventBus$special$$inlined$mapNotNull$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
|
|
}
|
|
}
|
|
|
|
@Override // kotlinx.coroutines.flow.Flow
|
|
@Nullable
|
|
public Object collect(@NotNull FlowCollector flowCollector, @NotNull Continuation continuation) {
|
|
Object collect = Flow.this.collect(new AnonymousClass2(flowCollector), continuation);
|
|
return collect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? collect : Unit.INSTANCE;
|
|
}
|
|
};
|
|
}
|
|
|
|
@NotNull
|
|
public final Flow<T> getFlow() {
|
|
return this.flow;
|
|
}
|
|
|
|
public final void send(@NotNull T data) {
|
|
data.getClass();
|
|
MutableStateFlow<Pair<Integer, T>> mutableStateFlow = this.state;
|
|
mutableStateFlow.setValue(new Pair<>(Integer.valueOf(mutableStateFlow.getValue().getFirst().intValue() + 1), data));
|
|
}
|
|
|
|
/* JADX WARN: Illegal instructions before constructor call */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public ConflatedEventBus() {
|
|
/*
|
|
r2 = this;
|
|
r0 = 0
|
|
r1 = 1
|
|
r2.<init>(r0, r1, r0)
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: androidx.paging.ConflatedEventBus.<init>():void");
|
|
}
|
|
|
|
public /* synthetic */ ConflatedEventBus(Object obj, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this((i & 1) != 0 ? null : obj);
|
|
}
|
|
}
|