package o; import android.text.Editable; import android.text.Selection; import android.view.KeyEvent; import java.util.Arrays; import o.C16349neT; import o.kem; /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.ayO, reason: case insensitive filesystem */ /* loaded from: classes.dex */ public final class C3480ayO { private C16349neT.RVV a; private final C16349neT.tOB b; private final boolean c; private final int[] d; private final kem e; /* JADX INFO: Access modifiers changed from: package-private */ public C3480ayO(kem kemVar, C16349neT.tOB tob, C16349neT.RVV rvv, boolean z, int[] iArr) { this.b = tob; this.e = kemVar; this.a = rvv; this.c = z; this.d = iArr; } /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: Code restructure failed: missing block: B:125:0x01c8, code lost: r0 = (o.OiU) r17; r0.c(); r0.e(); */ /* JADX WARN: Code restructure failed: missing block: B:72:0x0135, code lost: r7 = new o.zDK((android.text.Spannable) new android.text.SpannableString(r17)); */ /* JADX WARN: Removed duplicated region for block: B:52:0x0160 A[SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:59:0x011e A[SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final java.lang.CharSequence b(java.lang.CharSequence r17, int r18, int r19, int r20, boolean r21) { /* Method dump skipped, instructions count: 478 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: o.C3480ayO.b(java.lang.CharSequence, int, int, int, boolean):java.lang.CharSequence"); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.ayO$HBt */ /* loaded from: classes.dex */ public static final class HBt { int a; kem.LWm b; kem.LWm c; final kem.LWm d; int e; private final boolean f; private final int[] i; int j = 1; HBt(kem.LWm lWm, boolean z, int[] iArr) { this.d = lWm; this.c = lWm; this.f = z; this.i = iArr; } final boolean a() { if (this.c.d.a().d() || this.e == 65039) { return true; } if (this.f) { if (this.i == null) { return true; } if (Arrays.binarySearch(this.i, this.c.d.a().c(0)) < 0) { return true; } } return false; } } /* JADX INFO: Access modifiers changed from: package-private */ public static boolean xF_(Editable editable, KeyEvent keyEvent, boolean z) { ZBp[] zBpArr; if (!KeyEvent.metaStateHasNoModifiers(keyEvent.getMetaState())) { return false; } int selectionStart = Selection.getSelectionStart(editable); int selectionEnd = Selection.getSelectionEnd(editable); if (selectionStart != -1 && selectionEnd != -1 && selectionStart == selectionEnd && (zBpArr = (ZBp[]) editable.getSpans(selectionStart, selectionEnd, ZBp.class)) != null && zBpArr.length > 0) { for (ZBp zBp : zBpArr) { int spanStart = editable.getSpanStart(zBp); int spanEnd = editable.getSpanEnd(zBp); if ((z && spanStart == selectionStart) || ((!z && spanEnd == selectionStart) || (selectionStart > spanStart && selectionStart < spanEnd))) { editable.delete(spanStart, spanEnd); return true; } } } return false; } private boolean d(CharSequence charSequence, int i, int i2, C2650aic c2650aic) { if (c2650aic.c == 0) { c2650aic.c = this.a.a(charSequence, i, i2, c2650aic.a().c()) ? 2 : 1; } return c2650aic.c == 2; } }