package v; import android.os.Build; import android.os.LocaleList; import java.util.Locale; /* loaded from: classes.dex */ public final class h { /* renamed from: b, reason: collision with root package name */ private static final h f14768b = a(new Locale[0]); /* renamed from: a, reason: collision with root package name */ private j f14769a; private h(j jVar) { this.f14769a = jVar; } public static h a(Locale... localeArr) { return Build.VERSION.SDK_INT >= 24 ? d(g.a(localeArr)) : new h(new i(localeArr)); } static Locale b(String str) { if (str.contains("-")) { String[] split = str.split("-", -1); if (split.length > 2) { return new Locale(split[0], split[1], split[2]); } if (split.length > 1) { return new Locale(split[0], split[1]); } if (split.length == 1) { return new Locale(split[0]); } } else { if (!str.contains("_")) { return new Locale(str); } String[] split2 = str.split("_", -1); if (split2.length > 2) { return new Locale(split2[0], split2[1], split2[2]); } if (split2.length > 1) { return new Locale(split2[0], split2[1]); } if (split2.length == 1) { return new Locale(split2[0]); } } throw new IllegalArgumentException("Can not parse language tag: [" + str + "]"); } public static h d(LocaleList localeList) { return new h(new o(localeList)); } public Locale c(int i10) { return this.f14769a.get(i10); } public boolean equals(Object obj) { return (obj instanceof h) && this.f14769a.equals(((h) obj).f14769a); } public int hashCode() { return this.f14769a.hashCode(); } public String toString() { return this.f14769a.toString(); } }