package com.google.android.gms.internal.measurement;

import android.content.Context;
import android.os.Bundle;
import com.google.android.gms.dynamite.DynamiteModule$LoadingException;
import com.google.android.gms.dynamite.descriptors.com.google.android.gms.measurement.dynamite.ModuleDescriptor;

/* JADX INFO: loaded from: classes2.dex */
public final class f1 extends g1 {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ String f20186e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ String f20187f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final /* synthetic */ Context f20188g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final /* synthetic */ Bundle f20189h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final /* synthetic */ j1 f20190i;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public f1(j1 j1Var, String str, String str2, Context context, Bundle bundle) {
        super(j1Var, true);
        this.f20186e = str;
        this.f20187f = str2;
        this.f20188g = context;
        this.f20189h = bundle;
        this.f20190i = j1Var;
    }

    @Override // com.google.android.gms.internal.measurement.g1
    public final void a() {
        boolean z10;
        String str;
        String str2;
        String str3;
        try {
            j1 j1Var = this.f20190i;
            String str4 = this.f20186e;
            String str5 = this.f20187f;
            j1Var.getClass();
            if (str5 == null || str4 == null) {
                z10 = false;
            } else {
                try {
                    Class.forName("com.google.firebase.analytics.FirebaseAnalytics", false, j1.class.getClassLoader());
                    z10 = false;
                } catch (ClassNotFoundException unused) {
                    z10 = true;
                }
            }
            t0 t0VarAsInterface = null;
            if (z10) {
                str3 = this.f20187f;
                str2 = this.f20186e;
                str = this.f20190i.f20248a;
            } else {
                str = null;
                str2 = null;
                str3 = null;
            }
            com.google.android.gms.common.internal.w.checkNotNull(this.f20188g);
            j1 j1Var2 = this.f20190i;
            Context context = this.f20188g;
            j1Var2.getClass();
            try {
                t0VarAsInterface = w0.asInterface(l8.c.c(context, l8.c.f30168c, ModuleDescriptor.MODULE_ID).b("com.google.android.gms.measurement.internal.AppMeasurementDynamiteService"));
            } catch (DynamiteModule$LoadingException e10) {
                j1Var2.e(e10, true, false);
            }
            j1Var2.f20256i = t0VarAsInterface;
            if (this.f20190i.f20256i == null) {
                String str6 = this.f20190i.f20248a;
                return;
            }
            int iA = l8.c.a(this.f20188g, ModuleDescriptor.MODULE_ID);
            ((t0) com.google.android.gms.common.internal.w.checkNotNull(this.f20190i.f20256i)).initialize(new k8.b(this.f20188g), new e1(106000L, Math.max(iA, r2), l8.c.d(this.f20188g, ModuleDescriptor.MODULE_ID, false) < iA, str, str2, str3, this.f20189h, com.google.android.gms.measurement.internal.h1.a(this.f20188g)), this.f20199a);
        } catch (Exception e11) {
            this.f20190i.e(e11, true, false);
        }
    }
}
