package o;

import android.content.Context;
import android.os.LocaleList;
import android.view.textclassifier.TextClassifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Locale;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.pX, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2149pX {
    public final InterfaceC2747vn a;
    public final Context b;
    public final EnumC2971y50 c;
    public final C2138pM d;
    public TextClassifier f;
    public final C2427sR e = C1884mi0.d();
    public final MV g = AbstractC0752ap.X(null);
    public final Object h = new Object();

    public C2149pX(InterfaceC2747vn interfaceC2747vn, Context context, EnumC2971y50 enumC2971y50, C2138pM c2138pM) {
        this.a = interfaceC2747vn;
        this.b = context;
        this.c = enumC2971y50;
        this.d = c2138pM;
    }

    /* JADX WARN: Finally extract failed */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0095  */
    /* JADX WARN: Removed duplicated region for block: B:7:0x001b  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final java.lang.Object a(o.C2149pX r16, java.lang.CharSequence r17, long r18, android.view.textclassifier.TextClassifier r20, o.AbstractC0298Lm r21) {
        /*
            Method dump skipped, instructions count: 242
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2149pX.a(o.pX, java.lang.CharSequence, long, android.view.textclassifier.TextClassifier, o.Lm):java.lang.Object");
    }

    public final LocaleList b() {
        C2138pM c2138pM = this.d;
        if (c2138pM == null) {
            return new LocaleList(((C2043oM) AbstractC0910cX.a.A().l.get(0)).a);
        }
        ArrayList arrayList = new ArrayList(AbstractC0034Bi.W(c2138pM, 10));
        Iterator it = c2138pM.l.iterator();
        while (it.hasNext()) {
            arrayList.add(((C2043oM) it.next()).a);
        }
        Locale[] localeArr = (Locale[]) arrayList.toArray(new Locale[0]);
        return new LocaleList((Locale[]) Arrays.copyOf(localeArr, localeArr.length));
    }
}
