package com.google.firebase.analytics;

import I2.g;
import J2.a;
import L1.InterfaceC0091d1;
import a3.C0231c;
import a3.InterfaceC0232d;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Keep;
import com.google.android.gms.internal.measurement.C0344a0;
import com.google.android.gms.internal.measurement.C0399l0;
import com.google.android.gms.internal.measurement.C1;
import com.google.android.gms.internal.measurement.W;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import s1.z;

/* JADX INFO: loaded from: classes.dex */
public final class FirebaseAnalytics {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static volatile FirebaseAnalytics f5808b;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final C0399l0 f5809a;

    public FirebaseAnalytics(C0399l0 c0399l0) {
        z.g(c0399l0);
        this.f5809a = c0399l0;
    }

    @Keep
    public static FirebaseAnalytics getInstance(Context context) {
        if (f5808b == null) {
            synchronized (FirebaseAnalytics.class) {
                try {
                    if (f5808b == null) {
                        f5808b = new FirebaseAnalytics(C0399l0.c(context, null));
                    }
                } finally {
                }
            }
        }
        return f5808b;
    }

    @Keep
    public static InterfaceC0091d1 getScionFrontendApiImplementation(Context context, Bundle bundle) {
        C0399l0 c0399l0C = C0399l0.c(context, bundle);
        if (c0399l0C == null) {
            return null;
        }
        return new a(c0399l0C);
    }

    @Keep
    public String getFirebaseInstanceId() {
        try {
            Object obj = C0231c.f3611m;
            g gVarD = g.d();
            gVarD.a();
            return (String) C1.b(((C0231c) gVarD.f935d.get(InterfaceC0232d.class)).c(), 30000L, TimeUnit.MILLISECONDS);
        } catch (InterruptedException e2) {
            throw new IllegalStateException(e2);
        } catch (ExecutionException e6) {
            throw new IllegalStateException(e6.getCause());
        } catch (TimeoutException unused) {
            throw new IllegalThreadStateException("Firebase Installations getId Task has timed out.");
        }
    }

    @Keep
    @Deprecated
    public void setCurrentScreen(Activity activity, String str, String str2) {
        W wA = W.a(activity);
        C0399l0 c0399l0 = this.f5809a;
        c0399l0.getClass();
        c0399l0.a(new C0344a0(c0399l0, wA, str, str2));
    }
}
