alexandroid/decompiled/jadx/sources/androidx/compose/foundation/gestures/PressGestureScopeImpl.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

326 lines
16 KiB
Java

package androidx.compose.foundation.gestures;
import androidx.compose.runtime.Stable;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.compose.ui.geometry.Rect;
import androidx.compose.ui.unit.Density;
import androidx.compose.ui.unit.DpRect;
import kotlin.Metadata;
import kotlinx.coroutines.sync.Mutex;
import kotlinx.coroutines.sync.MutexKt;
import org.jetbrains.annotations.NotNull;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@StabilityInferred(parameters = 1)
@Metadata(d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0007\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\b\b\u0000\u0018\u00002\u00020\u00012\u00020\u0002B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0002\u0010\u0004J\u000e\u0010\u000f\u001a\u00020\u0010H\u0096@¢\u0006\u0002\u0010\u0011J\u0006\u0010\u0012\u001a\u00020\u0010J\u0006\u0010\u0013\u001a\u00020\u0010J\u000e\u0010\u0014\u001a\u00020\u0010H\u0086@¢\u0006\u0002\u0010\u0011J\u000e\u0010\u0015\u001a\u00020\u000bH\u0096@¢\u0006\u0002\u0010\u0011J\u0017\u0010\u0016\u001a\u00020\u0017*\u00020\u0018H\u0097\u0001ø\u0001\u0000¢\u0006\u0004\b\u0019\u0010\u001aJ\u0017\u0010\u0016\u001a\u00020\u0017*\u00020\u001bH\u0097\u0001ø\u0001\u0000¢\u0006\u0004\b\u001c\u0010\u001dJ\u0017\u0010\u001e\u001a\u00020\u0018*\u00020\u001bH\u0097\u0001ø\u0001\u0000¢\u0006\u0004\b\u001f\u0010 J\u001a\u0010\u001e\u001a\u00020\u0018*\u00020\u0005H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b!\u0010\"J\u001a\u0010\u001e\u001a\u00020\u0018*\u00020\u0017H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b!\u0010#J\u0017\u0010$\u001a\u00020%*\u00020&H\u0097\u0001ø\u0001\u0000¢\u0006\u0004\b'\u0010(J\u0017\u0010)\u001a\u00020\u0005*\u00020\u0018H\u0097\u0001ø\u0001\u0000¢\u0006\u0004\b*\u0010\"J\u0017\u0010)\u001a\u00020\u0005*\u00020\u001bH\u0097\u0001ø\u0001\u0000¢\u0006\u0004\b+\u0010 J\r\u0010,\u001a\u00020-*\u00020.H\u0097\u0001J\u0017\u0010/\u001a\u00020&*\u00020%H\u0097\u0001ø\u0001\u0000¢\u0006\u0004\b0\u0010(J\u0017\u00101\u001a\u00020\u001b*\u00020\u0018H\u0097\u0001ø\u0001\u0000¢\u0006\u0004\b2\u00103J\u001a\u00101\u001a\u00020\u001b*\u00020\u0005H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b4\u00103J\u001a\u00101\u001a\u00020\u001b*\u00020\u0017H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b4\u00105R\u0014\u0010\u0003\u001a\u00020\u00058\u0016X\u0097\u0005¢\u0006\u0006\u001a\u0004\b\u0006\u0010\u0007R\u0014\u0010\b\u001a\u00020\u00058\u0016X\u0097\u0005¢\u0006\u0006\u001a\u0004\b\t\u0010\u0007R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u000eX\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u00066"}, d2 = {"Landroidx/compose/foundation/gestures/PressGestureScopeImpl;", "Landroidx/compose/foundation/gestures/PressGestureScope;", "Landroidx/compose/ui/unit/Density;", "density", "(Landroidx/compose/ui/unit/Density;)V", "", "getDensity", "()F", "fontScale", "getFontScale", "isCanceled", "", "isReleased", "mutex", "Lkotlinx/coroutines/sync/Mutex;", "awaitRelease", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "cancel", "release", "reset", "tryAwaitRelease", "roundToPx", "", "Landroidx/compose/ui/unit/Dp;", "roundToPx-0680j_4", "(F)I", "Landroidx/compose/ui/unit/TextUnit;", "roundToPx--R2X_6o", "(J)I", "toDp", "toDp-GaN1DYA", "(J)F", "toDp-u2uoSUM", "(F)F", "(I)F", "toDpSize", "Landroidx/compose/ui/unit/DpSize;", "Landroidx/compose/ui/geometry/Size;", "toDpSize-k-rfVVM", "(J)J", "toPx", "toPx-0680j_4", "toPx--R2X_6o", "toRect", "Landroidx/compose/ui/geometry/Rect;", "Landroidx/compose/ui/unit/DpRect;", "toSize", "toSize-XkaWNTQ", "toSp", "toSp-0xMU5do", "(F)J", "toSp-kPz2Gy4", "(I)J", "foundation_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class PressGestureScopeImpl implements PressGestureScope, Density {
public static final int $stable = 0;
private final /* synthetic */ Density $$delegate_0;
private boolean isCanceled;
private boolean isReleased;
@NotNull
private final Mutex mutex = MutexKt.Mutex(false);
public PressGestureScopeImpl(@NotNull Density density) {
this.$$delegate_0 = density;
}
/* JADX WARN: Removed duplicated region for block: B:12:0x0045 */
/* JADX WARN: Removed duplicated region for block: B:15:0x0048 */
/* JADX WARN: Removed duplicated region for block: B:19:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // androidx.compose.foundation.gestures.PressGestureScope
@org.jetbrains.annotations.Nullable
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object awaitRelease(@org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super kotlin.Unit> r5) {
/*
r4 = this;
boolean r0 = r5 instanceof androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$1
if (r0 == 0) goto L13
r0 = r5
androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$1 r0 = (androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$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.foundation.gestures.PressGestureScopeImpl$awaitRelease$1 r0 = new androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$1
r0.<init>(r4, r5)
L18:
java.lang.Object r5 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r5)
goto L3d
L29:
java.lang.String r4 = "call to 'resume' before 'invoke' with coroutine"
rx.Single$$ExternalSyntheticBUOutline0.m$2(r4)
r4 = 0
return r4
L31:
kotlin.ResultKt.throwOnFailure(r5)
r0.label = r3
java.lang.Object r5 = r4.tryAwaitRelease(r0)
if (r5 != r1) goto L3d
return r1
L3d:
java.lang.Boolean r5 = (java.lang.Boolean) r5
boolean r4 = r5.booleanValue()
if (r4 == 0) goto L48
kotlin.Unit r4 = kotlin.Unit.INSTANCE
return r4
L48:
androidx.compose.foundation.gestures.GestureCancellationException r4 = new androidx.compose.foundation.gestures.GestureCancellationException
java.lang.String r5 = "The press gesture was canceled."
r4.<init>(r5)
throw r4
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.foundation.gestures.PressGestureScopeImpl.awaitRelease(kotlin.coroutines.Continuation):java.lang.Object");
}
public final void cancel() {
this.isCanceled = true;
Mutex.DefaultImpls.unlock$default(this.mutex, null, 1, null);
}
@Override // androidx.compose.ui.unit.Density
public float getDensity() {
return this.$$delegate_0.getDensity();
}
@Override // androidx.compose.ui.unit.FontScaling
public float getFontScale() {
return this.$$delegate_0.getFontScale();
}
public final void release() {
this.isReleased = true;
Mutex.DefaultImpls.unlock$default(this.mutex, null, 1, null);
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0035 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@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 reset(@org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super kotlin.Unit> r5) {
/*
r4 = this;
boolean r0 = r5 instanceof androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$1
if (r0 == 0) goto L13
r0 = r5
androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$1 r0 = (androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$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.foundation.gestures.PressGestureScopeImpl$reset$1 r0 = new androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$1
r0.<init>(r4, r5)
L18:
java.lang.Object r5 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L35
if (r2 != r3) goto L2d
java.lang.Object r4 = r0.L$0
androidx.compose.foundation.gestures.PressGestureScopeImpl r4 = (androidx.compose.foundation.gestures.PressGestureScopeImpl) r4
kotlin.ResultKt.throwOnFailure(r5)
goto L46
L2d:
java.lang.String r4 = "call to 'resume' before 'invoke' with coroutine"
rx.Single$$ExternalSyntheticBUOutline0.m$2(r4)
r4 = 0
return r4
L35:
kotlin.ResultKt.throwOnFailure(r5)
kotlinx.coroutines.sync.Mutex r5 = r4.mutex
r0.L$0 = r4
r0.label = r3
r2 = 0
java.lang.Object r5 = kotlinx.coroutines.sync.Mutex.DefaultImpls.lock$default(r5, r2, r0, r3, r2)
if (r5 != r1) goto L46
return r1
L46:
r5 = 0
r4.isReleased = r5
r4.isCanceled = r5
kotlin.Unit r4 = kotlin.Unit.INSTANCE
return r4
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.foundation.gestures.PressGestureScopeImpl.reset(kotlin.coroutines.Continuation):java.lang.Object");
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: roundToPx--R2X_6o */
public int mo550roundToPxR2X_6o(long j) {
return this.$$delegate_0.mo550roundToPxR2X_6o(j);
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: roundToPx-0680j_4 */
public int mo551roundToPx0680j_4(float f) {
return this.$$delegate_0.mo551roundToPx0680j_4(f);
}
@Override // androidx.compose.ui.unit.FontScaling
@Stable
/* renamed from: toDp-GaN1DYA */
public float mo552toDpGaN1DYA(long j) {
return this.$$delegate_0.mo552toDpGaN1DYA(j);
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: toDp-u2uoSUM */
public float mo553toDpu2uoSUM(float f) {
return this.$$delegate_0.mo553toDpu2uoSUM(f);
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: toDpSize-k-rfVVM */
public long mo555toDpSizekrfVVM(long j) {
return this.$$delegate_0.mo555toDpSizekrfVVM(j);
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: toPx--R2X_6o */
public float mo556toPxR2X_6o(long j) {
return this.$$delegate_0.mo556toPxR2X_6o(j);
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: toPx-0680j_4 */
public float mo557toPx0680j_4(float f) {
return this.$$delegate_0.mo557toPx0680j_4(f);
}
@Override // androidx.compose.ui.unit.Density
@Stable
@NotNull
public Rect toRect(@NotNull DpRect dpRect) {
return this.$$delegate_0.toRect(dpRect);
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: toSize-XkaWNTQ */
public long mo558toSizeXkaWNTQ(long j) {
return this.$$delegate_0.mo558toSizeXkaWNTQ(j);
}
@Override // androidx.compose.ui.unit.FontScaling
@Stable
/* renamed from: toSp-0xMU5do */
public long mo559toSp0xMU5do(float f) {
return this.$$delegate_0.mo559toSp0xMU5do(f);
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: toSp-kPz2Gy4 */
public long mo560toSpkPz2Gy4(float f) {
return this.$$delegate_0.mo560toSpkPz2Gy4(f);
}
/* JADX WARN: Removed duplicated region for block: B:16:0x0036 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
@Override // androidx.compose.foundation.gestures.PressGestureScope
@org.jetbrains.annotations.Nullable
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object tryAwaitRelease(@org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super java.lang.Boolean> r6) {
/*
r5 = this;
boolean r0 = r6 instanceof androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1
if (r0 == 0) goto L13
r0 = r6
androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1 r0 = (androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$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.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1 r0 = new androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1
r0.<init>(r5, r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 0
r4 = 1
if (r2 == 0) goto L36
if (r2 != r4) goto L2e
java.lang.Object r5 = r0.L$0
androidx.compose.foundation.gestures.PressGestureScopeImpl r5 = (androidx.compose.foundation.gestures.PressGestureScopeImpl) r5
kotlin.ResultKt.throwOnFailure(r6)
goto L4e
L2e:
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
rx.Single$$ExternalSyntheticBUOutline0.m$2(r5)
r5 = 0
return r5
L36:
kotlin.ResultKt.throwOnFailure(r6)
boolean r6 = r5.isReleased
if (r6 != 0) goto L53
boolean r6 = r5.isCanceled
if (r6 != 0) goto L53
kotlinx.coroutines.sync.Mutex r6 = r5.mutex
r0.L$0 = r5
r0.label = r4
java.lang.Object r6 = kotlinx.coroutines.sync.Mutex.DefaultImpls.lock$default(r6, r3, r0, r4, r3)
if (r6 != r1) goto L4e
return r1
L4e:
kotlinx.coroutines.sync.Mutex r6 = r5.mutex
kotlinx.coroutines.sync.Mutex.DefaultImpls.unlock$default(r6, r3, r4, r3)
L53:
boolean r5 = r5.isReleased
java.lang.Boolean r5 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5)
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.foundation.gestures.PressGestureScopeImpl.tryAwaitRelease(kotlin.coroutines.Continuation):java.lang.Object");
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: toDp-u2uoSUM */
public float mo554toDpu2uoSUM(int i) {
return this.$$delegate_0.mo554toDpu2uoSUM(i);
}
@Override // androidx.compose.ui.unit.Density
@Stable
/* renamed from: toSp-kPz2Gy4 */
public long mo561toSpkPz2Gy4(int i) {
return this.$$delegate_0.mo561toSpkPz2Gy4(i);
}
}