Rabbit-R1/switch port/java/sources/androidx/compose/ui/focus/FocusRequester.java
2024-05-21 17:08:36 -04:00

198 lines
11 KiB
Java

package androidx.compose.ui.focus;
import androidx.compose.runtime.collection.MutableVector;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: FocusRequester.kt */
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\b\u0007\u0018\u0000 \u00132\u00020\u0001:\u0001\u0013B\u0005¢\u0006\u0002\u0010\u0002J\u0006\u0010\b\u001a\u00020\tJ\u001d\u0010\n\u001a\u00020\t2\u0012\u0010\u000b\u001a\u000e\u0012\u0004\u0012\u00020\r\u0012\u0004\u0012\u00020\t0\fH\u0083\bJ\r\u0010\u000e\u001a\u00020\tH\u0000¢\u0006\u0002\b\u000fJ\u0006\u0010\u0010\u001a\u00020\tJ\u0006\u0010\u0011\u001a\u00020\u0012R\u001a\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007¨\u0006\u0014"}, d2 = {"Landroidx/compose/ui/focus/FocusRequester;", "", "()V", "focusRequesterNodes", "Landroidx/compose/runtime/collection/MutableVector;", "Landroidx/compose/ui/focus/FocusRequesterModifierNode;", "getFocusRequesterNodes$ui_release", "()Landroidx/compose/runtime/collection/MutableVector;", "captureFocus", "", "findFocusTarget", "onFound", "Lkotlin/Function1;", "Landroidx/compose/ui/focus/FocusTargetNode;", "focus", "focus$ui_release", "freeFocus", "requestFocus", "", "Companion", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class FocusRequester {
public static final int $stable = 0;
private final MutableVector<FocusRequesterModifierNode> focusRequesterNodes = new MutableVector<>(new FocusRequesterModifierNode[16], 0);
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private static final FocusRequester Default = new FocusRequester();
private static final FocusRequester Cancel = new FocusRequester();
public final MutableVector<FocusRequesterModifierNode> getFocusRequesterNodes$ui_release() {
return this.focusRequesterNodes;
}
public final void requestFocus() {
focus$ui_release();
}
public final boolean captureFocus() {
if (!this.focusRequesterNodes.isNotEmpty()) {
throw new IllegalStateException("\n FocusRequester is not initialized. Here are some possible fixes:\n\n 1. Remember the FocusRequester: val focusRequester = remember { FocusRequester() }\n 2. Did you forget to add a Modifier.focusRequester() ?\n 3. Are you attempting to request focus during composition? Focus requests should be made in\n response to some event. Eg Modifier.clickable { focusRequester.requestFocus() }\n".toString());
}
MutableVector<FocusRequesterModifierNode> mutableVector = this.focusRequesterNodes;
int size = mutableVector.getSize();
if (size > 0) {
FocusRequesterModifierNode[] content = mutableVector.getContent();
int i = 0;
while (!FocusRequesterModifierNodeKt.captureFocus(content[i])) {
i++;
if (i >= size) {
}
}
return true;
}
return false;
}
public final boolean freeFocus() {
if (!this.focusRequesterNodes.isNotEmpty()) {
throw new IllegalStateException("\n FocusRequester is not initialized. Here are some possible fixes:\n\n 1. Remember the FocusRequester: val focusRequester = remember { FocusRequester() }\n 2. Did you forget to add a Modifier.focusRequester() ?\n 3. Are you attempting to request focus during composition? Focus requests should be made in\n response to some event. Eg Modifier.clickable { focusRequester.requestFocus() }\n".toString());
}
MutableVector<FocusRequesterModifierNode> mutableVector = this.focusRequesterNodes;
int size = mutableVector.getSize();
if (size > 0) {
FocusRequesterModifierNode[] content = mutableVector.getContent();
int i = 0;
while (!FocusRequesterModifierNodeKt.freeFocus(content[i])) {
i++;
if (i >= size) {
}
}
return true;
}
return false;
}
/* compiled from: FocusRequester.kt */
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001:\u0001\fB\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\b\u0010\n\u001a\u00020\u000bH\u0007R\u001c\u0010\u0003\u001a\u00020\u00048GX\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\u0005\u0010\u0002\u001a\u0004\b\u0006\u0010\u0007R\u0011\u0010\b\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\u0007¨\u0006\r"}, d2 = {"Landroidx/compose/ui/focus/FocusRequester$Companion;", "", "()V", "Cancel", "Landroidx/compose/ui/focus/FocusRequester;", "getCancel$annotations", "getCancel", "()Landroidx/compose/ui/focus/FocusRequester;", "Default", "getDefault", "createRefs", "Landroidx/compose/ui/focus/FocusRequester$Companion$FocusRequesterFactory;", "FocusRequesterFactory", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static /* synthetic */ void getCancel$annotations() {
}
private Companion() {
}
public final FocusRequester getDefault() {
return FocusRequester.Default;
}
public final FocusRequester getCancel() {
return FocusRequester.Cancel;
}
/* compiled from: FocusRequester.kt */
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0010\\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\t\u0010\u0003\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u0005\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u0006\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u0007\u001a\u00020\u0004H\u0086\u0002J\t\u0010\b\u001a\u00020\u0004H\u0086\u0002J\t\u0010\t\u001a\u00020\u0004H\u0086\u0002J\t\u0010\n\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u000b\u001a\u00020\u0004H\u0086\u0002J\t\u0010\f\u001a\u00020\u0004H\u0086\u0002J\t\u0010\r\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u000e\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u000f\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u0010\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u0011\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u0012\u001a\u00020\u0004H\u0086\u0002J\t\u0010\u0013\u001a\u00020\u0004H\u0086\u0002¨\u0006\u0014"}, d2 = {"Landroidx/compose/ui/focus/FocusRequester$Companion$FocusRequesterFactory;", "", "()V", "component1", "Landroidx/compose/ui/focus/FocusRequester;", "component10", "component11", "component12", "component13", "component14", "component15", "component16", "component2", "component3", "component4", "component5", "component6", "component7", "component8", "component9", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public static final class FocusRequesterFactory {
public static final int $stable = 0;
public static final FocusRequesterFactory INSTANCE = new FocusRequesterFactory();
private FocusRequesterFactory() {
}
public final FocusRequester component1() {
return new FocusRequester();
}
public final FocusRequester component2() {
return new FocusRequester();
}
public final FocusRequester component3() {
return new FocusRequester();
}
public final FocusRequester component4() {
return new FocusRequester();
}
public final FocusRequester component5() {
return new FocusRequester();
}
public final FocusRequester component6() {
return new FocusRequester();
}
public final FocusRequester component7() {
return new FocusRequester();
}
public final FocusRequester component8() {
return new FocusRequester();
}
public final FocusRequester component9() {
return new FocusRequester();
}
public final FocusRequester component10() {
return new FocusRequester();
}
public final FocusRequester component11() {
return new FocusRequester();
}
public final FocusRequester component12() {
return new FocusRequester();
}
public final FocusRequester component13() {
return new FocusRequester();
}
public final FocusRequester component14() {
return new FocusRequester();
}
public final FocusRequester component15() {
return new FocusRequester();
}
public final FocusRequester component16() {
return new FocusRequester();
}
}
public final FocusRequesterFactory createRefs() {
return FocusRequesterFactory.INSTANCE;
}
}
/* JADX WARN: Code restructure failed: missing block: B:77:0x005b, code lost:
continue;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private final boolean findFocusTarget(kotlin.jvm.functions.Function1<? super androidx.compose.ui.focus.FocusTargetNode, java.lang.Boolean> r15) {
/*
Method dump skipped, instructions count: 279
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.focus.FocusRequester.findFocusTarget(kotlin.jvm.functions.Function1):boolean");
}
/* JADX WARN: Code restructure failed: missing block: B:80:0x005b, code lost:
continue;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean focus$ui_release() {
/*
Method dump skipped, instructions count: 298
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.focus.FocusRequester.focus$ui_release():boolean");
}
}