package com.google.android.gms.common; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import android.os.RemoteException; import android.util.Log; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter; import com.google.android.gms.dynamic.IObjectWrapper; import com.google.android.gms.dynamic.ObjectWrapper; /* loaded from: classes.dex */ public final class zzk extends AbstractSafeParcelable { public static final Parcelable.Creator CREATOR = new zzl(); private final boolean zzaa; private final String zzy; private final zze zzz; zzk(String str, IBinder iBinder, boolean z) { this.zzy = str; this.zzz = zza(iBinder); this.zzaa = z; } private static zze zza(IBinder iBinder) { if (iBinder == null) { return null; } try { IObjectWrapper h = com.google.android.gms.common.internal.zzj.a(iBinder).h(); byte[] bArr = h == null ? null : (byte[]) ObjectWrapper.a(h); if (bArr != null) { return new zzf(bArr); } Log.e("GoogleCertificatesQuery", "Could not unwrap certificate"); return null; } catch (RemoteException e) { Log.e("GoogleCertificatesQuery", "Could not unwrap certificate", e); return null; } } @Override // android.os.Parcelable public final void writeToParcel(Parcel parcel, int i) { int a = SafeParcelWriter.a(parcel); SafeParcelWriter.a(parcel, 1, this.zzy, false); zze zzeVar = this.zzz; if (zzeVar == null) { Log.w("GoogleCertificatesQuery", "certificate binder is null"); zzeVar = null; } else { zzeVar.asBinder(); } SafeParcelWriter.a(parcel, 2, (IBinder) zzeVar, false); SafeParcelWriter.a(parcel, 3, this.zzaa); SafeParcelWriter.a(parcel, a); } zzk(String str, zze zzeVar, boolean z) { this.zzy = str; this.zzz = zzeVar; this.zzaa = z; } }