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

import android.os.Bundle;
import android.text.TextUtils;
import java.util.Iterator;

/* JADX INFO: loaded from: classes2.dex */
public final class v {

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

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

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

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

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

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

    public v(m1 m1Var, String str, String str2, String str3, long j10, long j11, Bundle bundle) {
        x xVar;
        com.google.android.gms.common.internal.w.checkNotEmpty(str2);
        com.google.android.gms.common.internal.w.checkNotEmpty(str3);
        this.f21934a = str2;
        this.f21935b = str3;
        this.f21936c = TextUtils.isEmpty(str) ? null : str;
        this.f21937d = j10;
        this.f21938e = j11;
        if (j11 != 0 && j11 > j10) {
            p0 p0Var = m1Var.f21757i;
            m1.d(p0Var);
            p0Var.f21837i.b(p0.A(str2), "Event created with reverse previous/current timestamps. appId");
        }
        if (bundle == null || bundle.isEmpty()) {
            xVar = new x(new Bundle());
        } else {
            Bundle bundle2 = new Bundle(bundle);
            Iterator<String> it = bundle2.keySet().iterator();
            while (it.hasNext()) {
                String next = it.next();
                if (next == null) {
                    p0 p0Var2 = m1Var.f21757i;
                    m1.d(p0Var2);
                    p0Var2.f21834f.c("Param name can't be null");
                    it.remove();
                } else {
                    n4 n4Var = m1Var.f21760l;
                    m1.c(n4Var);
                    Object objP0 = n4Var.p0(bundle2.get(next), next);
                    if (objP0 == null) {
                        p0 p0Var3 = m1Var.f21757i;
                        m1.d(p0Var3);
                        p0Var3.f21837i.b(m1Var.f21761m.f(next), "Param value can't be null");
                        it.remove();
                    } else {
                        n4 n4Var2 = m1Var.f21760l;
                        m1.c(n4Var2);
                        n4Var2.P(bundle2, next, objP0);
                    }
                }
            }
            xVar = new x(bundle2);
        }
        this.f21939f = xVar;
    }

    public final v a(m1 m1Var, long j10) {
        return new v(m1Var, this.f21936c, this.f21934a, this.f21935b, this.f21937d, j10, this.f21939f);
    }

    public final String toString() {
        String strValueOf = String.valueOf(this.f21939f);
        StringBuilder sb = new StringBuilder("Event{appId='");
        sb.append(this.f21934a);
        sb.append("', name='");
        return com.bytedance.sdk.component.adexpress.dynamic.dynamicview.b.h(sb, this.f21935b, "', params=", strValueOf, "}");
    }

    public v(m1 m1Var, String str, String str2, String str3, long j10, long j11, x xVar) {
        com.google.android.gms.common.internal.w.checkNotEmpty(str2);
        com.google.android.gms.common.internal.w.checkNotEmpty(str3);
        com.google.android.gms.common.internal.w.checkNotNull(xVar);
        this.f21934a = str2;
        this.f21935b = str3;
        this.f21936c = TextUtils.isEmpty(str) ? null : str;
        this.f21937d = j10;
        this.f21938e = j11;
        if (j11 != 0 && j11 > j10) {
            p0 p0Var = m1Var.f21757i;
            m1.d(p0Var);
            p0Var.f21837i.a(p0.A(str2), p0.A(str3), "Event created with reverse previous/current timestamps. appId, name");
        }
        this.f21939f = xVar;
    }
}
