package androidx.compose.ui.text.input; import android.view.View; import android.view.inputmethod.ExtractedText; import androidx.compose.ui.platform.coreshims.SoftwareKeyboardControllerCompat; import kotlin.Lazy; import kotlin.LazyKt; import kotlin.LazyThreadSafetyMode; import kotlin.Metadata; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Intrinsics; /* compiled from: InputMethodManager.kt */ @Metadata(d1 = {"\u00006\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\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0000\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\b\u0010\r\u001a\u00020\u000eH\u0016J\b\u0010\u000f\u001a\u00020\u000eH\u0016J\b\u0010\u0010\u001a\u00020\u000eH\u0016J\u0018\u0010\u0011\u001a\u00020\u000e2\u0006\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u0015H\u0016J(\u0010\u0016\u001a\u00020\u000e2\u0006\u0010\u0017\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00132\u0006\u0010\u0019\u001a\u00020\u00132\u0006\u0010\u001a\u001a\u00020\u0013H\u0016R\u001b\u0010\u0005\u001a\u00020\u00068BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\t\u0010\n\u001a\u0004\b\u0007\u0010\bR\u000e\u0010\u000b\u001a\u00020\fX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u001b"}, d2 = {"Landroidx/compose/ui/text/input/InputMethodManagerImpl;", "Landroidx/compose/ui/text/input/InputMethodManager;", "view", "Landroid/view/View;", "(Landroid/view/View;)V", "imm", "Landroid/view/inputmethod/InputMethodManager;", "getImm", "()Landroid/view/inputmethod/InputMethodManager;", "imm$delegate", "Lkotlin/Lazy;", "softwareKeyboardControllerCompat", "Landroidx/compose/ui/platform/coreshims/SoftwareKeyboardControllerCompat;", "hideSoftInput", "", "restartInput", "showSoftInput", "updateExtractedText", "token", "", "extractedText", "Landroid/view/inputmethod/ExtractedText;", "updateSelection", "selectionStart", "selectionEnd", "compositionStart", "compositionEnd", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class InputMethodManagerImpl implements InputMethodManager { /* renamed from: imm$delegate, reason: from kotlin metadata */ private final Lazy imm; private final SoftwareKeyboardControllerCompat softwareKeyboardControllerCompat; private final View view; public InputMethodManagerImpl(View view) { Intrinsics.checkNotNullParameter(view, "view"); this.view = view; this.imm = LazyKt.lazy(LazyThreadSafetyMode.NONE, (Function0) new Function0() { // from class: androidx.compose.ui.text.input.InputMethodManagerImpl$imm$2 /* JADX INFO: Access modifiers changed from: package-private */ { super(0); } /* JADX WARN: Can't rename method to resolve collision */ @Override // kotlin.jvm.functions.Function0 public final android.view.inputmethod.InputMethodManager invoke() { View view2; view2 = InputMethodManagerImpl.this.view; Object systemService = view2.getContext().getSystemService("input_method"); Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager"); return (android.view.inputmethod.InputMethodManager) systemService; } }); 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 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 hideSoftInput() { this.softwareKeyboardControllerCompat.hide(); } @Override // androidx.compose.ui.text.input.InputMethodManager public void updateExtractedText(int token, ExtractedText extractedText) { Intrinsics.checkNotNullParameter(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); } }