alexandroid/decompiled/jadx/sources/androidx/compose/ui/text/input/InputMethodManagerImpl.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

92 lines
5.7 KiB
Java

package androidx.compose.ui.text.input;
import android.view.View;
import android.view.inputmethod.CursorAnchorInfo;
import android.view.inputmethod.ExtractedText;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.core.view.SoftwareKeyboardControllerCompat;
import com.amazon.alexa.client.alexaservice.voicechat.VoiceChatContract;
import kotlin.Deprecated;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import org.jetbrains.annotations.NotNull;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@StabilityInferred(parameters = 0)
@Deprecated(message = "Only exists to support the legacy TextInputService APIs. It is not used by any Compose code. A copy of this class in foundation is used by the legacy BasicTextField.")
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\b\u0001\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0004\b\u0004\u0010\u0005J\b\u0010\u000e\u001a\u00020\u000fH\u0016J\b\u0010\u0010\u001a\u00020\u0011H\u0016J\b\u0010\u0012\u001a\u00020\u0011H\u0016J\b\u0010\u0013\u001a\u00020\u0011H\u0016J\u0018\u0010\u0014\u001a\u00020\u00112\u0006\u0010\u0015\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u0018H\u0016J(\u0010\u0019\u001a\u00020\u00112\u0006\u0010\u001a\u001a\u00020\u00162\u0006\u0010\u001b\u001a\u00020\u00162\u0006\u0010\u001c\u001a\u00020\u00162\u0006\u0010\u001d\u001a\u00020\u0016H\u0016J\u0010\u0010\u001e\u001a\u00020\u00112\u0006\u0010\u001f\u001a\u00020 H\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u001b\u0010\u0006\u001a\u00020\u00078BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\n\u0010\u000b\u001a\u0004\b\b\u0010\tR\u000e\u0010\f\u001a\u00020\rX\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006!"}, d2 = {"Landroidx/compose/ui/text/input/InputMethodManagerImpl;", "Landroidx/compose/ui/text/input/InputMethodManager;", "view", "Landroid/view/View;", "<init>", "(Landroid/view/View;)V", "imm", "Landroid/view/inputmethod/InputMethodManager;", "getImm", "()Landroid/view/inputmethod/InputMethodManager;", "imm$delegate", "Lkotlin/Lazy;", "softwareKeyboardControllerCompat", "Landroidx/core/view/SoftwareKeyboardControllerCompat;", VoiceChatContract.COLUMN_IS_ACTIVE, "", "restartInput", "", "showSoftInput", "hideSoftInput", "updateExtractedText", "token", "", "extractedText", "Landroid/view/inputmethod/ExtractedText;", "updateSelection", "selectionStart", "selectionEnd", "compositionStart", "compositionEnd", "updateCursorAnchorInfo", "cursorAnchorInfo", "Landroid/view/inputmethod/CursorAnchorInfo;", "ui_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
/* loaded from: classes13.dex */
public final class InputMethodManagerImpl implements InputMethodManager {
public static final int $stable = 8;
/* renamed from: imm$delegate, reason: from kotlin metadata */
@NotNull
private final Lazy imm = LazyKt.lazy(LazyThreadSafetyMode.NONE, (Function0) new Function0<android.view.inputmethod.InputMethodManager>() { // from class: androidx.compose.ui.text.input.InputMethodManagerImpl$imm$2
{
super(0);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // kotlin.jvm.functions.Function0
public final android.view.inputmethod.InputMethodManager invoke() {
View view;
view = InputMethodManagerImpl.this.view;
Object systemService = view.getContext().getSystemService("input_method");
systemService.getClass();
return (android.view.inputmethod.InputMethodManager) systemService;
}
});
@NotNull
private final SoftwareKeyboardControllerCompat softwareKeyboardControllerCompat;
@NotNull
private final View view;
public InputMethodManagerImpl(@NotNull View view) {
this.view = view;
this.softwareKeyboardControllerCompat = new SoftwareKeyboardControllerCompat(view);
}
private final android.view.inputmethod.InputMethodManager getImm() {
return (android.view.inputmethod.InputMethodManager) this.imm.getValue();
}
@Override // androidx.compose.ui.text.input.InputMethodManager
public void hideSoftInput() {
this.softwareKeyboardControllerCompat.hide();
}
@Override // androidx.compose.ui.text.input.InputMethodManager
public boolean isActive() {
return getImm().isActive(this.view);
}
@Override // androidx.compose.ui.text.input.InputMethodManager
public void restartInput() {
getImm().restartInput(this.view);
}
@Override // androidx.compose.ui.text.input.InputMethodManager
public void showSoftInput() {
this.softwareKeyboardControllerCompat.show();
}
@Override // androidx.compose.ui.text.input.InputMethodManager
public void updateCursorAnchorInfo(@NotNull CursorAnchorInfo cursorAnchorInfo) {
getImm().updateCursorAnchorInfo(this.view, cursorAnchorInfo);
}
@Override // androidx.compose.ui.text.input.InputMethodManager
public void updateExtractedText(int token, @NotNull ExtractedText extractedText) {
getImm().updateExtractedText(this.view, token, extractedText);
}
@Override // androidx.compose.ui.text.input.InputMethodManager
public void updateSelection(int selectionStart, int selectionEnd, int compositionStart, int compositionEnd) {
getImm().updateSelection(this.view, selectionStart, selectionEnd, compositionStart, compositionEnd);
}
}