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

import android.net.NetworkCapabilities;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;

/* JADX INFO: loaded from: classes2.dex */
public final class hh implements ji1 {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final nh1 f12157b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final rh f12158c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final zzbad f12159d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final xg f12160e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final th f12161f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final nh f12162g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final gh f12163h;

    public hh(@NonNull dh1 dh1Var, @NonNull nh1 nh1Var, @NonNull rh rhVar, @NonNull zzbad zzbadVar, @Nullable xg xgVar, @Nullable th thVar, @Nullable nh nhVar, @Nullable gh ghVar) {
        this.f12156a = dh1Var;
        this.f12157b = nh1Var;
        this.f12158c = rhVar;
        this.f12159d = zzbadVar;
        this.f12160e = xgVar;
        this.f12161f = thVar;
        this.f12162g = nhVar;
        this.f12163h = ghVar;
    }

    /* JADX WARN: Removed duplicated region for block: B:28:0x011c A[Catch: all -> 0x0100, DONT_GENERATE, TRY_LEAVE, TryCatch #0 {all -> 0x0100, blocks: (B:12:0x00f1, B:14:0x00f5, B:16:0x00fc, B:20:0x0102, B:22:0x010b, B:24:0x010f, B:26:0x0118, B:28:0x011c), top: B:41:0x00f1 }] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final HashMap a() {
        long j10;
        HashMap map = new HashMap();
        dh1 dh1Var = this.f12156a;
        nh1 nh1Var = this.f12157b;
        mh1 mh1Var = nh1Var.f14613d;
        w8.t tVar = nh1Var.f14614e;
        mh1Var.getClass();
        pf pfVar = mh1.f14237a;
        if (tVar.j()) {
            pfVar = (pf) tVar.g();
        }
        gh1 gh1Var = (gh1) dh1Var;
        map.put("v", gh1Var.f11744a);
        map.put("gms", Boolean.valueOf(gh1Var.f11746c));
        map.put("gv", Long.valueOf(pfVar.y0()));
        map.put("int", pfVar.w0());
        map.put("attts", Long.valueOf(pfVar.B0().C()));
        map.put("att", pfVar.B0().E());
        map.put("attkid", pfVar.B0().D());
        map.put("up", Boolean.valueOf(this.f12159d.f19503a));
        map.put("t", new Throwable());
        nh nhVar = this.f12162g;
        if (nhVar != null) {
            map.put("tcq", Long.valueOf(nhVar.f14599a));
            map.put("tpq", Long.valueOf(nhVar.f14600b));
            map.put("tcv", Long.valueOf(nhVar.f14601c));
            map.put("tpv", Long.valueOf(nhVar.f14602d));
            map.put("tchv", Long.valueOf(nhVar.f14603e));
            map.put("tphv", Long.valueOf(nhVar.f14604f));
            map.put("tcc", Long.valueOf(nhVar.f14605g));
            map.put("tpc", Long.valueOf(nhVar.f14606h));
            xg xgVar = this.f12160e;
            if (xgVar != null) {
                synchronized (xg.class) {
                    try {
                        NetworkCapabilities networkCapabilities = xgVar.f18427a;
                        if (networkCapabilities == null) {
                            j10 = -1;
                        } else if (networkCapabilities.hasTransport(4)) {
                            j10 = 2;
                        } else if (xgVar.f18427a.hasTransport(1)) {
                            j10 = 1;
                        } else if (xgVar.f18427a.hasTransport(0)) {
                            j10 = 0;
                        }
                    } finally {
                    }
                }
                map.put("nt", Long.valueOf(j10));
            }
            th thVar = this.f12161f;
            if (thVar != null) {
                map.put("vs", Long.valueOf(thVar.f16898d ? thVar.f16896b - thVar.f16895a : -1L));
                long j11 = thVar.f16897c;
                thVar.f16897c = -1L;
                map.put("vf", Long.valueOf(j11));
            }
        }
        return map;
    }

    @Override // com.google.android.gms.internal.ads.ji1
    public final HashMap zzb() {
        return a();
    }

    @Override // com.google.android.gms.internal.ads.ji1
    public final HashMap zzc() {
        HashMap mapA = a();
        gh ghVar = this.f12163h;
        if (ghVar != null) {
            List list = ghVar.f11743a;
            ghVar.f11743a = Collections.emptyList();
            mapA.put("vst", list);
        }
        return mapA;
    }

    @Override // com.google.android.gms.internal.ads.ji1
    public final HashMap zzd() {
        HashMap mapA = a();
        rh rhVar = this.f12158c;
        if (rhVar.f16145i <= -2 && rhVar.zzb() == null) {
            rhVar.f16145i = -3L;
        }
        mapA.put("lts", Long.valueOf(rhVar.f16145i));
        return mapA;
    }

    @Override // com.google.android.gms.internal.ads.ji1
    public final HashMap zze() {
        HashMap map = new HashMap();
        map.put("t", new Throwable());
        return map;
    }
}
