package defpackage;

import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.PowerManager;
import android.preference.PreferenceManager;
import android.provider.DocumentsContract;
import android.view.View;
import androidx.media3.common.ParserException;
import com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException;
import com.hierynomus.security.SecurityException;
import j$.util.DesugarCollections;
import java.io.ByteArrayInputStream;
import java.io.EOFException;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import net.lingala.zip4j.exception.ZipException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/* JADX INFO: renamed from: ˎˊـ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public class C1709 implements InterfaceC5311, InterfaceC3069, InterfaceC3525, InterfaceC2925, InterfaceC4550, InterfaceC3368, InterfaceC4926 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final /* synthetic */ int f6831;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public Object f6832;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public Object f6833;

    public C1709(int i) {
        this.f6831 = i;
        switch (i) {
            case 14:
                this.f6833 = new HashMap();
                this.f6832 = new HashMap();
                break;
            default:
                this.f6833 = new HashMap();
                break;
        }
    }

    public /* synthetic */ C1709(int i, Object obj) {
        this.f6831 = i;
        this.f6833 = obj;
    }

    public /* synthetic */ C1709(int i, Object obj, Object obj2, boolean z) {
        this.f6831 = i;
        this.f6832 = obj;
        this.f6833 = obj2;
    }

    public /* synthetic */ C1709(int i, boolean z) {
        this.f6831 = i;
    }

    public C1709(Context context, String str, String str2) {
        this.f6831 = 22;
        if (str == null) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("keysetName cannot be null");
            throw null;
        }
        this.f6832 = str;
        Context applicationContext = context.getApplicationContext();
        if (str2 == null) {
            this.f6833 = PreferenceManager.getDefaultSharedPreferences(applicationContext).edit();
        } else {
            this.f6833 = applicationContext.getSharedPreferences(str2, 0).edit();
        }
    }

    public C1709(ByteArrayInputStream byteArrayInputStream) {
        this.f6831 = 10;
        C2546 c2546 = new C2546(byteArrayInputStream);
        this.f6833 = c2546;
        this.f6832 = new C4405(c2546);
    }

    public /* synthetic */ C1709(Object obj, int i, Object obj2) {
        this.f6831 = i;
        this.f6833 = obj;
        this.f6832 = obj2;
    }

    public C1709(String str) throws SecurityException {
        this.f6831 = 1;
        this.f6833 = str;
        try {
            this.f6832 = Mac.getInstance(str);
        } catch (NoSuchAlgorithmException | NoSuchProviderException e) {
            throw new SecurityException(e);
        }
    }

    public C1709(C0135 c0135) {
        this.f6831 = 14;
        this.f6833 = new HashMap(c0135.f1475);
        this.f6832 = new HashMap(c0135.f1474);
    }

    public C1709(C0349 c0349, AbstractC4049 abstractC4049) {
        this.f6831 = 21;
        C2245 c2245 = C2245.f8899;
        C5169 c5169 = C5169.f19466;
        this.f6833 = c0349;
        this.f6832 = abstractC4049;
    }

    public C1709(C0760 c0760) {
        this.f6831 = 2;
        this.f6832 = c0760;
        this.f6833 = new short[768];
    }

    public C1709(C1863 c1863) {
        this.f6831 = 16;
        this.f6832 = c1863;
        this.f6833 = AbstractC0956.m3260(null);
    }

    public C1709(C2598 c2598, int[] iArr) {
        this.f6831 = 7;
        this.f6833 = AbstractC4509.m9559(c2598);
        this.f6832 = iArr;
    }

    public C1709(ᵯᵨᵲ r3) {
        this.f6831 = 5;
        ᵥᵵᵶᵩ r0 = new ᵥᵵᵶᵩ(r3);
        this.f6832 = new C1563(2);
        this.f6833 = r0;
    }

    public C1709(C4605 c4605) {
        this.f6831 = 26;
        this.f6833 = c4605;
        this.f6832 = new Object();
    }

    public C1709(InterfaceC5081 interfaceC5081) {
        this.f6831 = 11;
        this.f6832 = DesugarCollections.synchronizedMap(new HashMap());
        this.f6833 = interfaceC5081;
    }

    public C1709(InterfaceC5366 interfaceC5366) {
        this.f6831 = 28;
        this.f6833 = interfaceC5366;
        C0769 c0769 = new C0769();
        c0769.f3437 = 0;
        this.f6832 = c0769;
    }

    public C1709(char[] cArr, long j, boolean z) throws ZipException {
        this.f6831 = 24;
        C5545 c5545 = new C5545();
        this.f6833 = c5545;
        if (cArr == null || cArr.length <= 0) {
            C4468.m9508("input password is null or empty, cannot initialize standard encrypter");
            throw null;
        }
        c5545.m11173(cArr, z);
        byte[] bArr = new byte[12];
        SecureRandom secureRandom = new SecureRandom();
        for (int i = 0; i < 12; i++) {
            byte bNextInt = (byte) secureRandom.nextInt(256);
            C5545 c55452 = (C5545) this.f6833;
            byte bM11175 = (byte) ((c55452.m11175() & 255) ^ bNextInt);
            c55452.m11174(bNextInt);
            bArr[i] = bM11175;
        }
        this.f6832 = bArr;
        c5545.m11173(cArr, z);
        byte[] bArr2 = (byte[]) this.f6832;
        bArr2[11] = (byte) (j >>> 24);
        bArr2[10] = (byte) (j >>> 16);
        mo4750(bArr2, 0, bArr2.length);
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public static C1709 m4724(Context context, Uri uri) {
        String treeDocumentId = DocumentsContract.getTreeDocumentId(uri);
        if (DocumentsContract.isDocumentUri(context, uri)) {
            treeDocumentId = DocumentsContract.getDocumentId(uri);
        }
        if (treeDocumentId == null) {
            ᵷᵝˎ.ˉᵲ(uri, "Could not get document ID from Uri: ");
            return null;
        }
        Uri uriBuildDocumentUriUsingTree = DocumentsContract.buildDocumentUriUsingTree(uri, treeDocumentId);
        if (uriBuildDocumentUriUsingTree != null) {
            return new C1709(context, 27, uriBuildDocumentUriUsingTree);
        }
        throw new NullPointerException("Failed to build documentUri from a tree: " + uri);
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public static void m4725(C1709 c1709, boolean z, boolean z2) {
        synchronized (c1709) {
            boolean z3 = false;
            if (z) {
                if (((PowerManager.WakeLock) c1709.f6832) == null) {
                    if (((Context) c1709.f6833).checkSelfPermission("android.permission.WAKE_LOCK") != 0) {
                        ˋˀᵧ.ʿٴˇ("WAKE_LOCK permission not granted, can't acquire wake lock for playback");
                        return;
                    }
                    PowerManager powerManager = (PowerManager) ((Context) c1709.f6833).getSystemService("power");
                    if (powerManager == null) {
                        ˋˀᵧ.ʿٴˇ("PowerManager is null, therefore not creating the WakeLock.");
                        return;
                    } else {
                        PowerManager.WakeLock wakeLockNewWakeLock = powerManager.newWakeLock(1, "ExoPlayer:WakeLockManager");
                        c1709.f6832 = wakeLockNewWakeLock;
                        wakeLockNewWakeLock.setReferenceCounted(false);
                    }
                }
            }
            PowerManager.WakeLock wakeLock = (PowerManager.WakeLock) c1709.f6832;
            if (wakeLock == null) {
                return;
            }
            if (z && z2) {
                z3 = true;
            }
            if (z3) {
                wakeLock.acquire();
            } else {
                wakeLock.release();
            }
        }
    }

    @Override // defpackage.InterfaceC2142
    public Object get() {
        switch (this.f6831) {
            case 4:
                return new C3968((Context) ((ᵻᵷ) this.f6833).ˌᴵ, (ᵣˊˈᵪ) ((ᵧᵙᵤ) this.f6832).get());
            default:
                ᵻᵧˁ r2 = new ᵻᵧˁ(15);
                ᵨᵡᵱ r3 = new ᵨᵡᵱ(13);
                Object obj = ((InterfaceC2142) this.f6833).get();
                InterfaceC2142 interfaceC2142 = (InterfaceC2142) this.f6832;
                return new C0520(r2, r3, C4104.f15718, (C2278) obj, interfaceC2142);
        }
    }

    public String toString() {
        switch (this.f6831) {
            case 18:
                StringBuilder sb = new StringBuilder("FileNotifyInfo{action=");
                sb.append((EnumC0505) this.f6833);
                sb.append(", fileName='");
                return AbstractC3653.m8231(sb, (String) this.f6832, "'}");
            default:
                return super.toString();
        }
    }

    @Override // defpackage.InterfaceC5311
    public void update(byte[] bArr) {
        ((Mac) this.f6832).update(bArr);
    }

    @Override // defpackage.InterfaceC5311
    public void update(byte[] bArr, int i, int i2) {
        ((Mac) this.f6832).update(bArr, i, i2);
    }

    @Override // defpackage.InterfaceC5311
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public void mo4726(byte b) {
        ((Mac) this.f6832).update(b);
    }

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public void m4727(String str, InterfaceC2058 interfaceC2058) {
        C1109 c1109 = (C1109) this.f6833;
        synchronized (c1109.f4744) {
            if (c1109.f4748.containsKey(str)) {
                throw new IllegalArgumentException("SavedStateProvider with the given key is already registered");
            }
            c1109.f4748.put(str, interfaceC2058);
        }
    }

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public C5242 m4728(C4272 c4272) {
        C5242 c5242M9702;
        synchronized (this.f6832) {
            c5242M9702 = ((C4605) this.f6833).m9702(c4272);
        }
        return c5242M9702;
    }

    @Override // defpackage.InterfaceC4550
    /* JADX INFO: renamed from: ˈᵲᵢ */
    public void mo2739(InterfaceC5517 interfaceC5517) {
    }

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public C0377 m4729(C5235 c5235) {
        String string;
        JSONArray jSONArray = c5235.f19740;
        long j = c5235.f19742;
        HashSet hashSet = new HashSet();
        for (int i = 0; i < jSONArray.length(); i++) {
            try {
                JSONObject jSONObject = jSONArray.getJSONObject(i);
                String string2 = jSONObject.getString("rolloutId");
                JSONArray jSONArray2 = jSONObject.getJSONArray("affectedParameterKeys");
                if (jSONArray2.length() > 1) {
                    String.format("Rollout has multiple affected parameter keys.Only the first key will be included in RolloutsState. rolloutId: %s, affectedParameterKeys: %s", string2, jSONArray2);
                }
                String strOptString = jSONArray2.optString(0, "");
                C5235 c5235M2561 = ((C0708) this.f6833).m2561();
                String string3 = null;
                if (c5235M2561 == null) {
                    string = null;
                } else {
                    try {
                        string = c5235M2561.f19736.getString(strOptString);
                    } catch (JSONException unused) {
                        string = null;
                    }
                }
                if (string == null) {
                    C5235 c5235M25612 = ((C0708) this.f6832).m2561();
                    if (c5235M25612 != null) {
                        try {
                            string3 = c5235M25612.f19736.getString(strOptString);
                        } catch (JSONException unused2) {
                        }
                    }
                    string = string3 != null ? string3 : "";
                }
                int i2 = AbstractC2159.f8591;
                C3633 c3633 = new C3633();
                if (string2 == null) {
                    throw new NullPointerException("Null rolloutId");
                }
                c3633.f13798 = string2;
                String string4 = jSONObject.getString("variantId");
                if (string4 == null) {
                    throw new NullPointerException("Null variantId");
                }
                c3633.f13795 = string4;
                if (strOptString == null) {
                    throw new NullPointerException("Null parameterKey");
                }
                c3633.f13796 = strOptString;
                c3633.f13799 = string;
                c3633.f13797 = j;
                c3633.f13800 = (byte) (c3633.f13800 | 1);
                hashSet.add(c3633.m8204());
            } catch (JSONException e) {
                throw new FirebaseRemoteConfigClientException("Exception parsing rollouts metadata to create RolloutsState.", e);
            }
        }
        return new C0377(hashSet);
    }

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public void m4730() {
        if (!((C1109) this.f6833).f4743) {
            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Can not perform this action after onSaveInstanceState");
            return;
        }
        C5247 c5247 = (C5247) this.f6832;
        if (c5247 == null) {
            c5247 = new C5247(this);
        }
        this.f6832 = c5247;
        try {
            C2114.class.getDeclaredConstructor(null);
            C5247 c52472 = (C5247) this.f6832;
            if (c52472 != null) {
                ((LinkedHashSet) c52472.f19773).add(C2114.class.getName());
            }
        } catch (NoSuchMethodException e) {
            throw new IllegalArgumentException("Class " + C2114.class.getSimpleName() + " must have default constructor in order to be automatically recreated", e);
        }
    }

    @Override // defpackage.InterfaceC4550
    /* JADX INFO: renamed from: ˊᵙᵾᵲ */
    public void mo2740() {
        final C5139 c5139 = (C5139) this.f6832;
        final int i = 0;
        c5139.f19327.post(new Runnable() { // from class: ᵹᵳʽ
            @Override // java.lang.Runnable
            public final void run() {
                int i2 = i;
                C5139 c51392 = c5139;
                switch (i2) {
                    case 0:
                        C5139.m10647(c51392);
                        break;
                    default:
                        C5139.m10647(c51392);
                        break;
                }
            }
        });
    }

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public InterfaceC2058 m4731() {
        InterfaceC2058 interfaceC2058;
        C1109 c1109 = (C1109) this.f6833;
        synchronized (c1109.f4744) {
            Iterator it = c1109.f4748.entrySet().iterator();
            do {
                interfaceC2058 = null;
                if (!it.hasNext()) {
                    break;
                }
                Map.Entry entry = (Map.Entry) it.next();
                String str = (String) entry.getKey();
                InterfaceC2058 interfaceC20582 = (InterfaceC2058) entry.getValue();
                if (ᵥˈᵛ.ˊᵫᵗ(str, "androidx.lifecycle.internal.SavedStateHandlesProvider")) {
                    interfaceC2058 = interfaceC20582;
                }
            } while (interfaceC2058 == null);
        }
        return interfaceC2058;
    }

    @Override // defpackage.InterfaceC3368
    /* JADX INFO: renamed from: ˊᵫᵗ */
    public void mo1312(Object obj) {
        C1971 c1971 = (C1971) this.f6832;
        C0529 c0529 = (C0529) this.f6833;
        C0529 c05292 = c1971.f7833;
        if (c05292 == null || c05292 != c0529) {
            return;
        }
        C1971 c19712 = (C1971) this.f6832;
        C0529 c05293 = (C0529) this.f6833;
        C2999 c2999 = c19712.f7828.f19375;
        if (obj == null || !c2999.m7084(c05293.f2716.mo1317())) {
            RunnableC4693 runnableC4693 = c19712.f7830;
            InterfaceC0883 interfaceC0883 = c05293.f2717;
            InterfaceC5071 interfaceC5071 = c05293.f2716;
            runnableC4693.mo2883(interfaceC0883, obj, interfaceC5071, interfaceC5071.mo1317(), c19712.f7827);
            return;
        }
        c19712.f7832 = obj;
        RunnableC4693 runnableC46932 = c19712.f7830;
        runnableC46932.f17850 = 2;
        C3670 c3670 = runnableC46932.f17838;
        (c3670.f13926 ? c3670.f13941 : c3670.f13930).execute(runnableC46932);
    }

    /* JADX WARN: Removed duplicated region for block: B:106:0x00e0 A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:110:0x00d0 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:29:0x0067 A[LOOP:1: B:27:0x0064->B:29:0x0067, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:32:0x0078  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x00d1 A[LOOP:2: B:31:0x0076->B:64:0x00d1, LOOP_END] */
    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public C1709 m4732(String str) throws Throwable {
        Cursor cursorQuery;
        Uri[] uriArr;
        int length;
        int i;
        int i2;
        Cursor cursorQuery2;
        String str2;
        String string;
        Context context = (Context) this.f6833;
        ContentResolver contentResolver = context.getContentResolver();
        Uri uri = (Uri) this.f6832;
        Uri uriBuildChildDocumentsUriUsingTree = DocumentsContract.buildChildDocumentsUriUsingTree(uri, DocumentsContract.getDocumentId(uri));
        ArrayList arrayList = new ArrayList();
        Cursor cursor = null;
        try {
            try {
                cursorQuery = contentResolver.query(uriBuildChildDocumentsUriUsingTree, new String[]{"document_id"}, null, null, null);
                while (cursorQuery.moveToNext()) {
                    try {
                        try {
                            arrayList.add(DocumentsContract.buildDocumentUriUsingTree(uri, cursorQuery.getString(0)));
                        } catch (Exception e) {
                            e = e;
                            e.toString();
                            if (cursorQuery != null) {
                                try {
                                    AbstractC3589.m8107(cursorQuery);
                                } catch (RuntimeException e2) {
                                    throw e2;
                                }
                            }
                            uriArr = (Uri[]) arrayList.toArray(new Uri[0]);
                            length = uriArr.length;
                            C1709[] c1709Arr = new C1709[length];
                            while (i < uriArr.length) {
                            }
                            while (i2 < length) {
                            }
                            return null;
                        }
                    } catch (Throwable th) {
                        th = th;
                        cursor = cursorQuery;
                        if (cursor != null) {
                            try {
                                AbstractC3589.m8107(cursor);
                            } catch (RuntimeException e3) {
                                throw e3;
                            } catch (Exception unused) {
                            }
                        }
                        throw th;
                    }
                }
                try {
                    AbstractC3589.m8107(cursorQuery);
                } catch (RuntimeException e4) {
                    throw e4;
                }
            } catch (Exception unused2) {
            }
        } catch (Exception e5) {
            e = e5;
            cursorQuery = null;
        } catch (Throwable th2) {
            th = th2;
            if (cursor != null) {
            }
            throw th;
        }
        uriArr = (Uri[]) arrayList.toArray(new Uri[0]);
        length = uriArr.length;
        C1709[] c1709Arr2 = new C1709[length];
        for (i = 0; i < uriArr.length; i++) {
            c1709Arr2[i] = new C1709(context, 27, uriArr[i]);
        }
        for (i2 = 0; i2 < length; i2++) {
            C1709 c1709 = c1709Arr2[i2];
            try {
                cursorQuery2 = ((Context) c1709.f6833).getContentResolver().query((Uri) c1709.f6832, new String[]{"_display_name"}, null, null, null);
                try {
                    try {
                    } catch (Exception e6) {
                        e = e6;
                        e.toString();
                        if (cursorQuery2 != null) {
                            try {
                                AbstractC3589.m8107(cursorQuery2);
                            } catch (RuntimeException e7) {
                                throw e7;
                            }
                        }
                    }
                } catch (Throwable th3) {
                    th = th3;
                    cursor = cursorQuery2;
                    if (cursor != null) {
                        try {
                            AbstractC3589.m8107(cursor);
                        } catch (RuntimeException e8) {
                            throw e8;
                        } catch (Exception unused3) {
                        }
                    }
                    throw th;
                }
            } catch (Exception e9) {
                e = e9;
                cursorQuery2 = null;
            } catch (Throwable th4) {
                th = th4;
            }
            if (!cursorQuery2.moveToFirst() || cursorQuery2.isNull(0)) {
                try {
                    try {
                        AbstractC3589.m8107(cursorQuery2);
                    } catch (Exception unused4) {
                    }
                    str2 = str;
                    string = null;
                    if (!str2.equals(string)) {
                        return c1709;
                    }
                } catch (RuntimeException e10) {
                    throw e10;
                }
            } else {
                string = cursorQuery2.getString(0);
                try {
                    AbstractC3589.m8107(cursorQuery2);
                } catch (RuntimeException e11) {
                    throw e11;
                } catch (Exception unused5) {
                }
                str2 = str;
                if (!str2.equals(string)) {
                }
            }
        }
        return null;
    }

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public synchronized Map m4733() {
        try {
            if (((Map) this.f6832) == null) {
                this.f6832 = DesugarCollections.unmodifiableMap(new HashMap((HashMap) this.f6833));
            }
        } catch (Throwable th) {
            throw th;
        }
        return (Map) this.f6832;
    }

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public void m4734(InterfaceC0976 interfaceC0976) {
        interfaceC0976.mo2243(this);
        interfaceC0976.mo2245(this);
        interfaceC0976.mo2244(this);
    }

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public synchronized ArrayList m4735(Class cls) {
        return ((ᵥᵵᵶᵩ) this.f6833).ᵠˏˏ(cls);
    }

    @Override // defpackage.InterfaceC3368
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public void mo1313(Exception exc) {
        C1971 c1971 = (C1971) this.f6832;
        C0529 c0529 = (C0529) this.f6833;
        C0529 c05292 = c1971.f7833;
        if (c05292 == null || c05292 != c0529) {
            return;
        }
        C1971 c19712 = (C1971) this.f6832;
        C0529 c05293 = (C0529) this.f6833;
        RunnableC4693 runnableC4693 = c19712.f7830;
        C1056 c1056 = c19712.f7827;
        InterfaceC5071 interfaceC5071 = c05293.f2716;
        runnableC4693.mo2884(c1056, exc, interfaceC5071, interfaceC5071.mo1317());
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public void m4736(C3953 c3953) throws GeneralSecurityException {
        Class cls;
        HashMap map = (HashMap) this.f6832;
        switch (c3953.f15100) {
            case 0:
                cls = InterfaceC5579.class;
                break;
            case 1:
                cls = C0881.class;
                break;
            case 2:
                cls = InterfaceC3608.class;
                break;
            default:
                cls = InterfaceC4204.class;
                break;
        }
        if (!map.containsKey(cls)) {
            map.put(cls, c3953);
            return;
        }
        C3953 c39532 = (C3953) map.get(cls);
        if (!c39532.equals(c3953) || !c3953.equals(c39532)) {
            throw new GeneralSecurityException(AbstractC2704.m6520(cls, "Attempt to register non-equal PrimitiveWrapper object or input class object for already existing object of type"));
        }
    }

    @Override // defpackage.InterfaceC4550
    /* JADX INFO: renamed from: ᵔᵖᵹᵫ */
    public InterfaceC5226 mo2743(int i, int i2) {
        return (C0890) this.f6833;
    }

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public boolean m4737(View view) {
        C0769 c0769 = (C0769) this.f6832;
        InterfaceC5366 interfaceC5366 = (InterfaceC5366) this.f6833;
        int iM10954 = interfaceC5366.m10954();
        int iM10952 = interfaceC5366.m10952();
        int iM10955 = interfaceC5366.m10955(view);
        int iM10953 = interfaceC5366.m10953(view);
        c0769.f3434 = iM10954;
        c0769.f3435 = iM10952;
        c0769.f3438 = iM10955;
        c0769.f3436 = iM10953;
        c0769.f3437 = 24579;
        return c0769.m2784();
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public boolean m4738(C4272 c4272) {
        boolean zContainsKey;
        synchronized (this.f6832) {
            zContainsKey = ((C4605) this.f6833).f17518.containsKey(c4272);
        }
        return zContainsKey;
    }

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public C5242 m4739(C4272 c4272) {
        C5242 c5242M9701;
        synchronized (this.f6832) {
            c5242M9701 = ((C4605) this.f6833).m9701(c4272);
        }
        return c5242M9701;
    }

    @Override // defpackage.InterfaceC2925
    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public byte[] mo4740(int i, byte[] bArr) {
        return bArr.length <= 64 ? ((C3770) this.f6833).mo4740(i, bArr) : ((C3714) this.f6832).mo4740(i, bArr);
    }

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public void m4741(C3714 c3714) {
        C1596 c1596;
        C1863 c1863 = (C1863) this.f6832;
        C5182 c5182M10727 = C5182.f19506;
        String str = (String) ((C4521) c3714.f14142).f17202.get("range");
        if (str != null) {
            try {
                c5182M10727 = C5182.m10727(str);
            } catch (ParserException e) {
                c1863.f7380.ˊᵡᵗʨ("SDP format error.", e);
                return;
            }
        }
        Uri uri = c1863.f7381;
        ˑᵕʾ.ːˏᵟᵯ(4, "initialCapacity");
        Object[] objArrCopyOf = new Object[4];
        int i = 0;
        int i2 = 0;
        while (true) {
            C2598 c2598 = ((C4521) c3714.f14142).f17196;
            if (i >= c2598.f10050) {
                C2598 c2598M9563 = AbstractC4509.m9563(i2, objArrCopyOf);
                boolean zIsEmpty = c2598M9563.isEmpty();
                ˈᵷᵵᵞ r2 = c1863.f7380;
                if (zIsEmpty) {
                    r2.ˊᵡᵗʨ("No playable track.", (IOException) null);
                    return;
                }
                long j = c5182M10727.f19508;
                C5139 c5139 = (C5139) r2.ᵜᵪʾ;
                for (int i3 = 0; i3 < c2598M9563.f10050; i3++) {
                    C2908 c2908 = new C2908(c5139, (C2640) c2598M9563.get(i3), i3, c5139.f19322);
                    c5139.f19330.add(c2908);
                    c2908.f11194.ᵵᵬᵽ(c2908.f11197.f17064, c5139.f19325, 0);
                }
                C2595 c2595 = (C2595) c5139.f19316.ᵜᵪʾ;
                c2595.f10045 = AbstractC0956.m3214(j - c5182M10727.f19509);
                c2595.f10041 = !(j == -9223372036854775807L);
                c2595.f10040 = j == -9223372036854775807L;
                c2595.f10039 = false;
                c2595.m6320();
                c1863.f7379 = true;
                return;
            }
            c1596 = (C1596) c2598.get(i);
            String str2 = ᵻᵕᵭ.ˈⁱᵡ(c1596.f6402.f5833);
            str2.getClass();
            switch (str2) {
                case "MPEG4-GENERIC":
                case "L8":
                case "AC3":
                case "AMR":
                case "L16":
                case "VP8":
                case "VP9":
                case "H264":
                case "H265":
                case "OPUS":
                case "PCMA":
                case "PCMU":
                case "MP4A-LATM":
                case "AMR-WB":
                case "MP4V-ES":
                case "H263-1998":
                case "H263-2000":
                    C2640 c2640 = new C2640((C1527) c3714.f14143, c1596, uri);
                    int i4 = i2 + 1;
                    int iM8058 = AbstractC3544.m8058(objArrCopyOf.length, i4);
                    if (iM8058 > objArrCopyOf.length) {
                        objArrCopyOf = Arrays.copyOf(objArrCopyOf, iM8058);
                    }
                    objArrCopyOf[i2] = c2640;
                    i2 = i4;
                    break;
            }
            i++;
        }
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public View m4742(int i, int i2, int i3, int i4) {
        C0769 c0769 = (C0769) this.f6832;
        InterfaceC5366 interfaceC5366 = (InterfaceC5366) this.f6833;
        int iM10954 = interfaceC5366.m10954();
        int iM10952 = interfaceC5366.m10952();
        int i5 = i2 > i ? 1 : -1;
        View view = null;
        while (i != i2) {
            View viewM10951 = interfaceC5366.m10951(i);
            int iM10955 = interfaceC5366.m10955(viewM10951);
            int iM10953 = interfaceC5366.m10953(viewM10951);
            c0769.f3434 = iM10954;
            c0769.f3435 = iM10952;
            c0769.f3438 = iM10955;
            c0769.f3436 = iM10953;
            if (i3 != 0) {
                c0769.f3437 = i3;
                if (c0769.m2784()) {
                    return viewM10951;
                }
            }
            if (i4 != 0) {
                c0769.f3437 = i4;
                if (c0769.m2784()) {
                    view = viewM10951;
                }
            }
            i += i5;
        }
        return view;
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public Bundle m4743(String str) {
        C1109 c1109 = (C1109) this.f6833;
        if (!c1109.f4747) {
            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("You can 'consumeRestoredStateForKey' only after the corresponding component has moved to the 'CREATED' state");
            return null;
        }
        Bundle bundle = c1109.f4749;
        if (bundle == null) {
            return null;
        }
        Bundle bundle2 = bundle.containsKey(str) ? ᵬʕˎʽ.ˊᵙᵾᵲ(str, bundle) : null;
        bundle.remove(str);
        if (bundle.isEmpty()) {
            c1109.f4749 = null;
        }
        return bundle2;
    }

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public void m4744() {
        C1863 c1863 = (C1863) this.f6832;
        ᵻᵪ.ˌᴵ(c1863.f7374 == 2);
        c1863.f7374 = 1;
        c1863.f7384 = false;
        long j = c1863.f7389;
        if (j != -9223372036854775807L) {
            c1863.m5058(AbstractC0956.m3264(j));
        }
    }

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public void m4745(int i) throws EOFException {
        if (i != ((C4405) this.f6832).skipBytes(i)) {
            throw new EOFException();
        }
    }

    @Override // defpackage.InterfaceC5311
    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public byte[] mo4746() {
        return ((Mac) this.f6832).doFinal();
    }

    @Override // defpackage.InterfaceC3525
    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public void mo4747(C1120 c1120) {
        InterfaceC2564 interfaceC2564 = (InterfaceC2564) this.f6833;
        C0736 c0736 = (C0736) this.f6832;
        try {
            try {
                interfaceC2564.mo2776(c0736, c0736.m2618(c1120));
            } catch (Throwable th) {
                AbstractC3481.m7923(th);
                th.printStackTrace();
            }
        } catch (Throwable th2) {
            AbstractC3481.m7923(th2);
            try {
                interfaceC2564.mo2772(th2);
            } catch (Throwable th3) {
                AbstractC3481.m7923(th3);
                th3.printStackTrace();
            }
        }
    }

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public byte m4748() {
        return (byte) ((C4405) this.f6832).readUnsignedByte();
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public void m4749(EnumC0914 enumC0914) {
        if (enumC0914 == EnumC0914.ONE) {
            return;
        }
        byte b = enumC0914.f4014;
        long j = ((C2546) this.f6833).f9846;
        long j2 = ((((long) b) + j) & ((long) (~b))) - j;
        while (true) {
            long j3 = j2 - 1;
            if (j2 <= 0) {
                return;
            }
            m4748();
            j2 = j3;
        }
    }

    @Override // defpackage.InterfaceC4926
    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public int mo4750(byte[] bArr, int i, int i2) throws ZipException {
        if (i2 < 0) {
            C4468.m9508("invalid length specified to decrpyt data");
            return 0;
        }
        for (int i3 = i; i3 < i + i2; i3++) {
            byte b = bArr[i3];
            C5545 c5545 = (C5545) this.f6833;
            byte bM11175 = (byte) ((c5545.m11175() & 255) ^ b);
            c5545.m11174(b);
            bArr[i3] = bM11175;
        }
        return i2;
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public void m4751(C3850 c3850) throws GeneralSecurityException {
        HashMap map = (HashMap) this.f6833;
        if (c3850 == null) {
            C4935.m10233("primitive constructor must be non-null");
            return;
        }
        C3135 c3135 = new C3135(c3850.f14706, c3850.f14704);
        if (!map.containsKey(c3135)) {
            map.put(c3135, c3850);
            return;
        }
        C3850 c38502 = (C3850) map.get(c3135);
        if (c38502.equals(c3850) && c3850 == c38502) {
            return;
        }
        C1685.m4565(c3135, "Attempt to register non-equal PrimitiveConstructor object for already existing object of type: ");
    }

    @Override // defpackage.InterfaceC3525
    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public void mo4752(IOException iOException) {
        try {
            ((InterfaceC2564) this.f6833).mo2772(iOException);
        } catch (Throwable th) {
            AbstractC3481.m7923(th);
            th.printStackTrace();
        }
    }

    @Override // defpackage.InterfaceC5311
    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public void mo4753(byte[] bArr) throws SecurityException {
        try {
            ((Mac) this.f6832).init(new SecretKeySpec(bArr, (String) this.f6833));
        } catch (InvalidKeyException e) {
            throw new SecurityException(e);
        }
    }
}
