package o;

import android.os.Bundle;
import android.util.Log;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final /* synthetic */ class C2 implements InterfaceC0082De, E2, InterfaceC0250Jq {
    public final /* synthetic */ D2 l;

    public /* synthetic */ C2(D2 d2) {
        this.l = d2;
    }

    @Override // o.InterfaceC0250Jq
    public void a(DZ dz) {
        D2 d2 = this.l;
        Log.isLoggable("FirebaseCrashlytics", 3);
        A2 a2 = (A2) dz.get();
        C0247Jn c0247Jn = new C0247Jn(2, a2);
        Gm0 gm0 = new Gm0(3, false);
        B2 b2 = (B2) a2;
        C0669Zu c0669ZuB = b2.b("clx", gm0);
        if (c0669ZuB == null) {
            Log.isLoggable("FirebaseCrashlytics", 3);
            c0669ZuB = b2.b("crash", gm0);
        }
        if (c0669ZuB != null) {
            Log.isLoggable("FirebaseCrashlytics", 3);
            OD od = new OD(16);
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            C3126zm0 c3126zm0 = new C3126zm0(c0247Jn);
            synchronized (d2) {
                try {
                    ArrayList arrayList = (ArrayList) d2.a;
                    int size = arrayList.size();
                    int i = 0;
                    while (i < size) {
                        Object obj = arrayList.get(i);
                        i++;
                        od.g((C0402Pn) obj);
                    }
                    gm0.n = od;
                    gm0.m = c3126zm0;
                    d2.c = od;
                    d2.b = c3126zm0;
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
    }

    @Override // o.InterfaceC0082De
    public void g(C0402Pn c0402Pn) {
        D2 d2 = this.l;
        synchronized (d2) {
            try {
                if (((InterfaceC0082De) d2.c) instanceof C0854bs) {
                    ((ArrayList) d2.a).add(c0402Pn);
                }
                ((InterfaceC0082De) d2.c).g(c0402Pn);
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // o.E2
    public void h(Bundle bundle) {
        ((E2) this.l.b).h(bundle);
    }
}
