Rabbit-R1/original r1/java/sources/androidx/compose/foundation/pager/ConsumeAllFlingOnDirection.java
2024-05-21 17:08:36 -04:00

59 lines
4.6 KiB
Java

package androidx.compose.foundation.pager;
import androidx.compose.foundation.gestures.Orientation;
import androidx.compose.ui.geometry.Offset;
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection;
import androidx.compose.ui.input.nestedscroll.NestedScrollSource;
import androidx.compose.ui.unit.Velocity;
import io.sentry.protocol.Device;
import io.sentry.protocol.TransactionInfo;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
/* JADX INFO: Access modifiers changed from: package-private */
/* compiled from: Pager.kt */
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J)\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\n\u001a\u00020\bH\u0096@ø\u0001\u0000ø\u0001\u0001ø\u0001\u0001¢\u0006\u0004\b\u000b\u0010\fJ-\u0010\r\u001a\u00020\u000e2\u0006\u0010\t\u001a\u00020\u000e2\u0006\u0010\n\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\u0010H\u0016ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0011\u0010\u0012J\u001f\u0010\u0013\u001a\u00020\u000e*\u00020\u000e2\u0006\u0010\u0002\u001a\u00020\u0003ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0014\u0010\u0015J\u001f\u0010\u0013\u001a\u00020\b*\u00020\b2\u0006\u0010\u0002\u001a\u00020\u0003ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0016\u0010\u0015R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006\u0082\u0002\u000b\n\u0005\\u001e0\u0001\n\u0002\b\u0019¨\u0006\u0017"}, d2 = {"Landroidx/compose/foundation/pager/ConsumeAllFlingOnDirection;", "Landroidx/compose/ui/input/nestedscroll/NestedScrollConnection;", Device.JsonKeys.ORIENTATION, "Landroidx/compose/foundation/gestures/Orientation;", "(Landroidx/compose/foundation/gestures/Orientation;)V", "getOrientation", "()Landroidx/compose/foundation/gestures/Orientation;", "onPostFling", "Landroidx/compose/ui/unit/Velocity;", "consumed", "available", "onPostFling-RZ2iAVY", "(JJLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "onPostScroll", "Landroidx/compose/ui/geometry/Offset;", TransactionInfo.JsonKeys.SOURCE, "Landroidx/compose/ui/input/nestedscroll/NestedScrollSource;", "onPostScroll-DzOQY0M", "(JJI)J", "consumeOnOrientation", "consumeOnOrientation-8S9VItk", "(JLandroidx/compose/foundation/gestures/Orientation;)J", "consumeOnOrientation-QWom1Mo", "foundation_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class ConsumeAllFlingOnDirection implements NestedScrollConnection {
private final Orientation orientation;
public final Orientation getOrientation() {
return this.orientation;
}
public ConsumeAllFlingOnDirection(Orientation orientation) {
Intrinsics.checkNotNullParameter(orientation, "orientation");
this.orientation = orientation;
}
/* renamed from: consumeOnOrientation-QWom1Mo, reason: not valid java name */
public final long m694consumeOnOrientationQWom1Mo(long j, Orientation orientation) {
Intrinsics.checkNotNullParameter(orientation, "orientation");
if (orientation == Orientation.Vertical) {
return Velocity.m5104copyOhffZ5M$default(j, 0.0f, 0.0f, 2, null);
}
return Velocity.m5104copyOhffZ5M$default(j, 0.0f, 0.0f, 1, null);
}
/* renamed from: consumeOnOrientation-8S9VItk, reason: not valid java name */
public final long m693consumeOnOrientation8S9VItk(long j, Orientation orientation) {
Intrinsics.checkNotNullParameter(orientation, "orientation");
if (orientation == Orientation.Vertical) {
return Offset.m2394copydBAh8RU$default(j, 0.0f, 0.0f, 2, null);
}
return Offset.m2394copydBAh8RU$default(j, 0.0f, 0.0f, 1, null);
}
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
/* renamed from: onPostScroll-DzOQY0M */
public long mo343onPostScrollDzOQY0M(long consumed, long available, int source) {
return NestedScrollSource.m3650equalsimpl0(source, NestedScrollSource.INSTANCE.m3656getFlingWNlRxjI()) ? m693consumeOnOrientation8S9VItk(available, this.orientation) : Offset.INSTANCE.m2416getZeroF1C5BW0();
}
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
/* renamed from: onPostFling-RZ2iAVY */
public Object mo342onPostFlingRZ2iAVY(long j, long j2, Continuation<? super Velocity> continuation) {
return Velocity.m5099boximpl(m694consumeOnOrientationQWom1Mo(j2, this.orientation));
}
}