package o;

import android.content.Context;
import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicReference;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Rn, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0454Rn {
    public final Context a;
    public final C0637Yo b;
    public final C3031ym0 c;
    public final long d;
    public DH e;
    public DH f;
    public C0324Mn g;
    public final C2227qG h;
    public final C1533iy i;
    public final C2 j;
    public final C2 k;
    public final C0221In l;
    public final C0506Tn m;
    public final WT n;

    /* renamed from: o, reason: collision with root package name */
    public final C3126zm0 f319o;

    public C0454Rn(C0076Cy c0076Cy, C2227qG c2227qG, C0506Tn c0506Tn, C0637Yo c0637Yo, C2 c2, C2 c22, C1533iy c1533iy, C0221In c0221In, WT wt, C3126zm0 c3126zm0) {
        this.b = c0637Yo;
        c0076Cy.a();
        this.a = c0076Cy.a;
        this.h = c2227qG;
        this.m = c0506Tn;
        this.j = c2;
        this.k = c22;
        this.i = c1533iy;
        this.l = c0221In;
        this.n = wt;
        this.f319o = c3126zm0;
        this.d = System.currentTimeMillis();
        this.c = new C3031ym0(6);
    }

    public final void a(C0598Xb c0598Xb) throws IOException {
        File file;
        C3126zm0.n();
        C3126zm0.n();
        DH dh = this.e;
        dh.getClass();
        try {
            C1533iy c1533iy = (C1533iy) dh.m;
            String str = (String) dh.l;
            c1533iy.getClass();
            new File((File) c1533iy.n, str).createNewFile();
        } catch (IOException unused) {
        }
        Log.isLoggable("FirebaseCrashlytics", 2);
        try {
            try {
                try {
                    this.j.g(new C0402Pn(this));
                    this.g.e();
                } catch (Exception unused2) {
                    C3126zm0.n();
                    DH dh2 = this.e;
                    C1533iy c1533iy2 = (C1533iy) dh2.m;
                    String str2 = (String) dh2.l;
                    c1533iy2.getClass();
                    file = new File((File) c1533iy2.n, str2);
                }
                if (!c0598Xb.b().b.a) {
                    Log.isLoggable("FirebaseCrashlytics", 3);
                    throw new RuntimeException("Collection of crash reports disabled in Crashlytics settings.");
                }
                C0324Mn c0324Mn = this.g;
                c0324Mn.getClass();
                C3126zm0.n();
                C3129zo c3129zo = c0324Mn.n;
                if (!(c3129zo != null && c3129zo.e.get())) {
                    Log.isLoggable("FirebaseCrashlytics", 2);
                    try {
                        c0324Mn.b(true, c0598Xb, true);
                        Log.isLoggable("FirebaseCrashlytics", 2);
                    } catch (Exception unused3) {
                    }
                }
                this.g.f(((Qc0) ((AtomicReference) c0598Xb.i).get()).a);
                DH dh3 = this.e;
                C1533iy c1533iy3 = (C1533iy) dh3.m;
                String str3 = (String) dh3.l;
                c1533iy3.getClass();
                file = new File((File) c1533iy3.n, str3);
                file.delete();
            } finally {
                C3126zm0.n();
                try {
                    DH dh4 = this.e;
                    C1533iy c1533iy4 = (C1533iy) dh4.m;
                    String str4 = (String) dh4.l;
                    c1533iy4.getClass();
                    new File((File) c1533iy4.n, str4).delete();
                } catch (Exception unused4) {
                }
            }
        } catch (Exception unused5) {
        }
    }
}
