mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-13 17:37:16 +01:00
138 lines
6.9 KiB
Java
138 lines
6.9 KiB
Java
package androidx.compose.runtime;
|
|
|
|
import androidx.compose.runtime.MonotonicFrameClock;
|
|
import androidx.compose.runtime.internal.StabilityInferred;
|
|
import com.amazon.alexa.ra.core.data.fragments.SmartFragmentContent;
|
|
import kotlin.Metadata;
|
|
import kotlin.coroutines.CoroutineContext;
|
|
import kotlin.jvm.functions.Function2;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@StabilityInferred(parameters = 0)
|
|
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0010\t\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0007\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010\u0002\u001a\u00020\u0001¢\u0006\u0004\b\u0003\u0010\u0004J\u0006\u0010\n\u001a\u00020\u000bJ\u0006\u0010\f\u001a\u00020\u000bJ7\u0010\r\u001a\u0002H\u000e\"\u0004\b\u0000\u0010\u000e2!\u0010\u000f\u001a\u001d\u0012\u0013\u0012\u00110\u0011¢\u0006\f\b\u0012\u0012\b\b\u0013\u0012\u0004\b\b(\u0014\u0012\u0004\u0012\u0002H\u000e0\u0010H\u0096@¢\u0006\u0002\u0010\u0015R\u000e\u0010\u0002\u001a\u00020\u0001X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0007\u001a\u00020\b8F¢\u0006\u0006\u001a\u0004\b\u0007\u0010\t¨\u0006\u0016"}, d2 = {"Landroidx/compose/runtime/PausableMonotonicFrameClock;", "Landroidx/compose/runtime/MonotonicFrameClock;", "frameClock", "<init>", "(Landroidx/compose/runtime/MonotonicFrameClock;)V", "latch", "Landroidx/compose/runtime/Latch;", "isPaused", "", "()Z", "pause", "", "resume", "withFrameNanos", "R", "onFrame", "Lkotlin/Function1;", "", "Lkotlin/ParameterName;", "name", "frameTimeNanos", "(Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", SmartFragmentContent.RUNTIME}, k = 1, mv = {2, 0, 0}, xi = 48)
|
|
/* loaded from: classes13.dex */
|
|
public final class PausableMonotonicFrameClock implements MonotonicFrameClock {
|
|
public static final int $stable = 8;
|
|
|
|
@NotNull
|
|
private final MonotonicFrameClock frameClock;
|
|
|
|
@NotNull
|
|
private final Latch latch = new Latch();
|
|
|
|
public PausableMonotonicFrameClock(@NotNull MonotonicFrameClock monotonicFrameClock) {
|
|
this.frameClock = monotonicFrameClock;
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
|
|
public <R> R fold(R r, @NotNull Function2<? super R, ? super CoroutineContext.Element, ? extends R> function2) {
|
|
return (R) MonotonicFrameClock.DefaultImpls.fold(this, r, function2);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
|
|
@Nullable
|
|
public <E extends CoroutineContext.Element> E get(@NotNull CoroutineContext.Key<E> key) {
|
|
return (E) MonotonicFrameClock.DefaultImpls.get(this, key);
|
|
}
|
|
|
|
public final boolean isPaused() {
|
|
return !this.latch.isOpen();
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
|
|
@NotNull
|
|
public CoroutineContext minusKey(@NotNull CoroutineContext.Key<?> key) {
|
|
return MonotonicFrameClock.DefaultImpls.minusKey(this, key);
|
|
}
|
|
|
|
public final void pause() {
|
|
this.latch.closeLatch();
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext
|
|
@NotNull
|
|
public CoroutineContext plus(@NotNull CoroutineContext coroutineContext) {
|
|
return MonotonicFrameClock.DefaultImpls.plus(this, coroutineContext);
|
|
}
|
|
|
|
public final void resume() {
|
|
this.latch.openLatch();
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:21:0x0048, code lost:
|
|
|
|
if (r7.await(r0) == r1) goto L22;
|
|
*/
|
|
/* JADX WARN: Removed duplicated region for block: B:18:0x0058 A[RETURN] */
|
|
/* JADX WARN: Removed duplicated region for block: B:19:0x0059 A[RETURN] */
|
|
/* JADX WARN: Removed duplicated region for block: B:20:0x003b */
|
|
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
|
|
@Override // androidx.compose.runtime.MonotonicFrameClock
|
|
@org.jetbrains.annotations.Nullable
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public <R> java.lang.Object withFrameNanos(@org.jetbrains.annotations.NotNull kotlin.jvm.functions.Function1<? super java.lang.Long, ? extends R> r6, @org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super R> r7) {
|
|
/*
|
|
r5 = this;
|
|
boolean r0 = r7 instanceof androidx.compose.runtime.PausableMonotonicFrameClock$withFrameNanos$1
|
|
if (r0 == 0) goto L13
|
|
r0 = r7
|
|
androidx.compose.runtime.PausableMonotonicFrameClock$withFrameNanos$1 r0 = (androidx.compose.runtime.PausableMonotonicFrameClock$withFrameNanos$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:
|
|
androidx.compose.runtime.PausableMonotonicFrameClock$withFrameNanos$1 r0 = new androidx.compose.runtime.PausableMonotonicFrameClock$withFrameNanos$1
|
|
r0.<init>(r5, r7)
|
|
L18:
|
|
java.lang.Object r7 = r0.result
|
|
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
|
int r2 = r0.label
|
|
r3 = 2
|
|
r4 = 1
|
|
if (r2 == 0) goto L3b
|
|
if (r2 == r4) goto L33
|
|
if (r2 != r3) goto L2c
|
|
kotlin.ResultKt.throwOnFailure(r7)
|
|
return r7
|
|
L2c:
|
|
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
|
|
rx.Single$$ExternalSyntheticBUOutline0.m$2(r5)
|
|
r5 = 0
|
|
return r5
|
|
L33:
|
|
java.lang.Object r6 = r0.L$0
|
|
kotlin.jvm.functions.Function1 r6 = (kotlin.jvm.functions.Function1) r6
|
|
kotlin.ResultKt.throwOnFailure(r7)
|
|
goto L4b
|
|
L3b:
|
|
kotlin.ResultKt.throwOnFailure(r7)
|
|
androidx.compose.runtime.Latch r7 = r5.latch
|
|
r0.L$0 = r6
|
|
r0.label = r4
|
|
java.lang.Object r7 = r7.await(r0)
|
|
if (r7 != r1) goto L4b
|
|
goto L58
|
|
L4b:
|
|
androidx.compose.runtime.MonotonicFrameClock r5 = r5.frameClock
|
|
r7 = 0
|
|
r0.L$0 = r7
|
|
r0.label = r3
|
|
java.lang.Object r5 = r5.withFrameNanos(r6, r0)
|
|
if (r5 != r1) goto L59
|
|
L58:
|
|
return r1
|
|
L59:
|
|
return r5
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.runtime.PausableMonotonicFrameClock.withFrameNanos(kotlin.jvm.functions.Function1, kotlin.coroutines.Continuation):java.lang.Object");
|
|
}
|
|
}
|