mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-18 11:57:18 +01:00
117 lines
7.1 KiB
Java
117 lines
7.1 KiB
Java
package androidx.compose.foundation.text;
|
|
|
|
import androidx.compose.runtime.internal.StabilityInferred;
|
|
import androidx.compose.ui.focus.FocusDirection;
|
|
import androidx.compose.ui.focus.FocusManager;
|
|
import androidx.compose.ui.platform.SoftwareKeyboardController;
|
|
import androidx.compose.ui.text.input.ImeAction;
|
|
import kotlin.Metadata;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@StabilityInferred(parameters = 0)
|
|
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0000\u0018\u00002\u00020\u0001B\u000f\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0004J\u001a\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u0014H\u0016ø\u0001\u0000¢\u0006\u0004\b\u0015\u0010\u0016J\u0018\u0010\u0017\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u0014ø\u0001\u0000¢\u0006\u0004\b\u0018\u0010\u0016R\u001a\u0010\u0005\u001a\u00020\u0006X\u0086.¢\u0006\u000e\n\u0000\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR\u001a\u0010\u000b\u001a\u00020\fX\u0086.¢\u0006\u000e\n\u0000\u001a\u0004\b\r\u0010\u000e\"\u0004\b\u000f\u0010\u0010R\u0010\u0010\u0002\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u0007\n\u0005\b¡\u001e0\u0001¨\u0006\u0019"}, d2 = {"Landroidx/compose/foundation/text/KeyboardActionRunner;", "Landroidx/compose/foundation/text/KeyboardActionScope;", "keyboardController", "Landroidx/compose/ui/platform/SoftwareKeyboardController;", "(Landroidx/compose/ui/platform/SoftwareKeyboardController;)V", "focusManager", "Landroidx/compose/ui/focus/FocusManager;", "getFocusManager", "()Landroidx/compose/ui/focus/FocusManager;", "setFocusManager", "(Landroidx/compose/ui/focus/FocusManager;)V", "keyboardActions", "Landroidx/compose/foundation/text/KeyboardActions;", "getKeyboardActions", "()Landroidx/compose/foundation/text/KeyboardActions;", "setKeyboardActions", "(Landroidx/compose/foundation/text/KeyboardActions;)V", "defaultKeyboardAction", "", "imeAction", "Landroidx/compose/ui/text/input/ImeAction;", "defaultKeyboardAction-KlQnJC8", "(I)V", "runAction", "runAction-KlQnJC8", "foundation_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
public final class KeyboardActionRunner implements KeyboardActionScope {
|
|
public static final int $stable = 8;
|
|
public FocusManager focusManager;
|
|
public KeyboardActions keyboardActions;
|
|
|
|
@Nullable
|
|
private final SoftwareKeyboardController keyboardController;
|
|
|
|
public KeyboardActionRunner(@Nullable SoftwareKeyboardController softwareKeyboardController) {
|
|
this.keyboardController = softwareKeyboardController;
|
|
}
|
|
|
|
@Override // androidx.compose.foundation.text.KeyboardActionScope
|
|
/* renamed from: defaultKeyboardAction-KlQnJC8, reason: not valid java name */
|
|
public void mo1182defaultKeyboardActionKlQnJC8(int imeAction) {
|
|
ImeAction.Companion companion = ImeAction.INSTANCE;
|
|
if (ImeAction.m6999equalsimpl0(imeAction, companion.m7015getNexteUduSuo())) {
|
|
getFocusManager().mo4293moveFocus3ESFkO8(FocusDirection.INSTANCE.m4287getNextdhqQ8s());
|
|
return;
|
|
}
|
|
if (ImeAction.m6999equalsimpl0(imeAction, companion.m7017getPreviouseUduSuo())) {
|
|
getFocusManager().mo4293moveFocus3ESFkO8(FocusDirection.INSTANCE.m4288getPreviousdhqQ8s());
|
|
return;
|
|
}
|
|
if (!ImeAction.m6999equalsimpl0(imeAction, companion.m7013getDoneeUduSuo())) {
|
|
if (ImeAction.m6999equalsimpl0(imeAction, companion.m7014getGoeUduSuo()) ? true : ImeAction.m6999equalsimpl0(imeAction, companion.m7018getSearcheUduSuo()) ? true : ImeAction.m6999equalsimpl0(imeAction, companion.m7019getSendeUduSuo()) ? true : ImeAction.m6999equalsimpl0(imeAction, companion.m7012getDefaulteUduSuo())) {
|
|
return;
|
|
}
|
|
ImeAction.m6999equalsimpl0(imeAction, companion.m7016getNoneeUduSuo());
|
|
} else {
|
|
SoftwareKeyboardController softwareKeyboardController = this.keyboardController;
|
|
if (softwareKeyboardController != null) {
|
|
softwareKeyboardController.hide();
|
|
}
|
|
}
|
|
}
|
|
|
|
@NotNull
|
|
public final FocusManager getFocusManager() {
|
|
FocusManager focusManager = this.focusManager;
|
|
if (focusManager != null) {
|
|
return focusManager;
|
|
}
|
|
Intrinsics.throwUninitializedPropertyAccessException("focusManager");
|
|
return null;
|
|
}
|
|
|
|
@NotNull
|
|
public final KeyboardActions getKeyboardActions() {
|
|
KeyboardActions keyboardActions = this.keyboardActions;
|
|
if (keyboardActions != null) {
|
|
return keyboardActions;
|
|
}
|
|
Intrinsics.throwUninitializedPropertyAccessException("keyboardActions");
|
|
return null;
|
|
}
|
|
|
|
/* renamed from: runAction-KlQnJC8, reason: not valid java name */
|
|
public final void m1183runActionKlQnJC8(int imeAction) {
|
|
Function1<KeyboardActionScope, Unit> function1;
|
|
ImeAction.Companion companion = ImeAction.INSTANCE;
|
|
Unit unit = null;
|
|
if (ImeAction.m6999equalsimpl0(imeAction, companion.m7013getDoneeUduSuo())) {
|
|
function1 = getKeyboardActions().getOnDone();
|
|
} else if (ImeAction.m6999equalsimpl0(imeAction, companion.m7014getGoeUduSuo())) {
|
|
function1 = getKeyboardActions().getOnGo();
|
|
} else if (ImeAction.m6999equalsimpl0(imeAction, companion.m7015getNexteUduSuo())) {
|
|
function1 = getKeyboardActions().getOnNext();
|
|
} else if (ImeAction.m6999equalsimpl0(imeAction, companion.m7017getPreviouseUduSuo())) {
|
|
function1 = getKeyboardActions().getOnPrevious();
|
|
} else if (ImeAction.m6999equalsimpl0(imeAction, companion.m7018getSearcheUduSuo())) {
|
|
function1 = getKeyboardActions().getOnSearch();
|
|
} else if (ImeAction.m6999equalsimpl0(imeAction, companion.m7019getSendeUduSuo())) {
|
|
function1 = getKeyboardActions().getOnSend();
|
|
} else {
|
|
if (!(ImeAction.m6999equalsimpl0(imeAction, companion.m7012getDefaulteUduSuo()) ? true : ImeAction.m6999equalsimpl0(imeAction, companion.m7016getNoneeUduSuo()))) {
|
|
Single$$ExternalSyntheticBUOutline0.m$2("invalid ImeAction");
|
|
return;
|
|
}
|
|
function1 = null;
|
|
}
|
|
if (function1 != null) {
|
|
function1.invoke(this);
|
|
unit = Unit.INSTANCE;
|
|
}
|
|
if (unit == null) {
|
|
mo1182defaultKeyboardActionKlQnJC8(imeAction);
|
|
}
|
|
}
|
|
|
|
public final void setFocusManager(@NotNull FocusManager focusManager) {
|
|
this.focusManager = focusManager;
|
|
}
|
|
|
|
public final void setKeyboardActions(@NotNull KeyboardActions keyboardActions) {
|
|
this.keyboardActions = keyboardActions;
|
|
}
|
|
}
|