package defpackage;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.BitmapDrawable;
import android.os.Looper;
import android.os.SystemClock;
import android.os.Trace;
import android.text.TextUtils;
import android.text.method.KeyListener;
import android.text.method.NumberKeyListener;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.util.Xml;
import android.view.Choreographer;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.EditText;
import com.google.common.util.concurrent.ListenableFuture;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.nio.channels.OverlappingFileLockException;
import java.security.InvalidAlgorithmParameterException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.xmlpull.v1.XmlPullParserException;

/* JADX INFO: renamed from: ˁᵵᵼ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C0767 implements InterfaceC0418, InterfaceC1220, InterfaceC5533, InterfaceC2564, InterfaceC2210, InterfaceC4218 {

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public static final ˉᵠﹳᵘ f3430 = new ˉᵠﹳᵘ(29);

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

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

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

    public C0767(int i) {
        this.f3431 = i;
        switch (i) {
            case 12:
                this.f3433 = new AtomicInteger(0);
                this.f3432 = new AtomicBoolean(false);
                break;
            case 17:
                this.f3433 = new HashSet();
                break;
            case 22:
                this.f3433 = new AtomicReference(C1453.f5917);
                this.f3432 = new ᵣˊˈᵪ(16, false);
                break;
            case 25:
                this.f3433 = new ArrayList();
                this.f3432 = new ArrayList();
                break;
            case 29:
                this.f3433 = new C4912(null);
                this.f3432 = new HashMap();
                break;
            default:
                this.f3433 = Choreographer.getInstance();
                this.f3432 = Looper.myLooper();
                break;
        }
    }

    public C0767(int i, int i2) {
        this.f3431 = 28;
        this.f3433 = new int[]{i, i2};
        this.f3432 = new float[]{0.0f, 1.0f};
    }

    public C0767(int i, int i2, int i3) {
        this.f3431 = 28;
        this.f3433 = new int[]{i, i2, i3};
        this.f3432 = new float[]{0.0f, 0.5f, 1.0f};
    }

    public /* synthetic */ C0767(int i, Object obj) {
        this.f3431 = i;
        this.f3433 = obj;
        this.f3432 = null;
    }

    public /* synthetic */ C0767(int i, Object obj, Object obj2, boolean z) {
        this.f3431 = i;
        this.f3433 = obj;
        this.f3432 = obj2;
    }

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

    public C0767(Animator animator) {
        this.f3431 = 26;
        this.f3433 = null;
        AnimatorSet animatorSet = new AnimatorSet();
        this.f3432 = animatorSet;
        animatorSet.play(animator);
    }

    public C0767(EditText editText, int i) {
        this.f3431 = i;
        switch (i) {
            case 20:
                this.f3433 = editText;
                C4698 c4698 = new C4698(editText);
                this.f3432 = c4698;
                editText.addTextChangedListener(c4698);
                if (C1065.f4569 == null) {
                    synchronized (C1065.f4571) {
                        try {
                            if (C1065.f4569 == null) {
                                C1065 c1065 = new C1065();
                                try {
                                    C1065.f4570 = Class.forName("android.text.DynamicLayout$ChangeWatcher", false, C1065.class.getClassLoader());
                                    break;
                                } catch (Throwable unused) {
                                }
                                C1065.f4569 = c1065;
                            }
                        } finally {
                        }
                        break;
                    }
                }
                editText.setEditableFactory(C1065.f4569);
                return;
            default:
                this.f3433 = editText;
                this.f3432 = new ᵧᵙᵤ(editText);
                return;
        }
    }

    public /* synthetic */ C0767(Object obj, int i, Object obj2) {
        this.f3431 = i;
        this.f3432 = obj;
        this.f3433 = obj2;
    }

    public C0767(String str) {
        this.f3431 = 23;
        this.f3433 = str.concat(".lck");
    }

    public C0767(String str, ᵺᵘ r2, C3664 c3664) {
        this.f3431 = 4;
        this.f3432 = str;
        this.f3433 = r2;
    }

    public C0767(ArrayList arrayList, ArrayList arrayList2) {
        this.f3431 = 28;
        int size = arrayList.size();
        this.f3433 = new int[size];
        this.f3432 = new float[size];
        for (int i = 0; i < size; i++) {
            ((int[]) this.f3433)[i] = ((Integer) arrayList.get(i)).intValue();
            ((float[]) this.f3432)[i] = ((Float) arrayList2.get(i)).floatValue();
        }
    }

    public C0767(ˁᵦ r2) {
        this.f3431 = 1;
        this.f3433 = r2;
        this.f3432 = f3430;
    }

    public C0767(C0764 c0764) {
        this.f3431 = 21;
        InterfaceC0340 interfaceC0340 = (InterfaceC0340) c0764.f3429;
        this.f3433 = new C1769(c0764, interfaceC0340.mo1597().mo1390(), -1L, true);
        this.f3432 = new C3941(c0764, interfaceC0340.mo1597().mo1388(), -1L, true);
    }

    public C0767(InterfaceC0778 interfaceC0778) {
        this.f3431 = 27;
        this.f3433 = interfaceC0778;
    }

    public C0767(C4178 c4178) {
        this.f3431 = 18;
        this.f3432 = c4178;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public static C0767 m2756(Context context) {
        FileChannel channel;
        FileLock fileLockLock;
        try {
            channel = new RandomAccessFile(new File(context.getFilesDir(), "generatefid.lock"), "rw").getChannel();
            try {
                fileLockLock = channel.lock();
                try {
                    return new C0767(15, channel, fileLockLock, false);
                } catch (IOException | Error | OverlappingFileLockException unused) {
                    if (fileLockLock != null) {
                        try {
                            fileLockLock.release();
                        } catch (IOException unused2) {
                        }
                    }
                    if (channel != null) {
                        try {
                            channel.close();
                        } catch (IOException unused3) {
                        }
                    }
                    return null;
                }
            } catch (IOException | Error | OverlappingFileLockException unused4) {
                fileLockLock = null;
            }
        } catch (IOException | Error | OverlappingFileLockException unused5) {
            channel = null;
            fileLockLock = null;
        }
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public static C0767 m2757(C4763 c4763) {
        return new C0767(c4763, 0, AbstractC0184.m1342(c4763.m9952()));
    }

    public String toString() {
        switch (this.f3431) {
            case 29:
                StringBuilder sb = new StringBuilder("GroupedLinkedMap( ");
                C4912 c4912 = (C4912) this.f3433;
                C4912 c49122 = c4912.f18691;
                boolean z = false;
                while (!c49122.equals(c4912)) {
                    sb.append('{');
                    sb.append(c49122.f18692);
                    sb.append(':');
                    ArrayList arrayList = c49122.f18690;
                    sb.append(arrayList != null ? arrayList.size() : 0);
                    sb.append("}, ");
                    c49122 = c49122.f18691;
                    z = true;
                }
                if (z) {
                    sb.delete(sb.length() - 2, sb.length());
                }
                sb.append(" )");
                return sb.toString();
            default:
                return super.toString();
        }
    }

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public void m2758(int i) {
        if (i != 32 && i != 48 && i != 64) {
            throw new InvalidAlgorithmParameterException(String.format("Invalid key size %d; only 32-byte, 48-byte and 64-byte AES-SIV keys are supported", Integer.valueOf(i)));
        }
        this.f3433 = Integer.valueOf(i);
    }

    @Override // defpackage.InterfaceC1220
    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public int mo2759(C2220 c2220) {
        return 2;
    }

    /* JADX WARN: Code restructure failed: missing block: B:138:0x01f7, code lost:
    
        continue;
     */
    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    /* JADX WARN: Removed duplicated region for block: B:106:0x00fe A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:57:0x00f7 A[Catch: IOException | XmlPullParserException -> 0x01fd, IOException | XmlPullParserException -> 0x01fd, TryCatch #0 {IOException | XmlPullParserException -> 0x01fd, blocks: (B:18:0x0056, B:91:0x01f7, B:91:0x01f7, B:26:0x0068, B:27:0x0076, B:29:0x007b, B:32:0x0085, B:40:0x009f, B:35:0x008e, B:38:0x0097, B:41:0x00ad, B:45:0x00bc, B:45:0x00bc, B:47:0x00c4, B:47:0x00c4, B:48:0x00ce, B:48:0x00ce, B:57:0x00f7, B:57:0x00f7, B:58:0x00fe, B:58:0x00fe, B:59:0x0116, B:59:0x0116, B:51:0x00d7, B:51:0x00d7, B:53:0x00df, B:53:0x00df, B:54:0x00ed, B:54:0x00ed, B:60:0x0117, B:60:0x0117, B:62:0x011f, B:62:0x011f, B:63:0x012d, B:63:0x012d, B:66:0x0137, B:66:0x0137, B:67:0x0142, B:67:0x0142, B:68:0x015a, B:68:0x015a, B:69:0x015b, B:69:0x015b, B:72:0x0165, B:72:0x0165, B:73:0x0170, B:73:0x0170, B:74:0x0188, B:74:0x0188, B:75:0x0189, B:75:0x0189, B:77:0x0191, B:77:0x0191, B:78:0x019a, B:78:0x019a, B:81:0x01a4, B:81:0x01a4, B:82:0x01ae, B:82:0x01ae, B:83:0x01c6, B:83:0x01c6, B:84:0x01c7, B:84:0x01c7, B:87:0x01d1, B:87:0x01d1, B:88:0x01db, B:88:0x01db, B:89:0x01f3, B:89:0x01f3, B:90:0x01f4, B:90:0x01f4), top: B:98:0x0056 }] */
    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void m2760(Context context, XmlResourceParser xmlResourceParser) {
        int eventType;
        C4399 c4399M7996;
        C3501 c3501 = new C3501();
        int attributeCount = xmlResourceParser.getAttributeCount();
        for (int i = 0; i < attributeCount; i++) {
            String attributeName = xmlResourceParser.getAttributeName(i);
            String attributeValue = xmlResourceParser.getAttributeValue(i);
            if (attributeName != null && attributeValue != null && "id".equals(attributeName)) {
                int identifier = attributeValue.contains("/") ? context.getResources().getIdentifier(attributeValue.substring(attributeValue.indexOf(47) + 1), "id", context.getPackageName()) : -1;
                if (identifier == -1 && attributeValue.length() > 1) {
                    identifier = Integer.parseInt(attributeValue.substring(1));
                }
                try {
                    eventType = xmlResourceParser.getEventType();
                    c4399M7996 = null;
                } catch (IOException | XmlPullParserException unused) {
                }
                while (eventType != 1) {
                    if (eventType == 0) {
                        xmlResourceParser.getName();
                    } else if (eventType == 2) {
                        String name = xmlResourceParser.getName();
                        switch (name.hashCode()) {
                            case -2025855158:
                                if (name.equals("Layout")) {
                                    if (c4399M7996 == null) {
                                        throw new RuntimeException("XML parser error must be within a Constraint " + xmlResourceParser.getLineNumber());
                                    }
                                    c4399M7996.f16702.m3208(context, Xml.asAttributeSet(xmlResourceParser));
                                } else {
                                    continue;
                                }
                                break;
                            case -1984451626:
                                if (name.equals("Motion")) {
                                    if (c4399M7996 == null) {
                                        throw new RuntimeException("XML parser error must be within a Constraint " + xmlResourceParser.getLineNumber());
                                    }
                                    c4399M7996.f16699.m2944(context, Xml.asAttributeSet(xmlResourceParser));
                                } else {
                                    continue;
                                }
                                break;
                            case -1962203927:
                                if (name.equals("ConstraintOverride")) {
                                    c4399M7996 = C3501.m7996(context, Xml.asAttributeSet(xmlResourceParser), true);
                                }
                                break;
                            case -1269513683:
                                if (name.equals("PropertySet")) {
                                    if (c4399M7996 == null) {
                                        throw new RuntimeException("XML parser error must be within a Constraint " + xmlResourceParser.getLineNumber());
                                    }
                                    c4399M7996.f16698.m8325(context, Xml.asAttributeSet(xmlResourceParser));
                                } else {
                                    continue;
                                }
                                break;
                            case -1238332596:
                                if (name.equals("Transform")) {
                                    if (c4399M7996 == null) {
                                        throw new RuntimeException("XML parser error must be within a Constraint " + xmlResourceParser.getLineNumber());
                                    }
                                    c4399M7996.f16700.m3911(context, Xml.asAttributeSet(xmlResourceParser));
                                } else {
                                    continue;
                                }
                                break;
                            case -71750448:
                                if (name.equals("Guideline")) {
                                    c4399M7996 = C3501.m7996(context, Xml.asAttributeSet(xmlResourceParser), false);
                                    c4399M7996.f16702.f4202 = true;
                                }
                                break;
                            case 366511058:
                                if (name.equals("CustomMethod")) {
                                    if (c4399M7996 != null) {
                                        throw new RuntimeException("XML parser error must be within a Constraint " + xmlResourceParser.getLineNumber());
                                    }
                                    C0746.m2697(context, xmlResourceParser, c4399M7996.f16703);
                                } else {
                                    continue;
                                }
                                break;
                            case 1331510167:
                                if (name.equals("Barrier")) {
                                    c4399M7996 = C3501.m7996(context, Xml.asAttributeSet(xmlResourceParser), false);
                                    c4399M7996.f16702.f4180 = 1;
                                }
                                break;
                            case 1791837707:
                                if (!name.equals("CustomAttribute")) {
                                    continue;
                                } else if (c4399M7996 != null) {
                                }
                                break;
                            case 1803088381:
                                if (name.equals("Constraint")) {
                                    c4399M7996 = C3501.m7996(context, Xml.asAttributeSet(xmlResourceParser), false);
                                }
                                break;
                        }
                    } else if (eventType == 3) {
                        String lowerCase = xmlResourceParser.getName().toLowerCase(Locale.ROOT);
                        switch (lowerCase.hashCode()) {
                            case -2075718416:
                                if (lowerCase.equals("guideline")) {
                                    c3501.f13455.put(Integer.valueOf(c4399M7996.f16701), c4399M7996);
                                    c4399M7996 = null;
                                }
                                break;
                            case -190376483:
                                if (lowerCase.equals("constraint")) {
                                    c3501.f13455.put(Integer.valueOf(c4399M7996.f16701), c4399M7996);
                                    c4399M7996 = null;
                                }
                                break;
                            case 426575017:
                                if (lowerCase.equals("constraintoverride")) {
                                    c3501.f13455.put(Integer.valueOf(c4399M7996.f16701), c4399M7996);
                                    c4399M7996 = null;
                                }
                                break;
                            case 2146106725:
                                if (lowerCase.equals("constraintset")) {
                                    ((SparseArray) this.f3432).put(identifier, c3501);
                                    return;
                                }
                                break;
                                break;
                        }
                    }
                    eventType = xmlResourceParser.next();
                }
                ((SparseArray) this.f3432).put(identifier, c3501);
                return;
            }
        }
    }

    @Override // defpackage.InterfaceC4218
    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public InterfaceC2793 mo2761() {
        return new ˊˊᵞᵽ(25, ((InterfaceC4218) this.f3433).mo2761(), (List) this.f3432, false);
    }

    @Override // defpackage.InterfaceC4218
    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public InterfaceC2793 mo2762(C1164 c1164, C3096 c3096) {
        return new ˊˊᵞᵽ(25, ((InterfaceC4218) this.f3433).mo2762(c1164, c3096), (List) this.f3432, false);
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public void m2763() throws IOException {
        String str = (String) this.f3433;
        if (((FileChannel) this.f3432) != null) {
            return;
        }
        try {
            File file = new File(str);
            File parentFile = file.getParentFile();
            if (parentFile != null) {
                parentFile.mkdirs();
            }
            FileChannel channel = new FileOutputStream(file).getChannel();
            this.f3432 = channel;
            if (channel != null) {
                channel.lock();
            }
        } catch (Throwable th) {
            FileChannel fileChannel = (FileChannel) this.f3432;
            if (fileChannel != null) {
                fileChannel.close();
            }
            this.f3432 = null;
            C4935.m10239(AbstractC3589.m8117("Unable to lock file: '", str, "'."), th);
        }
    }

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public void m2764(C2478 c2478) {
        ((HashSet) this.f3433).add(c2478);
        if (((C2478) this.f3432) != null) {
            return;
        }
        this.f3432 = c2478;
        C2538 c2538Mo2496 = c2478.f9618.mo2496();
        c2478.f9635 = c2538Mo2496;
        HandlerC4324 handlerC4324 = c2478.f9619;
        String str = AbstractC0956.f4222;
        c2538Mo2496.getClass();
        handlerC4324.getClass();
        handlerC4324.obtainMessage(1, new C4426(C3622.f13742.getAndIncrement(), true, SystemClock.elapsedRealtime(), c2538Mo2496)).sendToTarget();
    }

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public ListenableFuture m2765(InterfaceC2559 interfaceC2559, Executor executor) {
        executor.getClass();
        final ExecutorC0813 executorC0813 = new ExecutorC0813(EnumC2279.f8975);
        executorC0813.f3650 = executor;
        executorC0813.f3648 = this;
        ˊˊᵞᵽ r9 = new ˊˊᵞᵽ(22, executorC0813, interfaceC2559, false);
        final C5308 c5308 = new C5308();
        final ListenableFuture listenableFuture = (ListenableFuture) ((AtomicReference) this.f3433).getAndSet(c5308);
        final RunnableFutureC0362 runnableFutureC0362 = new RunnableFutureC0362();
        runnableFutureC0362.f2173 = new C3065(runnableFutureC0362, (InterfaceC2559) r9);
        listenableFuture.mo834(runnableFutureC0362, executorC0813);
        final ListenableFuture listenableFutureM9194 = AbstractC4226.m9194(runnableFutureC0362);
        final int i = 0;
        Runnable runnable = new Runnable() { // from class: ˑᵼ
            @Override // java.lang.Runnable
            public final void run() {
                int i2 = i;
                Object obj = executorC0813;
                Object obj2 = listenableFutureM9194;
                Object obj3 = listenableFuture;
                Object obj4 = c5308;
                Object obj5 = runnableFutureC0362;
                switch (i2) {
                    case 0:
                        RunnableFutureC0362 runnableFutureC03622 = (RunnableFutureC0362) obj5;
                        C5308 c53082 = (C5308) obj4;
                        ListenableFuture listenableFuture2 = (ListenableFuture) obj3;
                        ListenableFuture listenableFuture3 = (ListenableFuture) obj2;
                        ExecutorC0813 executorC08132 = (ExecutorC0813) obj;
                        if (runnableFutureC03622.isDone()) {
                            c53082.m10932(listenableFuture2);
                            return;
                        } else {
                            if (listenableFuture3.isCancelled()) {
                                int i3 = ExecutorC0813.f3647;
                                if (executorC08132.compareAndSet(EnumC2279.f8975, EnumC2279.f8977)) {
                                    runnableFutureC03622.cancel(false);
                                    return;
                                }
                                return;
                            }
                            return;
                        }
                    default:
                        String str = (String) obj4;
                        InterfaceC1841 interfaceC1841 = (InterfaceC1841) obj3;
                        C2333 c2333 = (C2333) obj2;
                        C3394 c3394 = (C3394) obj;
                        ((ᵠʽᵲ) obj5).getClass();
                        boolean z = ᵗʓ.ˌᴵ();
                        if (z) {
                            try {
                                Trace.beginSection(ᵗʓ.ʿٴˇ(str));
                            } finally {
                                if (z) {
                                    Trace.endSection();
                                }
                            }
                        }
                        try {
                            interfaceC1841.mo1021();
                            C0850 c0850 = ʻﾞ.ᵶˇᵱ;
                            c2333.m7564(c0850);
                            c3394.m7792(c0850);
                        } catch (Throwable th) {
                            c2333.m7564(new C0754(th));
                            c3394.m7791(th);
                        }
                        if (z) {
                            return;
                        } else {
                            return;
                        }
                }
            }
        };
        EnumC2921 enumC2921 = EnumC2921.f11255;
        listenableFutureM9194.mo834(runnable, enumC2921);
        runnableFutureC0362.mo834(runnable, enumC2921);
        return listenableFutureM9194;
    }

    @Override // defpackage.InterfaceC5533
    /* JADX INFO: renamed from: ˏːˆ */
    public C1300 mo2608(Object obj) {
        Boolean bool = (Boolean) obj;
        C3938 c3938 = (C3938) this.f3432;
        if (bool.booleanValue()) {
            Log.isLoggable("FirebaseCrashlytics", 3);
            boolean zBooleanValue = bool.booleanValue();
            ᵕˁـ r1 = c3938.f15039;
            if (zBooleanValue) {
                ((C0589) r1.ᵶˇᵱ).m2219(null);
                return ((C1300) this.f3433).m3824((ExecutorC5381) c3938.f15045.ᵜᵪʾ, new ᵟˑʽ(this));
            }
            r1.getClass();
            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("An invalid data collection token was used.");
            return null;
        }
        Log.isLoggable("FirebaseCrashlytics", 2);
        ˁᵦ r4 = c3938.f15051;
        Iterator it = ˁᵦ.ᵱᵽʡᵚ(((File) r4.ʽˈˋ).listFiles(C3938.f15038)).iterator();
        while (it.hasNext()) {
            ((File) it.next()).delete();
        }
        ˁᵦ r42 = ((C2054) c3938.f15043.f10704).f8143;
        C2054.m5471(ˁᵦ.ᵱᵽʡᵚ(((File) r42.ᵨᵣ).listFiles()));
        C2054.m5471(ˁᵦ.ᵱᵽʡᵚ(((File) r42.ᵻˈᵦʼ).listFiles()));
        C2054.m5471(ˁᵦ.ᵱᵽʡᵚ(((File) r42.ᵵᵽ).listFiles()));
        c3938.f15048.m2219(null);
        return ᵥˈᵛ.ᵸˆˁ((Object) null);
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public boolean m2766() {
        synchronized (this) {
            if (((AtomicBoolean) this.f3432).get()) {
                return false;
            }
            ((AtomicInteger) this.f3433).incrementAndGet();
            return true;
        }
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public void m2767() {
        synchronized (this) {
            ((AtomicInteger) this.f3433).decrementAndGet();
            if (((AtomicInteger) this.f3433).get() < 0) {
                throw new IllegalStateException("Unbalanced call to unblock() detected.");
            }
        }
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public void m2768() {
        try {
            ((FileLock) this.f3432).release();
            ((FileChannel) this.f3433).close();
        } catch (IOException unused) {
        }
    }

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public void m2769(InterfaceC0373 interfaceC0373, Object obj) {
        HashMap map = (HashMap) this.f3432;
        C4912 c4912 = (C4912) map.get(interfaceC0373);
        if (c4912 == null) {
            c4912 = new C4912(interfaceC0373);
            c4912.f18693 = c4912;
            C4912 c49122 = (C4912) this.f3433;
            c4912.f18693 = c49122.f18693;
            c4912.f18691 = c49122;
            c49122.f18693 = c4912;
            c4912.f18693.f18691 = c4912;
            map.put(interfaceC0373, c4912);
        } else {
            interfaceC0373.mo1697();
        }
        if (c4912.f18690 == null) {
            c4912.f18690 = new ArrayList();
        }
        c4912.f18690.add(obj);
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public void m2770(AttributeSet attributeSet, int i) {
        TypedArray typedArrayObtainStyledAttributes = ((EditText) this.f3433).getContext().obtainStyledAttributes(attributeSet, AbstractC0430.f2402, i, 0);
        try {
            boolean z = typedArrayObtainStyledAttributes.hasValue(14) ? typedArrayObtainStyledAttributes.getBoolean(14, true) : true;
            typedArrayObtainStyledAttributes.recycle();
            m2779(z);
        } catch (Throwable th) {
            typedArrayObtainStyledAttributes.recycle();
            throw th;
        }
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public C0465 m2771(InputConnection inputConnection, EditorInfo editorInfo) {
        InputConnection inputConnection2;
        ᵧᵙᵤ r1 = (ᵧᵙᵤ) this.f3432;
        if (inputConnection == null) {
            r1.getClass();
            inputConnection2 = null;
        } else {
            C0767 c0767 = (C0767) r1.ᵜᵪʾ;
            c0767.getClass();
            if (!(inputConnection instanceof C0465)) {
                inputConnection = new C0465((EditText) c0767.f3433, inputConnection, editorInfo);
            }
            inputConnection2 = inputConnection;
        }
        return (C0465) inputConnection2;
    }

    @Override // defpackage.InterfaceC2564
    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public void mo2772(Throwable th) {
        ((C2226) this.f3432).f8832.execute(new RunnableC4076(17, this, (InterfaceC2564) this.f3433, th, false));
    }

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public Object m2773() {
        C4912 c4912 = (C4912) this.f3433;
        C4912 c49122 = c4912.f18693;
        while (true) {
            boolean zEquals = c49122.equals(c4912);
            Object obj = c49122.f18692;
            if (zEquals) {
                return null;
            }
            ArrayList arrayList = c49122.f18690;
            int size = arrayList != null ? arrayList.size() : 0;
            Object objRemove = size > 0 ? c49122.f18690.remove(size - 1) : null;
            if (objRemove != null) {
                return objRemove;
            }
            C4912 c49123 = c49122.f18693;
            c49123.f18691 = c49122.f18691;
            c49122.f18691.f18693 = c49123;
            ((HashMap) this.f3432).remove(obj);
            ((InterfaceC0373) obj).mo1697();
            c49122 = c49122.f18693;
        }
    }

    @Override // defpackage.InterfaceC4562
    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public boolean mo2774(Object obj, File file, C2220 c2220) {
        return ((C5147) this.f3432).mo2774(new C4278((InterfaceC5397) this.f3433, ((BitmapDrawable) ((InterfaceC1364) obj).get()).getBitmap()), file, c2220);
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public InterfaceC5416 m2775(AbstractComponentCallbacksC3393 abstractComponentCallbacksC3393) {
        if (((InterfaceC5416) this.f3432) == null) {
            this.f3432 = (InterfaceC5416) ((InterfaceC0778) this.f3433).mo1706(abstractComponentCallbacksC3393.m7778());
            C2456 c2456M7781 = abstractComponentCallbacksC3393.m7781();
            c2456M7781.m6202();
            c2456M7781.f9541.m2595(new C3811(3, this));
        }
        return (InterfaceC5416) this.f3432;
    }

    @Override // defpackage.InterfaceC2564
    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public void mo2776(InterfaceC4415 interfaceC4415, C1034 c1034) {
        ((C2226) this.f3432).f8832.execute(new RunnableC3304(this, (InterfaceC2564) this.f3433, c1034, 3));
    }

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public void m2777(Exception exc, boolean z) {
        this.f3432 = null;
        HashSet hashSet = (HashSet) this.f3433;
        AbstractC4509 abstractC4509M9559 = AbstractC4509.m9559(hashSet);
        hashSet.clear();
        C2822 c2822M9564 = abstractC4509M9559.listIterator(0);
        while (c2822M9564.hasNext()) {
            C2478 c2478 = (C2478) c2822M9564.next();
            c2478.getClass();
            c2478.m6221(z ? 1 : 3, exc);
        }
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public KeyListener m2778(KeyListener keyListener) {
        if (keyListener instanceof NumberKeyListener) {
            return keyListener;
        }
        ((C0767) ((ᵧᵙᵤ) this.f3432).ᵜᵪʾ).getClass();
        if (keyListener instanceof C2184) {
            return keyListener;
        }
        if (keyListener == null) {
            return null;
        }
        return keyListener instanceof NumberKeyListener ? keyListener : new C2184(keyListener);
    }

    @Override // defpackage.InterfaceC2210
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public InterfaceC3906 mo1388() {
        return (C3941) this.f3432;
    }

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public void m2779(boolean z) {
        C4698 c4698 = (C4698) ((C0767) ((ᵧᵙᵤ) this.f3432).ᵜᵪʾ).f3432;
        if (c4698.f17867 != z) {
            if (c4698.f17868 != null) {
                C3880 c3880M8582 = C3880.m8582();
                C4832 c4832 = c4698.f17868;
                c3880M8582.getClass();
                ᵫﾞˌ.ᵷᵺʾᵖ(c4832, "initCallback cannot be null");
                ReentrantReadWriteLock reentrantReadWriteLock = c3880M8582.f14803;
                reentrantReadWriteLock.writeLock().lock();
                try {
                    c3880M8582.f14799.remove(c4832);
                } finally {
                    reentrantReadWriteLock.writeLock().unlock();
                }
            }
            c4698.f17867 = z;
            if (z) {
                C4698.m9834(c4698.f17866, C3880.m8582().m8583());
            }
        }
    }

    @Override // defpackage.InterfaceC2210
    /* JADX INFO: renamed from: ᵶᵥᵝ */
    public InterfaceC1636 mo1390() {
        return (C1769) this.f3433;
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public C0700 m2780() {
        Integer num = (Integer) this.f3433;
        if (num == null) {
            C1685.m4558("Key size is not set");
            return null;
        }
        if (((C3635) this.f3432) != null) {
            return new C0700(num.intValue(), (C3635) this.f3432);
        }
        C1685.m4558("Variant is not set");
        return null;
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public InterfaceC5226 m2781(int i) {
        int i2 = 0;
        while (true) {
            int[] iArr = (int[]) this.f3433;
            if (i2 >= iArr.length) {
                ˋˀᵧ.ᵝᵶ("Unmatched track of type: " + i);
                return new C0406();
            }
            if (i == iArr[i2]) {
                return ((C0890[]) this.f3432)[i2];
            }
            i2++;
        }
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public Object m2782(InterfaceC0373 interfaceC0373) {
        HashMap map = (HashMap) this.f3432;
        C4912 c4912 = (C4912) map.get(interfaceC0373);
        if (c4912 == null) {
            c4912 = new C4912(interfaceC0373);
            map.put(interfaceC0373, c4912);
        } else {
            interfaceC0373.mo1697();
        }
        C4912 c49122 = c4912.f18693;
        c49122.f18691 = c4912.f18691;
        c4912.f18691.f18693 = c49122;
        C4912 c49123 = (C4912) this.f3433;
        c4912.f18693 = c49123;
        C4912 c49124 = c49123.f18691;
        c4912.f18691 = c49124;
        c49124.f18693 = c4912;
        c4912.f18693.f18691 = c4912;
        ArrayList arrayList = c4912.f18690;
        int size = arrayList != null ? arrayList.size() : 0;
        if (size > 0) {
            return c4912.f18690.remove(size - 1);
        }
        return null;
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public C0764 m2783() {
        Object objM4720;
        ArrayList arrayList = (ArrayList) this.f3433;
        if (arrayList == null || arrayList.isEmpty()) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("Details of the products must be provided.");
            return null;
        }
        ArrayList arrayList2 = (ArrayList) this.f3433;
        if (arrayList2 != null) {
            int size = arrayList2.size();
            int i = 0;
            while (i < size) {
                Object obj = arrayList2.get(i);
                i++;
                if (((C1181) obj) == null) {
                    ᵕᵩʽᵲ.ᵮᵣᵗˈ("ProductDetailsParams cannot be null.");
                    return null;
                }
            }
        }
        C0764 c0764 = new C0764();
        c0764.f3426 = !((C1181) ((ArrayList) this.f3433).get(0)).f5037.f5860.optString("packageName").isEmpty();
        C1013 c1013 = (C1013) this.f3432;
        c1013.getClass();
        boolean z = (TextUtils.isEmpty(null) && TextUtils.isEmpty(null)) ? false : true;
        boolean zIsEmpty = TextUtils.isEmpty(null);
        if (z && !zIsEmpty) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("Please provide Old SKU purchase information(token/id) or original external transaction id, not both.");
            return null;
        }
        if (!c1013.f4398 && !z && zIsEmpty) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("Old SKU purchase information(token/id) or original external transaction id must be provided.");
            return null;
        }
        c0764.f3428 = new ˉᵠﹳᵘ(12);
        c0764.f3429 = new ArrayList();
        ArrayList arrayList3 = (ArrayList) this.f3433;
        if (arrayList3 != null) {
            objM4720 = AbstractC1707.m4720(arrayList3);
        } else {
            C0092 c0092 = AbstractC1707.f6825;
            objM4720 = C4767.f18145;
        }
        c0764.f3427 = objM4720;
        return c0764;
    }
}
