package com.google.firebase.analytics;

import E4.d;
import P2.w;
import W2.g;
import Z3.a;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Keep;
import com.google.android.gms.internal.measurement.C0662l0;
import com.google.android.gms.internal.measurement.W;
import com.google.android.gms.internal.measurement.Z;
import d3.Z0;
import g3.o;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

/* 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 f10546b;

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

    public FirebaseAnalytics(C0662l0 c0662l0) {
        w.f(c0662l0);
        this.f10547a = c0662l0;
    }

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

    @Keep
    public static Z0 getScionFrontendApiImplementation(Context context, Bundle bundle) {
        C0662l0 c0662l0D = C0662l0.d(context, bundle);
        if (c0662l0D == null) {
            return null;
        }
        return new a(c0662l0D);
    }

    @Keep
    public String getFirebaseInstanceId() {
        try {
            o oVarD = d.e().d();
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            return (String) g.e(oVarD, 30000L);
        } catch (InterruptedException e8) {
            throw new IllegalStateException(e8);
        } catch (ExecutionException e9) {
            throw new IllegalStateException(e9.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);
        C0662l0 c0662l0 = this.f10547a;
        c0662l0.getClass();
        c0662l0.b(new Z(c0662l0, wA, str, str2));
    }
}
