NetMirror.apk
Download file
package A;
import android.text.InputFilter;
import android.text.Selection;
import android.text.Spannable;
import android.text.Spanned;
import android.widget.TextView;
import androidx.emoji2.text.f;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
/* JADX INFO: loaded from: classes.dex */
final class d implements InputFilter {
/* JADX INFO: renamed from: a, reason: collision with root package name */
private final TextView f10a;
/* JADX INFO: renamed from: b, reason: collision with root package name */
private f.AbstractC0072f f11b;
private static class a extends f.AbstractC0072f {
/* JADX INFO: renamed from: a, reason: collision with root package name */
private final Reference f12a;
/* JADX INFO: renamed from: b, reason: collision with root package name */
private final Reference f13b;
a(TextView textView, d dVar) {
this.f12a = new WeakReference(textView);
this.f13b = new WeakReference(dVar);
}
private boolean c(TextView textView, InputFilter inputFilter) {
InputFilter[] filters;
if (inputFilter == null || textView == null || (filters = textView.getFilters()) == null) {
return false;
}
for (InputFilter inputFilter2 : filters) {
if (inputFilter2 == inputFilter) {
return true;
}
}
return false;
}
@Override // androidx.emoji2.text.f.AbstractC0072f
public void b() {
CharSequence text;
CharSequence charSequenceP;
super.b();
TextView textView = (TextView) this.f12a.get();
if (c(textView, (InputFilter) this.f13b.get()) && textView.isAttachedToWindow() && text != (charSequenceP = androidx.emoji2.text.f.c().p((text = textView.getText())))) {
int selectionStart = Selection.getSelectionStart(charSequenceP);
int selectionEnd = Selection.getSelectionEnd(charSequenceP);
textView.setText(charSequenceP);
if (charSequenceP instanceof Spannable) {
d.b((Spannable) charSequenceP, selectionStart, selectionEnd);
}
}
}
}
d(TextView textView) {
this.f10a = textView;
}
private f.AbstractC0072f a() {
if (this.f11b == null) {
this.f11b = new a(this.f10a, this);
}
return this.f11b;
}
static void b(Spannable spannable, int i3, int i4) {
if (i3 >= 0 && i4 >= 0) {
Selection.setSelection(spannable, i3, i4);
} else if (i3 >= 0) {
Selection.setSelection(spannable, i3);
} else if (i4 >= 0) {
Selection.setSelection(spannable, i4);
}
}
@Override // android.text.InputFilter
public CharSequence filter(CharSequence charSequence, int i3, int i4, Spanned spanned, int i5, int i6) {
if (this.f10a.isInEditMode()) {
return charSequence;
}
int iE = androidx.emoji2.text.f.c().e();
if (iE != 0) {
if (iE == 1) {
if ((i6 == 0 && i5 == 0 && spanned.length() == 0 && charSequence == this.f10a.getText()) || charSequence == null) {
return charSequence;
}
if (i3 != 0 || i4 != charSequence.length()) {
charSequence = charSequence.subSequence(i3, i4);
}
return androidx.emoji2.text.f.c().q(charSequence, 0, charSequence.length());
}
if (iE != 3) {
return charSequence;
}
}
androidx.emoji2.text.f.c().t(a());
return charSequence;
}
}
⚠️ This content was hidden by an advertisement filtering extension in your browser. Please disable it and reload the page to access the decompiled content.
We only display one small text ad to keep this service free. Here's what it looks like:
Read the Docs for Business: You write the docs. We do the rest.
Try it today!Ad by EthicalAds
Download file