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; import javax.annotation.Nullable; /* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */ /* JADX INFO: loaded from: classes2.dex */ public final class zzs extends AbstractSafeParcelable { public static final Parcelable.Creator CREATOR = new zzt(); private final String zza; @Nullable private final zzj zzb; private final boolean zzc; private final boolean zzd; zzs(String str, @Nullable IBinder iBinder, boolean z, boolean z2) { this.zza = str; zzk zzkVar = null; if (iBinder != null) { try { IObjectWrapper iObjectWrapperZzd = com.google.android.gms.common.internal.zzz.zzg(iBinder).zzd(); byte[] bArr = iObjectWrapperZzd == null ? null : (byte[]) ObjectWrapper.unwrap(iObjectWrapperZzd); if (bArr != null) { zzkVar = new zzk(bArr); } else { Log.e("GoogleCertificatesQuery", "Could not unwrap certificate"); } } catch (RemoteException e) { Log.e("GoogleCertificatesQuery", "Could not unwrap certificate", e); } } this.zzb = zzkVar; this.zzc = z; this.zzd = z2; } zzs(String str, @Nullable zzj zzjVar, boolean z, boolean z2) { this.zza = str; this.zzb = zzjVar; this.zzc = z; this.zzd = z2; } @Override // android.os.Parcelable public final void writeToParcel(Parcel parcel, int i) { String str = this.zza; int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel); SafeParcelWriter.writeString(parcel, 1, str, false); zzj zzjVar = this.zzb; if (zzjVar == null) { Log.w("GoogleCertificatesQuery", "certificate binder is null"); zzjVar = null; } SafeParcelWriter.writeIBinder(parcel, 2, zzjVar, false); SafeParcelWriter.writeBoolean(parcel, 3, this.zzc); SafeParcelWriter.writeBoolean(parcel, 4, this.zzd); SafeParcelWriter.finishObjectHeader(parcel, iBeginObjectHeader); } }