- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
54 lines
1.9 KiB
Java
54 lines
1.9 KiB
Java
package com.google.android.gms.common.data;
|
|
|
|
import android.content.ContentValues;
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import androidx.annotation.NonNull;
|
|
import com.google.android.gms.common.annotation.KeepForSdk;
|
|
import com.google.android.gms.common.data.DataHolder;
|
|
import com.google.android.gms.common.internal.Preconditions;
|
|
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
|
|
|
@KeepForSdk
|
|
/* loaded from: classes2.dex */
|
|
public class DataBufferSafeParcelable<T extends SafeParcelable> extends AbstractDataBuffer<T> {
|
|
private static final String[] zaa = {"data"};
|
|
private final Parcelable.Creator zab;
|
|
|
|
@KeepForSdk
|
|
public DataBufferSafeParcelable(@NonNull DataHolder dataHolder, @NonNull Parcelable.Creator<T> creator) {
|
|
super(dataHolder);
|
|
this.zab = creator;
|
|
}
|
|
|
|
@KeepForSdk
|
|
public static <T extends SafeParcelable> void addValue(@NonNull DataHolder.Builder builder, @NonNull T t) {
|
|
Parcel obtain = Parcel.obtain();
|
|
t.writeToParcel(obtain, 0);
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("data", obtain.marshall());
|
|
builder.withRow(contentValues);
|
|
obtain.recycle();
|
|
}
|
|
|
|
@NonNull
|
|
@KeepForSdk
|
|
public static DataHolder.Builder buildDataHolder() {
|
|
return DataHolder.builder(zaa);
|
|
}
|
|
|
|
@Override // com.google.android.gms.common.data.AbstractDataBuffer, com.google.android.gms.common.data.DataBuffer
|
|
@NonNull
|
|
@KeepForSdk
|
|
public T get(int i) {
|
|
DataHolder dataHolder = (DataHolder) Preconditions.checkNotNull(this.mDataHolder);
|
|
byte[] byteArray = dataHolder.getByteArray("data", i, dataHolder.getWindowIndex(i));
|
|
Parcel obtain = Parcel.obtain();
|
|
obtain.unmarshall(byteArray, 0, byteArray.length);
|
|
obtain.setDataPosition(0);
|
|
T t = (T) this.zab.createFromParcel(obtain);
|
|
obtain.recycle();
|
|
return t;
|
|
}
|
|
}
|