64 lines
1.7 KiB
Java
64 lines
1.7 KiB
Java
|
package com.google.android.gms.internal.common;
|
||
|
|
||
|
import android.os.BadParcelableException;
|
||
|
import android.os.IInterface;
|
||
|
import android.os.Parcel;
|
||
|
import android.os.Parcelable;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class zzc {
|
||
|
private static final ClassLoader zza = zzc.class.getClassLoader();
|
||
|
|
||
|
public static Parcelable zza(Parcel parcel, Parcelable.Creator creator) {
|
||
|
if (parcel.readInt() == 0) {
|
||
|
return null;
|
||
|
}
|
||
|
return (Parcelable) creator.createFromParcel(parcel);
|
||
|
}
|
||
|
|
||
|
public static void zzb(Parcel parcel) {
|
||
|
int dataAvail = parcel.dataAvail();
|
||
|
if (dataAvail <= 0) {
|
||
|
return;
|
||
|
}
|
||
|
throw new BadParcelableException("Parcel data not fully consumed, unread size: " + dataAvail);
|
||
|
}
|
||
|
|
||
|
public static void zzc(Parcel parcel, boolean z) {
|
||
|
parcel.writeInt(z ? 1 : 0);
|
||
|
}
|
||
|
|
||
|
public static void zzd(Parcel parcel, Parcelable parcelable) {
|
||
|
if (parcelable == null) {
|
||
|
parcel.writeInt(0);
|
||
|
} else {
|
||
|
parcel.writeInt(1);
|
||
|
parcelable.writeToParcel(parcel, 0);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static void zze(Parcel parcel, Parcelable parcelable) {
|
||
|
if (parcelable == null) {
|
||
|
parcel.writeInt(0);
|
||
|
} else {
|
||
|
parcel.writeInt(1);
|
||
|
parcelable.writeToParcel(parcel, 1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static void zzf(Parcel parcel, IInterface iInterface) {
|
||
|
if (iInterface == null) {
|
||
|
parcel.writeStrongBinder(null);
|
||
|
} else {
|
||
|
parcel.writeStrongBinder(iInterface.asBinder());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static boolean zzg(Parcel parcel) {
|
||
|
return parcel.readInt() != 0;
|
||
|
}
|
||
|
|
||
|
private zzc() {
|
||
|
}
|
||
|
}
|