package com.google.android.gms.measurement.internal; import android.os.RemoteException; import android.text.TextUtils; /* loaded from: classes.dex */ final class zzem implements Runnable { private final /* synthetic */ boolean a; private final /* synthetic */ boolean b; private final /* synthetic */ zzag c; private final /* synthetic */ zzk d; private final /* synthetic */ String e; private final /* synthetic */ zzeb f; zzem(zzeb zzebVar, boolean z, boolean z2, zzag zzagVar, zzk zzkVar, String str) { this.f = zzebVar; this.a = z; this.b = z2; this.c = zzagVar; this.d = zzkVar; this.e = str; } @Override // java.lang.Runnable public final void run() { zzaj zzajVar; zzajVar = this.f.d; if (zzajVar == null) { this.f.e().t().a("Discarding data. Failed to send event to service"); return; } if (this.a) { this.f.a(zzajVar, this.b ? null : this.c, this.d); } else { try { if (TextUtils.isEmpty(this.e)) { zzajVar.a(this.c, this.d); } else { zzajVar.a(this.c, this.e, this.f.e().C()); } } catch (RemoteException e) { this.f.e().t().a("Failed to send event to the service", e); } } this.f.H(); } }