package w2;

import android.view.View;
import android.view.inputmethod.CursorAnchorInfo;
import android.view.inputmethod.ExtractedText;
import android.view.inputmethod.InputMethodManager;

/* loaded from: classes.dex */
public final class v implements u {

    /* renamed from: a, reason: collision with root package name */
    private final View f40849a;

    /* renamed from: b, reason: collision with root package name */
    private final rm.o f40850b;

    /* renamed from: c, reason: collision with root package name */
    private final androidx.core.view.n0 f40851c;

    /* loaded from: classes.dex */
    static final class a extends kotlin.jvm.internal.v implements dn.a {
        a() {
            super(0);
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final InputMethodManager invoke() {
            Object systemService = v.this.f40849a.getContext().getSystemService("input_method");
            kotlin.jvm.internal.t.e(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
            return (InputMethodManager) systemService;
        }
    }

    public v(View view) {
        rm.o b10;
        this.f40849a = view;
        b10 = rm.q.b(rm.s.NONE, new a());
        this.f40850b = b10;
        this.f40851c = new androidx.core.view.n0(view);
    }

    private final InputMethodManager i() {
        return (InputMethodManager) this.f40850b.getValue();
    }

    @Override // w2.u
    public void a() {
        this.f40851c.a();
    }

    @Override // w2.u
    public boolean b() {
        return i().isActive(this.f40849a);
    }

    @Override // w2.u
    public void c(int i10, ExtractedText extractedText) {
        i().updateExtractedText(this.f40849a, i10, extractedText);
    }

    @Override // w2.u
    public void d(int i10, int i11, int i12, int i13) {
        i().updateSelection(this.f40849a, i10, i11, i12, i13);
    }

    @Override // w2.u
    public void e() {
        i().restartInput(this.f40849a);
    }

    @Override // w2.u
    public void f(CursorAnchorInfo cursorAnchorInfo) {
        i().updateCursorAnchorInfo(this.f40849a, cursorAnchorInfo);
    }

    @Override // w2.u
    public void g() {
        this.f40851c.b();
    }
}
