package c.j.b;

import android.os.Bundle;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputConnectionWrapper;
import android.widget.TextView;
import c.j.a.i;

/* JADX INFO: compiled from: EmojiInputConnection.java */
/* JADX INFO: loaded from: classes.dex */
public final class c extends InputConnectionWrapper {
    public final TextView a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final a f1577b;

    /* JADX INFO: compiled from: EmojiInputConnection.java */
    public static class a {
        /* JADX WARN: Code restructure failed: missing block: B:34:0x004c, code lost:
        
            if (java.lang.Character.isHighSurrogate(r5) != false) goto L36;
         */
        /* JADX WARN: Code restructure failed: missing block: B:60:0x0089, code lost:
        
            if (java.lang.Character.isLowSurrogate(r5) != false) goto L62;
         */
        /* JADX WARN: Removed duplicated region for block: B:70:0x00a7 A[EDGE_INSN: B:95:0x00a7->B:70:0x00a7 BREAK  A[LOOP:2: B:51:0x0075->B:62:0x008c, LOOP_LABEL: LOOP:2: B:51:0x0075->B:62:0x008c], EDGE_INSN: B:98:0x00a7->B:70:0x00a7 BREAK  A[LOOP:2: B:51:0x0075->B:62:0x008c]] */
        /* JADX WARN: Removed duplicated region for block: B:72:0x00aa A[ADDED_TO_REGION] */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public boolean a(android.view.inputmethod.InputConnection r8, android.text.Editable r9, int r10, int r11, boolean r12) {
            /*
                Method dump skipped, instruction units count: 249
                To view this dump add '--comments-level debug' option
            */
            throw new UnsupportedOperationException("Method not decompiled: c.j.b.c.a.a(android.view.inputmethod.InputConnection, android.text.Editable, int, int, boolean):boolean");
        }
    }

    public c(TextView textView, InputConnection inputConnection, EditorInfo editorInfo) {
        a aVar = new a();
        super(inputConnection, false);
        this.a = textView;
        this.f1577b = aVar;
        if (i.c()) {
            i iVarA = i.a();
            if (!iVarA.d() || editorInfo == null) {
                return;
            }
            if (editorInfo.extras == null) {
                editorInfo.extras = new Bundle();
            }
            iVarA.f1524g.c(editorInfo);
        }
    }

    @Override // android.view.inputmethod.InputConnectionWrapper, android.view.inputmethod.InputConnection
    public boolean deleteSurroundingText(int i2, int i3) {
        return this.f1577b.a(this, this.a.getEditableText(), i2, i3, false) || super.deleteSurroundingText(i2, i3);
    }

    @Override // android.view.inputmethod.InputConnectionWrapper, android.view.inputmethod.InputConnection
    public boolean deleteSurroundingTextInCodePoints(int i2, int i3) {
        return this.f1577b.a(this, this.a.getEditableText(), i2, i3, true) || super.deleteSurroundingTextInCodePoints(i2, i3);
    }
}
