package com.google.android.gms.analytics; import android.net.Uri; import android.text.TextUtils; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.internal.gtm.zzad; import com.google.android.gms.internal.gtm.zzap; import com.google.android.gms.internal.gtm.zzz; import java.util.ListIterator; /* loaded from: classes.dex */ public class zza extends zzj { private final zzap zzrb; private boolean zzrc; public zza(zzap zzapVar) { super(zzapVar.zzcq(), zzapVar.zzcn()); this.zzrb = zzapVar; } @Override // com.google.android.gms.analytics.zzj public final zzg zzac() { zzg zzai = this.zzso.zzai(); zzai.zza(this.zzrb.zzcy().zzdv()); zzai.zza(this.zzrb.zzcz().zzfa()); zzd(zzai); return zzai; } /* JADX INFO: Access modifiers changed from: protected */ @Override // com.google.android.gms.analytics.zzj public final void zza(zzg zzgVar) { zzz zzzVar = (zzz) zzgVar.zzb(zzz.class); if (TextUtils.isEmpty(zzzVar.zzbt())) { zzzVar.setClientId(this.zzrb.zzdh().zzeh()); } if (this.zzrc && TextUtils.isEmpty(zzzVar.zzbv())) { zzad zzdg = this.zzrb.zzdg(); zzzVar.zzm(zzdg.zzcd()); zzzVar.zza(zzdg.zzbw()); } } public final void zza(String str) { Preconditions.checkNotEmpty(str); Uri zzb = zzb.zzb(str); ListIterator listIterator = this.zzso.zzak().listIterator(); while (listIterator.hasNext()) { if (zzb.equals(listIterator.next().zzae())) { listIterator.remove(); } } this.zzso.zzak().add(new zzb(this.zzrb, str)); } /* JADX INFO: Access modifiers changed from: package-private */ public final zzap zzab() { return this.zzrb; } public final void enableAdvertisingIdCollection(boolean z) { this.zzrc = z; } }