package com.google.ads.interactivemedia.v3.internal;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.nio.ByteBuffer;
import java.util.UUID;

/* JADX INFO: loaded from: classes2.dex */
public final class zzkb extends zzkx {
    public zzkb(zzjj zzjjVar, String str, String str2, zzan zzanVar, int i10, int i11) {
        super(zzjjVar, "CgPRYuzQrSKB4HHU/qweoT6whjRKh5s88SYFeVTlix/HzZdKOZnoIu1auPhHwMiw", "UcPRGM0BZSE4Gd9/Us196LnIBiXWDE9D3TOlCfboVSQ=", zzanVar, i10, 24);
    }

    private final void zzc() {
        com.google.android.gms.ads.identifier.b bVarZzh = this.zza.zzh();
        if (bVarZzh == null) {
            return;
        }
        try {
            com.google.android.gms.ads.identifier.a aVarE = bVarZzh.e();
            String id2 = aVarE.getId();
            int i10 = zzjm.zza;
            if (id2 != null && id2.matches("^[a-fA-F0-9]{8}-([a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12}$")) {
                UUID uuidFromString = UUID.fromString(id2);
                byte[] bArr = new byte[16];
                ByteBuffer byteBufferWrap = ByteBuffer.wrap(bArr);
                byteBufferWrap.putLong(uuidFromString.getMostSignificantBits());
                byteBufferWrap.putLong(uuidFromString.getLeastSignificantBits());
                id2 = zzgl.zza(bArr, true);
            }
            if (id2 != null) {
                synchronized (this.zzd) {
                    this.zzd.zzs(id2);
                    this.zzd.zzr(aVarE.f7871a);
                    this.zzd.zzab(6);
                }
            }
        } catch (IOException unused) {
        }
    }

    @Override // com.google.ads.interactivemedia.v3.internal.zzkx, java.util.concurrent.Callable
    public final /* bridge */ /* synthetic */ Object call() throws Exception {
        zze();
        return null;
    }

    @Override // com.google.ads.interactivemedia.v3.internal.zzkx
    public final void zza() throws IllegalAccessException, InvocationTargetException {
        if (this.zza.zzq()) {
            zzc();
            return;
        }
        synchronized (this.zzd) {
            this.zzd.zzs((String) this.zze.invoke(null, this.zza.zzb()));
        }
    }

    @Override // com.google.ads.interactivemedia.v3.internal.zzkx
    public final Void zze() throws Exception {
        if (this.zza.zzr()) {
            super.zze();
            return null;
        }
        if (this.zza.zzq()) {
            zzc();
        }
        return null;
    }
}
