package p138.p176.p291.p296.p297.p299;

import android.util.Log;
import java.lang.Thread;
import java.util.concurrent.atomic.AtomicBoolean;
import p138.p176.p291.p296.p297.C5608;
import p138.p176.p291.p296.p297.p310.InterfaceC5859;

/* JADX INFO: renamed from: ދ.ހ.ށ.ބ.ށ.އ.ޡ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C5677 implements Thread.UncaughtExceptionHandler {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final InterfaceC5678 f16248;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final InterfaceC5859 f16249;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final Thread.UncaughtExceptionHandler f16250;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final AtomicBoolean f16251 = new AtomicBoolean(false);

    /* JADX INFO: renamed from: ދ.ހ.ށ.ބ.ށ.އ.ޡ$֏, reason: contains not printable characters */
    public interface InterfaceC5678 {
    }

    public C5677(InterfaceC5678 interfaceC5678, InterfaceC5859 interfaceC5859, Thread.UncaughtExceptionHandler uncaughtExceptionHandler) {
        this.f16248 = interfaceC5678;
        this.f16249 = interfaceC5859;
        this.f16250 = uncaughtExceptionHandler;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r1v1, types: [java.lang.String] */
    /* JADX WARN: Type inference failed for: r1v2, types: [java.lang.String] */
    /* JADX WARN: Type inference failed for: r1v3, types: [java.lang.Thread$UncaughtExceptionHandler] */
    /* JADX WARN: Type inference failed for: r1v4, types: [java.lang.Thread$UncaughtExceptionHandler] */
    /* JADX WARN: Type inference failed for: r3v2, types: [ދ.ހ.ށ.ބ.ށ.ؠ] */
    /* JADX WARN: Type inference failed for: r7v0, types: [java.lang.Thread] */
    /* JADX WARN: Type inference failed for: r7v1, types: [java.lang.Thread] */
    /* JADX WARN: Type inference failed for: r7v3, types: [java.util.concurrent.atomic.AtomicBoolean] */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // java.lang.Thread.UncaughtExceptionHandler
    public void uncaughtException(Thread thread, Throwable th) {
        this.f16251.set(true);
        ?? r1 = "Crashlytics completed exception processing. Invoking default exception handler.";
        try {
            try {
                if (thread == 0) {
                    C5608.f16066.m8975("Could not handle uncaught exception; null thread");
                } else if (th == null) {
                    C5608.f16066.m8975("Could not handle uncaught exception; null throwable");
                } else {
                    InterfaceC5678 interfaceC5678 = this.f16248;
                    ((C5662) interfaceC5678).f16211.m9030(this.f16249, (Thread) thread, th);
                }
            } catch (Exception e) {
                C5608 c5608 = C5608.f16066;
                if (c5608.m8974(6)) {
                    Log.e(c5608.f16067, "An error occurred in the uncaught exception handler", e);
                }
            }
            C5608.f16066.m8972("Crashlytics completed exception processing. Invoking default exception handler.");
            r1 = this.f16250;
            r1.uncaughtException(thread, th);
            thread = this.f16251;
            thread.set(false);
        } catch (Throwable th2) {
            C5608.f16066.m8972(r1);
            this.f16250.uncaughtException(thread, th);
            this.f16251.set(false);
            throw th2;
        }
    }
}
