package com.applovin.impl; import android.media.MediaCodecInfo; import android.media.MediaCodecList; import android.text.TextUtils; import android.util.Pair; import com.applovin.exoplayer2.common.base.Ascii; import com.applovin.impl.nd; import com.fyber.inneractive.sdk.bidder.TokenParametersOuterClass$TokenParameters; import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /* loaded from: classes.dex */ public abstract class nd { private static final Pattern a = Pattern.compile("^\\D?(\\d+)$"); private static final HashMap b = new HashMap(); private static int c = -1; public interface d { int a(); MediaCodecInfo a(int i); boolean a(String str, String str2, MediaCodecInfo.CodecCapabilities codecCapabilities); boolean b(); boolean b(String str, String str2, MediaCodecInfo.CodecCapabilities codecCapabilities); } public static final class e implements d { private e() { } @Override // com.applovin.impl.nd.d public boolean a(String str, String str2, MediaCodecInfo.CodecCapabilities codecCapabilities) { return false; } @Override // com.applovin.impl.nd.d public boolean b() { return false; } @Override // com.applovin.impl.nd.d public boolean b(String str, String str2, MediaCodecInfo.CodecCapabilities codecCapabilities) { return "secure-playback".equals(str) && "video/avc".equals(str2); } @Override // com.applovin.impl.nd.d public MediaCodecInfo a(int i) { return MediaCodecList.getCodecInfoAt(i); } @Override // com.applovin.impl.nd.d public int a() { return MediaCodecList.getCodecCount(); } } public interface g { int a(Object obj); } private static int a(int i) { switch (i) { case 0: return 1; case 1: return 2; case 2: return 4; case 3: return 8; case 4: return 16; case 5: return 32; case 6: return 64; case 7: return 128; case 8: return 256; case 9: return 512; case 10: return 1024; case 11: return 2048; case 12: return 4096; case 13: return 8192; case 14: return 16384; case 15: return 32768; case 16: return 65536; case 17: return 131072; case 18: return 262144; case 19: return 524288; case 20: return 1048576; case 21: return 2097152; case 22: return 4194304; case 23: return 8388608; default: return -1; } } private static int b(int i) { switch (i) { case 10: return 1; case 11: return 4; case 12: return 8; case 13: return 16; default: switch (i) { case 20: return 32; case 21: return 64; case 22: return 128; default: switch (i) { case 30: return 256; case 31: return 512; case 32: return 1024; default: switch (i) { case 40: return 2048; case 41: return 4096; case 42: return 8192; default: switch (i) { case 50: return 16384; case 51: return 32768; case 52: return 65536; default: return -1; } } } } } } private static int c(int i) { if (i == 1 || i == 2) { return 25344; } switch (i) { case 8: case 16: case 32: return 101376; case 64: return 202752; case 128: case 256: return 414720; case 512: return 921600; case 1024: return 1310720; case 2048: case 4096: return 2097152; case 8192: return 2228224; case 16384: return 5652480; case 32768: case 65536: return 9437184; case 131072: case 262144: case 524288: return 35651584; default: return -1; } } private static int d(int i) { if (i == 66) { return 1; } if (i == 77) { return 2; } if (i == 88) { return 4; } if (i == 100) { return 8; } if (i == 110) { return 16; } if (i != 122) { return i != 244 ? -1 : 64; } return 32; } private static int e(int i) { int i2 = 17; if (i != 17) { i2 = 20; if (i != 20) { i2 = 23; if (i != 23) { i2 = 29; if (i != 29) { i2 = 39; if (i != 39) { i2 = 42; if (i != 42) { switch (i) { case 1: return 1; case 2: return 2; case 3: return 3; case 4: return 4; case 5: return 5; case 6: return 6; default: return -1; } } } } } } } return i2; } private static int f(int i) { if (i == 10) { return 1; } if (i == 11) { return 2; } if (i == 20) { return 4; } if (i == 21) { return 8; } if (i == 30) { return 16; } if (i == 31) { return 32; } if (i == 40) { return 64; } if (i == 41) { return 128; } if (i == 50) { return 256; } if (i == 51) { return 512; } switch (i) { case 60: return 2048; case TokenParametersOuterClass$TokenParameters.PRIORCLICKTYPES_FIELD_NUMBER /* 61 */: return 4096; case 62: return 8192; default: return -1; } } private static int g(int i) { if (i == 0) { return 1; } if (i == 1) { return 2; } if (i != 2) { return i != 3 ? -1 : 8; } return 4; } private static boolean g(MediaCodecInfo mediaCodecInfo) { if (xp.a >= 29) { return h(mediaCodecInfo); } String lowerCase = Ascii.toLowerCase(mediaCodecInfo.getName()); return (lowerCase.startsWith("omx.google.") || lowerCase.startsWith("c2.android.") || lowerCase.startsWith("c2.google.")) ? false : true; } public static class c extends Exception { private c(Throwable th) { super("Failed to query underlying media codecs", th); } } private static boolean f(MediaCodecInfo mediaCodecInfo) { boolean isSoftwareOnly; isSoftwareOnly = mediaCodecInfo.isSoftwareOnly(); return isSoftwareOnly; } private static boolean h(MediaCodecInfo mediaCodecInfo) { boolean isVendor; isVendor = mediaCodecInfo.isVendor(); return isVendor; } private static Pair c(String str, String[] strArr) { if (strArr.length < 3) { pc.d("MediaCodecUtil", "Ignoring malformed Dolby Vision codec string: " + str); return null; } Matcher matcher = a.matcher(strArr[1]); if (!matcher.matches()) { pc.d("MediaCodecUtil", "Ignoring malformed Dolby Vision codec string: " + str); return null; } String group = matcher.group(1); Integer b2 = b(group); if (b2 == null) { pc.d("MediaCodecUtil", "Unknown Dolby Vision profile string: " + group); return null; } String str2 = strArr[2]; Integer a2 = a(str2); if (a2 == null) { pc.d("MediaCodecUtil", "Unknown Dolby Vision level string: " + str2); return null; } return new Pair(b2, a2); } private static Pair d(String str, String[] strArr) { if (strArr.length < 4) { pc.d("MediaCodecUtil", "Ignoring malformed HEVC codec string: " + str); return null; } int i = 1; Matcher matcher = a.matcher(strArr[1]); if (!matcher.matches()) { pc.d("MediaCodecUtil", "Ignoring malformed HEVC codec string: " + str); return null; } String group = matcher.group(1); if (!"1".equals(group)) { if (!"2".equals(group)) { pc.d("MediaCodecUtil", "Unknown HEVC profile string: " + group); return null; } i = 2; } String str2 = strArr[3]; Integer c2 = c(str2); if (c2 == null) { pc.d("MediaCodecUtil", "Unknown HEVC level string: " + str2); return null; } return new Pair(Integer.valueOf(i), c2); } private static Pair e(String str, String[] strArr) { if (strArr.length < 3) { pc.d("MediaCodecUtil", "Ignoring malformed VP9 codec string: " + str); return null; } try { int parseInt = Integer.parseInt(strArr[1]); int parseInt2 = Integer.parseInt(strArr[2]); int g2 = g(parseInt); if (g2 == -1) { pc.d("MediaCodecUtil", "Unknown VP9 profile: " + parseInt); return null; } int f2 = f(parseInt2); if (f2 == -1) { pc.d("MediaCodecUtil", "Unknown VP9 level: " + parseInt2); return null; } return new Pair(Integer.valueOf(g2), Integer.valueOf(f2)); } catch (NumberFormatException unused) { pc.d("MediaCodecUtil", "Ignoring malformed VP9 codec string: " + str); return null; } } private static boolean e(MediaCodecInfo mediaCodecInfo) { if (xp.a >= 29) { return f(mediaCodecInfo); } String lowerCase = Ascii.toLowerCase(mediaCodecInfo.getName()); if (lowerCase.startsWith("arc.")) { return false; } return lowerCase.startsWith("omx.google.") || lowerCase.startsWith("omx.ffmpeg.") || (lowerCase.startsWith("omx.sec.") && lowerCase.contains(".sw.")) || lowerCase.equals("omx.qcom.video.decoder.hevcswvdec") || lowerCase.startsWith("c2.android.") || lowerCase.startsWith("c2.google.") || !(lowerCase.startsWith("omx.") || lowerCase.startsWith("c2.")); } public static final class f implements d { private final int a; private MediaCodecInfo[] b; @Override // com.applovin.impl.nd.d public boolean b() { return true; } public f(boolean z, boolean z2) { this.a = (z || z2) ? 1 : 0; } @Override // com.applovin.impl.nd.d public int a() { c(); return this.b.length; } @Override // com.applovin.impl.nd.d public boolean b(String str, String str2, MediaCodecInfo.CodecCapabilities codecCapabilities) { return codecCapabilities.isFeatureSupported(str); } private void c() { if (this.b == null) { this.b = new MediaCodecList(this.a).getCodecInfos(); } } @Override // com.applovin.impl.nd.d public MediaCodecInfo a(int i) { c(); return this.b[i]; } @Override // com.applovin.impl.nd.d public boolean a(String str, String str2, MediaCodecInfo.CodecCapabilities codecCapabilities) { return codecCapabilities.isFeatureRequired(str); } } public static final class b { public final String a; public final boolean b; public final boolean c; public b(String str, boolean z, boolean z2) { this.a = str; this.b = z; this.c = z2; } public int hashCode() { return ((((this.a.hashCode() + 31) * 31) + (this.b ? 1231 : 1237)) * 31) + (this.c ? 1231 : 1237); } public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || obj.getClass() != b.class) { return false; } b bVar = (b) obj; return TextUtils.equals(this.a, bVar.a) && this.b == bVar.b && this.c == bVar.c; } } private static Integer b(String str) { if (str == null) { return null; } switch (str) { } return null; } private static Integer a(String str) { if (str == null) { return null; } switch (str) { } return null; } private static boolean d(MediaCodecInfo mediaCodecInfo) { boolean isHardwareAccelerated; isHardwareAccelerated = mediaCodecInfo.isHardwareAccelerated(); return isHardwareAccelerated; } private static Integer c(String str) { if (str == null) { return null; } switch (str) { } return null; } private static boolean c(MediaCodecInfo mediaCodecInfo) { if (xp.a >= 29) { return d(mediaCodecInfo); } return !e(mediaCodecInfo); } private static Pair b(String str, String[] strArr) { int parseInt; int i; if (strArr.length < 2) { pc.d("MediaCodecUtil", "Ignoring malformed AVC codec string: " + str); return null; } try { if (strArr[1].length() == 6) { i = Integer.parseInt(strArr[1].substring(0, 2), 16); parseInt = Integer.parseInt(strArr[1].substring(4), 16); } else if (strArr.length >= 3) { int parseInt2 = Integer.parseInt(strArr[1]); parseInt = Integer.parseInt(strArr[2]); i = parseInt2; } else { pc.d("MediaCodecUtil", "Ignoring malformed AVC codec string: " + str); return null; } int d2 = d(i); if (d2 == -1) { pc.d("MediaCodecUtil", "Unknown AVC profile: " + i); return null; } int b2 = b(parseInt); if (b2 == -1) { pc.d("MediaCodecUtil", "Unknown AVC level: " + parseInt); return null; } return new Pair(Integer.valueOf(d2), Integer.valueOf(b2)); } catch (NumberFormatException unused) { pc.d("MediaCodecUtil", "Ignoring malformed AVC codec string: " + str); return null; } } private static Pair a(String str, String[] strArr) { int e2; if (strArr.length != 3) { pc.d("MediaCodecUtil", "Ignoring malformed MP4A codec string: " + str); return null; } try { if (MimeTypes.AUDIO_AAC.equals(Cif.a(Integer.parseInt(strArr[1], 16))) && (e2 = e(Integer.parseInt(strArr[2]))) != -1) { return new Pair(Integer.valueOf(e2), 0); } } catch (NumberFormatException unused) { pc.d("MediaCodecUtil", "Ignoring malformed MP4A codec string: " + str); } return null; } private static boolean b(MediaCodecInfo mediaCodecInfo) { boolean isAlias; isAlias = mediaCodecInfo.isAlias(); return isAlias; } private static Pair a(String str, String[] strArr, r3 r3Var) { int i; if (strArr.length < 4) { pc.d("MediaCodecUtil", "Ignoring malformed AV1 codec string: " + str); return null; } int i2 = 1; try { int parseInt = Integer.parseInt(strArr[1]); int parseInt2 = Integer.parseInt(strArr[2].substring(0, 2)); int parseInt3 = Integer.parseInt(strArr[3]); if (parseInt != 0) { pc.d("MediaCodecUtil", "Unknown AV1 profile: " + parseInt); return null; } if (parseInt3 != 8 && parseInt3 != 10) { pc.d("MediaCodecUtil", "Unknown AV1 bit depth: " + parseInt3); return null; } if (parseInt3 != 8) { i2 = (r3Var == null || !(r3Var.d != null || (i = r3Var.c) == 7 || i == 6)) ? 2 : 4096; } int a2 = a(parseInt2); if (a2 == -1) { pc.d("MediaCodecUtil", "Unknown AV1 level: " + parseInt2); return null; } return new Pair(Integer.valueOf(i2), Integer.valueOf(a2)); } catch (NumberFormatException unused) { pc.d("MediaCodecUtil", "Ignoring malformed AV1 codec string: " + str); return null; } } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ int b(kd kdVar) { return kdVar.a.startsWith("OMX.google") ? 1 : 0; } public static synchronized List b(String str, boolean z, boolean z2) { d eVar; synchronized (nd.class) { try { b bVar = new b(str, z, z2); HashMap hashMap = b; List list = (List) hashMap.get(bVar); if (list != null) { return list; } int i = xp.a; if (i >= 21) { eVar = new f(z, z2); } else { eVar = new e(); } ArrayList a2 = a(bVar, eVar); if (z && a2.isEmpty() && 21 <= i && i <= 23) { a2 = a(bVar, new e()); if (!a2.isEmpty()) { pc.d("MediaCodecUtil", "MediaCodecList API didn't list secure decoder for: " + str + ". Assuming: " + ((kd) a2.get(0)).a); } } a(str, a2); List unmodifiableList = Collections.unmodifiableList(a2); hashMap.put(bVar, unmodifiableList); return unmodifiableList; } catch (Throwable th) { throw th; } } } public static int b() { if (c == -1) { int i = 0; kd a2 = a("video/avc", false, false); if (a2 != null) { MediaCodecInfo.CodecProfileLevel[] a3 = a2.a(); int length = a3.length; int i2 = 0; while (i < length) { i2 = Math.max(c(a3[i].level), i2); i++; } i = Math.max(i2, xp.a >= 21 ? 345600 : 172800); } c = i; } return c; } private static String a(MediaCodecInfo mediaCodecInfo, String str, String str2) { for (String str3 : mediaCodecInfo.getSupportedTypes()) { if (str3.equalsIgnoreCase(str2)) { return str3; } } if (str2.equals("video/dolby-vision")) { if ("OMX.MS.HEVCDV.Decoder".equals(str)) { return "video/hevcdv"; } if ("OMX.RTK.video.decoder".equals(str) || "OMX.realtek.video.decoder.tunneled".equals(str)) { return "video/dv_hevc"; } return null; } if (str2.equals(MimeTypes.AUDIO_ALAC) && "OMX.lge.alac.decoder".equals(str)) { return "audio/x-lg-alac"; } if (str2.equals(MimeTypes.AUDIO_FLAC) && "OMX.lge.flac.decoder".equals(str)) { return "audio/x-lg-flac"; } return null; } /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */ /* JADX WARN: Code restructure failed: missing block: B:43:0x0075, code lost: if (r3.equals("av01") == false) goto L11; */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static android.util.Pair a(com.applovin.impl.f9 r6) { /* java.lang.String r0 = r6.j r1 = 0 if (r0 != 0) goto L6 return r1 L6: java.lang.String r2 = "\\." java.lang.String[] r0 = r0.split(r2) java.lang.String r2 = r6.m java.lang.String r3 = "video/dolby-vision" boolean r2 = r3.equals(r2) if (r2 == 0) goto L1d java.lang.String r6 = r6.j android.util.Pair r6 = c(r6, r0) return r6 L1d: r2 = 0 r3 = r0[r2] r3.hashCode() int r4 = r3.hashCode() r5 = -1 switch(r4) { case 3004662: goto L6f; case 3006243: goto L64; case 3006244: goto L59; case 3199032: goto L4e; case 3214780: goto L43; case 3356560: goto L38; case 3624515: goto L2d; default: goto L2b; } L2b: r2 = r5 goto L78 L2d: java.lang.String r2 = "vp09" boolean r2 = r3.equals(r2) if (r2 != 0) goto L36 goto L2b L36: r2 = 6 goto L78 L38: java.lang.String r2 = "mp4a" boolean r2 = r3.equals(r2) if (r2 != 0) goto L41 goto L2b L41: r2 = 5 goto L78 L43: java.lang.String r2 = "hvc1" boolean r2 = r3.equals(r2) if (r2 != 0) goto L4c goto L2b L4c: r2 = 4 goto L78 L4e: java.lang.String r2 = "hev1" boolean r2 = r3.equals(r2) if (r2 != 0) goto L57 goto L2b L57: r2 = 3 goto L78 L59: java.lang.String r2 = "avc2" boolean r2 = r3.equals(r2) if (r2 != 0) goto L62 goto L2b L62: r2 = 2 goto L78 L64: java.lang.String r2 = "avc1" boolean r2 = r3.equals(r2) if (r2 != 0) goto L6d goto L2b L6d: r2 = 1 goto L78 L6f: java.lang.String r4 = "av01" boolean r3 = r3.equals(r4) if (r3 != 0) goto L78 goto L2b L78: switch(r2) { case 0: goto L98; case 1: goto L91; case 2: goto L91; case 3: goto L8a; case 4: goto L8a; case 5: goto L83; case 6: goto L7c; default: goto L7b; } L7b: return r1 L7c: java.lang.String r6 = r6.j android.util.Pair r6 = e(r6, r0) return r6 L83: java.lang.String r6 = r6.j android.util.Pair r6 = a(r6, r0) return r6 L8a: java.lang.String r6 = r6.j android.util.Pair r6 = d(r6, r0) return r6 L91: java.lang.String r6 = r6.j android.util.Pair r6 = b(r6, r0) return r6 L98: java.lang.String r1 = r6.j com.applovin.impl.r3 r6 = r6.y android.util.Pair r6 = a(r1, r0, r6) return r6 */ throw new UnsupportedOperationException("Method not decompiled: com.applovin.impl.nd.a(com.applovin.impl.f9):android.util.Pair"); } public static kd a(String str, boolean z, boolean z2) { List b2 = b(str, z, z2); if (b2.isEmpty()) { return null; } return (kd) b2.get(0); } /* JADX WARN: Can't wrap try/catch for region: R(7:28|(4:(2:72|73)|53|(9:56|57|58|59|60|61|62|64|65)|9)|32|33|34|36|9) */ /* JADX WARN: Code restructure failed: missing block: B:37:0x00b1, code lost: r0 = e; */ /* JADX WARN: Code restructure failed: missing block: B:74:0x008c, code lost: if (r1.b == false) goto L36; */ /* JADX WARN: Removed duplicated region for block: B:42:0x0105 A[Catch: Exception -> 0x012e, TRY_ENTER, TryCatch #1 {Exception -> 0x012e, blocks: (B:3:0x0008, B:5:0x001b, B:9:0x0124, B:10:0x002d, B:13:0x0038, B:39:0x00fd, B:42:0x0105, B:44:0x010b, B:47:0x0130, B:48:0x0153), top: B:2:0x0008 }] */ /* JADX WARN: Removed duplicated region for block: B:51:0x0130 A[ADDED_TO_REGION, SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private static java.util.ArrayList a(com.applovin.impl.nd.b r24, com.applovin.impl.nd.d r25) { /* Method dump skipped, instructions count: 348 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.applovin.impl.nd.a(com.applovin.impl.nd$b, com.applovin.impl.nd$d):java.util.ArrayList"); } private static boolean a(MediaCodecInfo mediaCodecInfo, String str, boolean z, String str2) { if (mediaCodecInfo.isEncoder() || (!z && str.endsWith(".secure"))) { return false; } int i = xp.a; if (i < 21 && ("CIPAACDecoder".equals(str) || "CIPMP3Decoder".equals(str) || "CIPVorbisDecoder".equals(str) || "CIPAMRNBDecoder".equals(str) || "AACDecoder".equals(str) || "MP3Decoder".equals(str))) { return false; } if (i < 18 && "OMX.MTK.AUDIO.DECODER.AAC".equals(str)) { String str3 = xp.b; if ("a70".equals(str3) || ("Xiaomi".equals(xp.c) && str3.startsWith("HM"))) { return false; } } if (i == 16 && "OMX.qcom.audio.decoder.mp3".equals(str)) { String str4 = xp.b; if ("dlxu".equals(str4) || "protou".equals(str4) || "ville".equals(str4) || "villeplus".equals(str4) || "villec2".equals(str4) || str4.startsWith("gee") || "C6602".equals(str4) || "C6603".equals(str4) || "C6606".equals(str4) || "C6616".equals(str4) || "L36h".equals(str4) || "SO-02E".equals(str4)) { return false; } } if (i == 16 && "OMX.qcom.audio.decoder.aac".equals(str)) { String str5 = xp.b; if ("C1504".equals(str5) || "C1505".equals(str5) || "C1604".equals(str5) || "C1605".equals(str5)) { return false; } } if (i < 24 && (("OMX.SEC.aac.dec".equals(str) || "OMX.Exynos.AAC.Decoder".equals(str)) && "samsung".equals(xp.c))) { String str6 = xp.b; if (str6.startsWith("zeroflte") || str6.startsWith("zerolte") || str6.startsWith("zenlte") || "SC-05G".equals(str6) || "marinelteatt".equals(str6) || "404SC".equals(str6) || "SC-04G".equals(str6) || "SCV31".equals(str6)) { return false; } } if (i <= 19 && "OMX.SEC.vp8.dec".equals(str) && "samsung".equals(xp.c)) { String str7 = xp.b; if (str7.startsWith("d2") || str7.startsWith("serrano") || str7.startsWith("jflte") || str7.startsWith("santos") || str7.startsWith("t0")) { return false; } } if (i <= 19 && xp.b.startsWith("jflte") && "OMX.qcom.video.decoder.vp8".equals(str)) { return false; } return (MimeTypes.AUDIO_E_AC3_JOC.equals(str2) && "OMX.MTK.AUDIO.DECODER.DSPAC3".equals(str)) ? false : true; } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ int a(kd kdVar) { String str = kdVar.a; if (str.startsWith("OMX.google") || str.startsWith("c2.android")) { return 1; } return (xp.a >= 26 || !str.equals("OMX.MTK.AUDIO.DECODER.RAW")) ? 0 : -1; } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ int a(f9 f9Var, kd kdVar) { try { return kdVar.b(f9Var) ? 1 : 0; } catch (c unused) { return -1; } } /* JADX INFO: Access modifiers changed from: private */ public static /* synthetic */ int a(g gVar, Object obj, Object obj2) { return gVar.a(obj2) - gVar.a(obj); } private static void a(List list, final g gVar) { Collections.sort(list, new Comparator() { // from class: com.applovin.impl.nd$$ExternalSyntheticLambda7 @Override // java.util.Comparator public final int compare(Object obj, Object obj2) { int a2; a2 = nd.a(nd.g.this, obj, obj2); return a2; } }); } public static kd a() { return a(MimeTypes.AUDIO_RAW, false, false); } public static List a(List list, final f9 f9Var) { ArrayList arrayList = new ArrayList(list); a(arrayList, new g() { // from class: com.applovin.impl.nd$$ExternalSyntheticLambda6 @Override // com.applovin.impl.nd.g public final int a(Object obj) { int a2; a2 = nd.a(f9.this, (kd) obj); return a2; } }); return arrayList; } private static void a(String str, List list) { if (MimeTypes.AUDIO_RAW.equals(str)) { if (xp.a < 26 && xp.b.equals("R9") && list.size() == 1 && ((kd) list.get(0)).a.equals("OMX.MTK.AUDIO.DECODER.RAW")) { list.add(kd.a("OMX.google.raw.decoder", MimeTypes.AUDIO_RAW, MimeTypes.AUDIO_RAW, null, false, true, false, false, false)); } a(list, new g() { // from class: com.applovin.impl.nd$$ExternalSyntheticLambda4 @Override // com.applovin.impl.nd.g public final int a(Object obj) { int a2; a2 = nd.a((kd) obj); return a2; } }); } int i = xp.a; if (i < 21 && list.size() > 1) { String str2 = ((kd) list.get(0)).a; if ("OMX.SEC.mp3.dec".equals(str2) || "OMX.SEC.MP3.Decoder".equals(str2) || "OMX.brcm.audio.mp3.decoder".equals(str2)) { a(list, new g() { // from class: com.applovin.impl.nd$$ExternalSyntheticLambda5 @Override // com.applovin.impl.nd.g public final int a(Object obj) { int b2; b2 = nd.b((kd) obj); return b2; } }); } } if (i >= 32 || list.size() <= 1 || !"OMX.qti.audio.decoder.flac".equals(((kd) list.get(0)).a)) { return; } list.add((kd) list.remove(0)); } private static boolean a(MediaCodecInfo mediaCodecInfo) { return xp.a >= 29 && b(mediaCodecInfo); } }