Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import java.util.Iterator;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class AbstractDataBuffer<T> implements DataBuffer<T> {
|
||||
|
||||
@KeepForSdk
|
||||
protected final DataHolder mDataHolder;
|
||||
|
||||
@KeepForSdk
|
||||
public AbstractDataBuffer(DataHolder dataHolder) {
|
||||
this.mDataHolder = dataHolder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBuffer, java.io.Closeable, java.lang.AutoCloseable
|
||||
public final void close() {
|
||||
release();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public abstract T get(int i);
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public int getCount() {
|
||||
DataHolder dataHolder = this.mDataHolder;
|
||||
if (dataHolder == null) {
|
||||
return 0;
|
||||
}
|
||||
return dataHolder.getCount();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public final Bundle getMetadata() {
|
||||
DataHolder dataHolder = this.mDataHolder;
|
||||
if (dataHolder == null) {
|
||||
return null;
|
||||
}
|
||||
return dataHolder.getMetadata();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
@Deprecated
|
||||
public boolean isClosed() {
|
||||
DataHolder dataHolder = this.mDataHolder;
|
||||
return dataHolder == null || dataHolder.isClosed();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBuffer, java.lang.Iterable
|
||||
public Iterator<T> iterator() {
|
||||
return new DataBufferIterator(this);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBuffer, com.google.android.gms.common.api.Releasable
|
||||
public void release() {
|
||||
DataHolder dataHolder = this.mDataHolder;
|
||||
if (dataHolder != null) {
|
||||
dataHolder.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public Iterator<T> singleRefIterator() {
|
||||
return new SingleRefDataBufferIterator(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Parcel;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ReflectedParcelable;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.Closeable;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@SafeParcelable.Class(creator = "BitmapTeleporterCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public class BitmapTeleporter extends AbstractSafeParcelable implements ReflectedParcelable {
|
||||
|
||||
@KeepForSdk
|
||||
public static final Parcelable.Creator<BitmapTeleporter> CREATOR = new zaa();
|
||||
|
||||
@SafeParcelable.VersionField(id = 1)
|
||||
final int zaa;
|
||||
|
||||
@SafeParcelable.Field(id = 2)
|
||||
ParcelFileDescriptor zab;
|
||||
|
||||
@SafeParcelable.Field(id = 3)
|
||||
final int zac;
|
||||
private Bitmap zad;
|
||||
private boolean zae;
|
||||
private File zaf;
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public BitmapTeleporter(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) ParcelFileDescriptor parcelFileDescriptor, @SafeParcelable.Param(id = 3) int i4) {
|
||||
this.zaa = i;
|
||||
this.zab = parcelFileDescriptor;
|
||||
this.zac = i4;
|
||||
this.zad = null;
|
||||
this.zae = false;
|
||||
}
|
||||
|
||||
private static final void zaa(Closeable closeable) {
|
||||
try {
|
||||
closeable.close();
|
||||
} catch (IOException e4) {
|
||||
Log.w("BitmapTeleporter", "Could not close stream", e4);
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Bitmap get() {
|
||||
if (!this.zae) {
|
||||
DataInputStream dataInputStream = new DataInputStream(new ParcelFileDescriptor.AutoCloseInputStream((ParcelFileDescriptor) Preconditions.checkNotNull(this.zab)));
|
||||
try {
|
||||
try {
|
||||
byte[] bArr = new byte[dataInputStream.readInt()];
|
||||
int readInt = dataInputStream.readInt();
|
||||
int readInt2 = dataInputStream.readInt();
|
||||
Bitmap.Config valueOf = Bitmap.Config.valueOf(dataInputStream.readUTF());
|
||||
dataInputStream.read(bArr);
|
||||
zaa(dataInputStream);
|
||||
ByteBuffer wrap = ByteBuffer.wrap(bArr);
|
||||
Bitmap createBitmap = Bitmap.createBitmap(readInt, readInt2, valueOf);
|
||||
createBitmap.copyPixelsFromBuffer(wrap);
|
||||
this.zad = createBitmap;
|
||||
this.zae = true;
|
||||
} catch (IOException e4) {
|
||||
throw new IllegalStateException("Could not read from parcel file descriptor", e4);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
zaa(dataInputStream);
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return this.zad;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void release() {
|
||||
if (this.zae) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
((ParcelFileDescriptor) Preconditions.checkNotNull(this.zab)).close();
|
||||
} catch (IOException e4) {
|
||||
Log.w("BitmapTeleporter", "Could not close PFD", e4);
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void setTempDir(File file) {
|
||||
if (file == null) {
|
||||
throw new NullPointerException("Cannot set null temp directory");
|
||||
}
|
||||
this.zaf = file;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
if (this.zab == null) {
|
||||
Bitmap bitmap = (Bitmap) Preconditions.checkNotNull(this.zad);
|
||||
ByteBuffer allocate = ByteBuffer.allocate(bitmap.getHeight() * bitmap.getRowBytes());
|
||||
bitmap.copyPixelsToBuffer(allocate);
|
||||
byte[] array = allocate.array();
|
||||
File file = this.zaf;
|
||||
if (file == null) {
|
||||
throw new IllegalStateException("setTempDir() must be called before writing this object to a parcel");
|
||||
}
|
||||
try {
|
||||
File createTempFile = File.createTempFile("teleporter", ".tmp", file);
|
||||
try {
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(createTempFile);
|
||||
this.zab = ParcelFileDescriptor.open(createTempFile, 268435456);
|
||||
createTempFile.delete();
|
||||
DataOutputStream dataOutputStream = new DataOutputStream(new BufferedOutputStream(fileOutputStream));
|
||||
try {
|
||||
try {
|
||||
dataOutputStream.writeInt(array.length);
|
||||
dataOutputStream.writeInt(bitmap.getWidth());
|
||||
dataOutputStream.writeInt(bitmap.getHeight());
|
||||
dataOutputStream.writeUTF(bitmap.getConfig().toString());
|
||||
dataOutputStream.write(array);
|
||||
} catch (IOException e4) {
|
||||
throw new IllegalStateException("Could not write into unlinked file", e4);
|
||||
}
|
||||
} finally {
|
||||
zaa(dataOutputStream);
|
||||
}
|
||||
} catch (FileNotFoundException unused) {
|
||||
throw new IllegalStateException("Temporary file is somehow already deleted");
|
||||
}
|
||||
} catch (IOException e5) {
|
||||
throw new IllegalStateException("Could not create temporary file", e5);
|
||||
}
|
||||
}
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, this.zaa);
|
||||
SafeParcelWriter.writeParcelable(parcel, 2, this.zab, i | 1, false);
|
||||
SafeParcelWriter.writeInt(parcel, 3, this.zac);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
this.zab = null;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public BitmapTeleporter(Bitmap bitmap) {
|
||||
this.zaa = 1;
|
||||
this.zab = null;
|
||||
this.zac = 0;
|
||||
this.zad = bitmap;
|
||||
this.zae = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Releasable;
|
||||
import java.io.Closeable;
|
||||
import java.util.Iterator;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DataBuffer<T> extends Iterable<T>, Releasable, Closeable {
|
||||
void close();
|
||||
|
||||
T get(int i);
|
||||
|
||||
int getCount();
|
||||
|
||||
@KeepForSdk
|
||||
Bundle getMetadata();
|
||||
|
||||
@Deprecated
|
||||
boolean isClosed();
|
||||
|
||||
@Override // java.lang.Iterable
|
||||
Iterator<T> iterator();
|
||||
|
||||
void release();
|
||||
|
||||
Iterator<T> singleRefIterator();
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class DataBufferIterator<T> implements Iterator<T> {
|
||||
protected final DataBuffer zaa;
|
||||
protected int zab = -1;
|
||||
|
||||
public DataBufferIterator(DataBuffer dataBuffer) {
|
||||
this.zaa = (DataBuffer) Preconditions.checkNotNull(dataBuffer);
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public final boolean hasNext() {
|
||||
return this.zab < this.zaa.getCount() + (-1);
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public Object next() {
|
||||
if (!hasNext()) {
|
||||
throw new NoSuchElementException(a.l(this.zab, "Cannot advance the iterator beyond "));
|
||||
}
|
||||
DataBuffer dataBuffer = this.zaa;
|
||||
int i = this.zab + 1;
|
||||
this.zab = i;
|
||||
return dataBuffer.get(i);
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public final void remove() {
|
||||
throw new UnsupportedOperationException("Cannot remove elements from a DataBufferIterator");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DataBufferObserver {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Observable {
|
||||
void addObserver(DataBufferObserver dataBufferObserver);
|
||||
|
||||
void removeObserver(DataBufferObserver dataBufferObserver);
|
||||
}
|
||||
|
||||
void onDataChanged();
|
||||
|
||||
void onDataRangeChanged(int i, int i4);
|
||||
|
||||
void onDataRangeInserted(int i, int i4);
|
||||
|
||||
void onDataRangeMoved(int i, int i4, int i5);
|
||||
|
||||
void onDataRangeRemoved(int i, int i4);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import com.google.android.gms.common.data.DataBufferObserver;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DataBufferObserverSet implements DataBufferObserver, DataBufferObserver.Observable {
|
||||
private HashSet zaa = new HashSet();
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBufferObserver.Observable
|
||||
public void addObserver(DataBufferObserver dataBufferObserver) {
|
||||
this.zaa.add(dataBufferObserver);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
this.zaa.clear();
|
||||
}
|
||||
|
||||
public boolean hasObservers() {
|
||||
return !this.zaa.isEmpty();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||||
public void onDataChanged() {
|
||||
Iterator it = this.zaa.iterator();
|
||||
while (it.hasNext()) {
|
||||
((DataBufferObserver) it.next()).onDataChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||||
public void onDataRangeChanged(int i, int i4) {
|
||||
Iterator it = this.zaa.iterator();
|
||||
while (it.hasNext()) {
|
||||
((DataBufferObserver) it.next()).onDataRangeChanged(i, i4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||||
public void onDataRangeInserted(int i, int i4) {
|
||||
Iterator it = this.zaa.iterator();
|
||||
while (it.hasNext()) {
|
||||
((DataBufferObserver) it.next()).onDataRangeInserted(i, i4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||||
public void onDataRangeMoved(int i, int i4, int i5) {
|
||||
Iterator it = this.zaa.iterator();
|
||||
while (it.hasNext()) {
|
||||
((DataBufferObserver) it.next()).onDataRangeMoved(i, i4, i5);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBufferObserver
|
||||
public void onDataRangeRemoved(int i, int i4) {
|
||||
Iterator it = this.zaa.iterator();
|
||||
while (it.hasNext()) {
|
||||
((DataBufferObserver) it.next()).onDataRangeRemoved(i, i4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBufferObserver.Observable
|
||||
public void removeObserver(DataBufferObserver dataBufferObserver) {
|
||||
this.zaa.remove(dataBufferObserver);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.database.CharArrayBuffer;
|
||||
import android.net.Uri;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class DataBufferRef {
|
||||
|
||||
@KeepForSdk
|
||||
protected final DataHolder mDataHolder;
|
||||
|
||||
@KeepForSdk
|
||||
protected int mDataRow;
|
||||
private int zaa;
|
||||
|
||||
@KeepForSdk
|
||||
public DataBufferRef(DataHolder dataHolder, int i) {
|
||||
this.mDataHolder = (DataHolder) Preconditions.checkNotNull(dataHolder);
|
||||
zaa(i);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void copyToBuffer(String str, CharArrayBuffer charArrayBuffer) {
|
||||
this.mDataHolder.zac(str, this.mDataRow, this.zaa, charArrayBuffer);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof DataBufferRef) {
|
||||
DataBufferRef dataBufferRef = (DataBufferRef) obj;
|
||||
if (Objects.equal(Integer.valueOf(dataBufferRef.mDataRow), Integer.valueOf(this.mDataRow)) && Objects.equal(Integer.valueOf(dataBufferRef.zaa), Integer.valueOf(this.zaa)) && dataBufferRef.mDataHolder == this.mDataHolder) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean getBoolean(String str) {
|
||||
return this.mDataHolder.getBoolean(str, this.mDataRow, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public byte[] getByteArray(String str) {
|
||||
return this.mDataHolder.getByteArray(str, this.mDataRow, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int getDataRow() {
|
||||
return this.mDataRow;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public double getDouble(String str) {
|
||||
return this.mDataHolder.zaa(str, this.mDataRow, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public float getFloat(String str) {
|
||||
return this.mDataHolder.zab(str, this.mDataRow, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int getInteger(String str) {
|
||||
return this.mDataHolder.getInteger(str, this.mDataRow, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public long getLong(String str) {
|
||||
return this.mDataHolder.getLong(str, this.mDataRow, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getString(String str) {
|
||||
return this.mDataHolder.getString(str, this.mDataRow, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean hasColumn(String str) {
|
||||
return this.mDataHolder.hasColumn(str);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean hasNull(String str) {
|
||||
return this.mDataHolder.hasNull(str, this.mDataRow, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(Integer.valueOf(this.mDataRow), Integer.valueOf(this.zaa), this.mDataHolder);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isDataValid() {
|
||||
return !this.mDataHolder.isClosed();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Uri parseUri(String str) {
|
||||
String string = this.mDataHolder.getString(str, this.mDataRow, this.zaa);
|
||||
if (string == null) {
|
||||
return null;
|
||||
}
|
||||
return Uri.parse(string);
|
||||
}
|
||||
|
||||
public final void zaa(int i) {
|
||||
boolean z3 = false;
|
||||
if (i >= 0 && i < this.mDataHolder.getCount()) {
|
||||
z3 = true;
|
||||
}
|
||||
Preconditions.checkState(z3);
|
||||
this.mDataRow = i;
|
||||
this.zaa = this.mDataHolder.getWindowIndex(i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
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;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class DataBufferSafeParcelable<T extends SafeParcelable> extends AbstractDataBuffer<T> {
|
||||
private static final String[] zaa = {Constants.ScionAnalytics.MessageType.DATA_MESSAGE};
|
||||
private final Parcelable.Creator zab;
|
||||
|
||||
@KeepForSdk
|
||||
public DataBufferSafeParcelable(DataHolder dataHolder, Parcelable.Creator<T> creator) {
|
||||
super(dataHolder);
|
||||
this.zab = creator;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <T extends SafeParcelable> void addValue(DataHolder.Builder builder, T t2) {
|
||||
Parcel obtain = Parcel.obtain();
|
||||
t2.writeToParcel(obtain, 0);
|
||||
ContentValues contentValues = new ContentValues();
|
||||
contentValues.put(Constants.ScionAnalytics.MessageType.DATA_MESSAGE, obtain.marshall());
|
||||
builder.withRow(contentValues);
|
||||
obtain.recycle();
|
||||
}
|
||||
|
||||
@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
|
||||
@KeepForSdk
|
||||
public T get(int i) {
|
||||
DataHolder dataHolder = (DataHolder) Preconditions.checkNotNull(this.mDataHolder);
|
||||
byte[] byteArray = dataHolder.getByteArray(Constants.ScionAnalytics.MessageType.DATA_MESSAGE, i, dataHolder.getWindowIndex(i));
|
||||
Parcel obtain = Parcel.obtain();
|
||||
obtain.unmarshall(byteArray, 0, byteArray.length);
|
||||
obtain.setDataPosition(0);
|
||||
T t2 = (T) this.zab.createFromParcel(obtain);
|
||||
obtain.recycle();
|
||||
return t2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import kotlin.reflect.jvm.internal.impl.types.model.ArgumentList;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DataBufferUtils {
|
||||
|
||||
@KeepForSdk
|
||||
public static final String KEY_NEXT_PAGE_TOKEN = "next_page_token";
|
||||
|
||||
@KeepForSdk
|
||||
public static final String KEY_PREV_PAGE_TOKEN = "prev_page_token";
|
||||
|
||||
private DataBufferUtils() {
|
||||
}
|
||||
|
||||
public static <T, E extends Freezable<T>> ArrayList<T> freezeAndClose(DataBuffer<E> dataBuffer) {
|
||||
ArgumentList argumentList = (ArrayList<T>) new ArrayList(dataBuffer.getCount());
|
||||
try {
|
||||
Iterator<E> it = dataBuffer.iterator();
|
||||
while (it.hasNext()) {
|
||||
argumentList.add(it.next().freeze());
|
||||
}
|
||||
return argumentList;
|
||||
} finally {
|
||||
dataBuffer.close();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean hasData(DataBuffer<?> dataBuffer) {
|
||||
return dataBuffer != null && dataBuffer.getCount() > 0;
|
||||
}
|
||||
|
||||
public static boolean hasNextPage(DataBuffer<?> dataBuffer) {
|
||||
Bundle metadata = dataBuffer.getMetadata();
|
||||
return (metadata == null || metadata.getString(KEY_NEXT_PAGE_TOKEN) == null) ? false : true;
|
||||
}
|
||||
|
||||
public static boolean hasPrevPage(DataBuffer<?> dataBuffer) {
|
||||
Bundle metadata = dataBuffer.getMetadata();
|
||||
return (metadata == null || metadata.getString(KEY_PREV_PAGE_TOKEN) == null) ? false : true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,422 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.CharArrayBuffer;
|
||||
import android.database.CursorIndexOutOfBoundsException;
|
||||
import android.database.CursorWindow;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
import java.io.Closeable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@KeepForSdk
|
||||
@KeepName
|
||||
@SafeParcelable.Class(creator = "DataHolderCreator", validate = true)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DataHolder extends AbstractSafeParcelable implements Closeable {
|
||||
|
||||
@KeepForSdk
|
||||
public static final Parcelable.Creator<DataHolder> CREATOR = new zaf();
|
||||
private static final Builder zaf = new zab(new String[0], null);
|
||||
|
||||
@SafeParcelable.VersionField(id = 1000)
|
||||
final int zaa;
|
||||
Bundle zab;
|
||||
int[] zac;
|
||||
int zad;
|
||||
boolean zae;
|
||||
|
||||
@SafeParcelable.Field(getter = "getColumns", id = 1)
|
||||
private final String[] zag;
|
||||
|
||||
@SafeParcelable.Field(getter = "getWindows", id = 2)
|
||||
private final CursorWindow[] zah;
|
||||
|
||||
@SafeParcelable.Field(getter = "getStatusCode", id = 3)
|
||||
private final int zai;
|
||||
|
||||
@SafeParcelable.Field(getter = "getMetadata", id = 4)
|
||||
private final Bundle zaj;
|
||||
private boolean zak;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder {
|
||||
private final String[] zaa;
|
||||
private final ArrayList zab = new ArrayList();
|
||||
private final HashMap zac = new HashMap();
|
||||
|
||||
public /* synthetic */ Builder(String[] strArr, String str, zac zacVar) {
|
||||
this.zaa = (String[]) Preconditions.checkNotNull(strArr);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@KeepForSdk
|
||||
public DataHolder build(int i) {
|
||||
return new DataHolder(this, i);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder withRow(ContentValues contentValues) {
|
||||
Asserts.checkNotNull(contentValues);
|
||||
HashMap hashMap = new HashMap(contentValues.size());
|
||||
for (Map.Entry<String, Object> entry : contentValues.valueSet()) {
|
||||
hashMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
return zaa(hashMap);
|
||||
}
|
||||
|
||||
public Builder zaa(HashMap hashMap) {
|
||||
Asserts.checkNotNull(hashMap);
|
||||
this.zab.add(hashMap);
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public DataHolder build(int i, Bundle bundle) {
|
||||
return new DataHolder(this, i, bundle);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@KeepForSdk
|
||||
public static Builder builder(String[] strArr) {
|
||||
return new Builder(strArr, null, 0 == true ? 1 : 0);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static DataHolder empty(int i) {
|
||||
return new DataHolder(zaf, i, (Bundle) null);
|
||||
}
|
||||
|
||||
private final void zae(String str, int i) {
|
||||
Bundle bundle = this.zab;
|
||||
if (bundle == null || !bundle.containsKey(str)) {
|
||||
throw new IllegalArgumentException("No such column: ".concat(String.valueOf(str)));
|
||||
}
|
||||
if (isClosed()) {
|
||||
throw new IllegalArgumentException("Buffer is closed.");
|
||||
}
|
||||
if (i < 0 || i >= this.zad) {
|
||||
throw new CursorIndexOutOfBoundsException(i, this.zad);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:62:0x0136, code lost:
|
||||
|
||||
if (r5 != false) goto L68;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:63:0x0138, code lost:
|
||||
|
||||
android.util.Log.d("DataHolder", "Couldn't populate window data for row " + r4 + " - allocating new window.");
|
||||
r2.freeLastRow();
|
||||
r2 = new android.database.CursorWindow(false);
|
||||
r2.setStartPosition(r4);
|
||||
r2.setNumColumns(r13.zaa.length);
|
||||
r3.add(r2);
|
||||
r4 = r4 - 1;
|
||||
r5 = true;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:65:0x016a, code lost:
|
||||
|
||||
r4 = r4 + 1;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:68:0x0174, code lost:
|
||||
|
||||
throw new com.google.android.gms.common.data.zad("Could not add the value to a new CursorWindow. The size of value may be larger than what a CursorWindow can handle.");
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private static android.database.CursorWindow[] zaf(com.google.android.gms.common.data.DataHolder.Builder r13, int r14) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 405
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.data.DataHolder.zaf(com.google.android.gms.common.data.DataHolder$Builder, int):android.database.CursorWindow[]");
|
||||
}
|
||||
|
||||
@Override // java.io.Closeable, java.lang.AutoCloseable
|
||||
@KeepForSdk
|
||||
public void close() {
|
||||
synchronized (this) {
|
||||
try {
|
||||
if (!this.zae) {
|
||||
this.zae = true;
|
||||
int i = 0;
|
||||
while (true) {
|
||||
CursorWindow[] cursorWindowArr = this.zah;
|
||||
if (i >= cursorWindowArr.length) {
|
||||
break;
|
||||
}
|
||||
cursorWindowArr[i].close();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void finalize() throws Throwable {
|
||||
try {
|
||||
if (this.zak && this.zah.length > 0 && !isClosed()) {
|
||||
close();
|
||||
Log.e("DataBuffer", "Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: " + toString() + ")");
|
||||
}
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean getBoolean(String str, int i, int i4) {
|
||||
zae(str, i);
|
||||
return this.zah[i4].getLong(i, this.zab.getInt(str)) == 1;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public byte[] getByteArray(String str, int i, int i4) {
|
||||
zae(str, i);
|
||||
return this.zah[i4].getBlob(i, this.zab.getInt(str));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int getCount() {
|
||||
return this.zad;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int getInteger(String str, int i, int i4) {
|
||||
zae(str, i);
|
||||
return this.zah[i4].getInt(i, this.zab.getInt(str));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public long getLong(String str, int i, int i4) {
|
||||
zae(str, i);
|
||||
return this.zah[i4].getLong(i, this.zab.getInt(str));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Bundle getMetadata() {
|
||||
return this.zaj;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int getStatusCode() {
|
||||
return this.zai;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getString(String str, int i, int i4) {
|
||||
zae(str, i);
|
||||
return this.zah[i4].getString(i, this.zab.getInt(str));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int getWindowIndex(int i) {
|
||||
int length;
|
||||
int i4 = 0;
|
||||
Preconditions.checkState(i >= 0 && i < this.zad);
|
||||
while (true) {
|
||||
int[] iArr = this.zac;
|
||||
length = iArr.length;
|
||||
if (i4 >= length) {
|
||||
break;
|
||||
}
|
||||
if (i < iArr[i4]) {
|
||||
i4--;
|
||||
break;
|
||||
}
|
||||
i4++;
|
||||
}
|
||||
return i4 == length ? i4 - 1 : i4;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean hasColumn(String str) {
|
||||
return this.zab.containsKey(str);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean hasNull(String str, int i, int i4) {
|
||||
zae(str, i);
|
||||
return this.zah[i4].isNull(i, this.zab.getInt(str));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isClosed() {
|
||||
boolean z3;
|
||||
synchronized (this) {
|
||||
z3 = this.zae;
|
||||
}
|
||||
return z3;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeStringArray(parcel, 1, this.zag, false);
|
||||
SafeParcelWriter.writeTypedArray(parcel, 2, this.zah, i, false);
|
||||
SafeParcelWriter.writeInt(parcel, 3, getStatusCode());
|
||||
SafeParcelWriter.writeBundle(parcel, 4, getMetadata(), false);
|
||||
SafeParcelWriter.writeInt(parcel, 1000, this.zaa);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
if ((i & 1) != 0) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
public final double zaa(String str, int i, int i4) {
|
||||
zae(str, i);
|
||||
return this.zah[i4].getDouble(i, this.zab.getInt(str));
|
||||
}
|
||||
|
||||
public final float zab(String str, int i, int i4) {
|
||||
zae(str, i);
|
||||
return this.zah[i4].getFloat(i, this.zab.getInt(str));
|
||||
}
|
||||
|
||||
public final void zac(String str, int i, int i4, CharArrayBuffer charArrayBuffer) {
|
||||
zae(str, i);
|
||||
this.zah[i4].copyStringToBuffer(i, this.zab.getInt(str), charArrayBuffer);
|
||||
}
|
||||
|
||||
public final void zad() {
|
||||
this.zab = new Bundle();
|
||||
int i = 0;
|
||||
int i4 = 0;
|
||||
while (true) {
|
||||
String[] strArr = this.zag;
|
||||
if (i4 >= strArr.length) {
|
||||
break;
|
||||
}
|
||||
this.zab.putInt(strArr[i4], i4);
|
||||
i4++;
|
||||
}
|
||||
this.zac = new int[this.zah.length];
|
||||
int i5 = 0;
|
||||
while (true) {
|
||||
CursorWindow[] cursorWindowArr = this.zah;
|
||||
if (i >= cursorWindowArr.length) {
|
||||
this.zad = i5;
|
||||
return;
|
||||
}
|
||||
this.zac[i] = i5;
|
||||
i5 += this.zah[i].getNumRows() - (i5 - cursorWindowArr[i].getStartPosition());
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public DataHolder(@SafeParcelable.Param(id = 1000) int i, @SafeParcelable.Param(id = 1) String[] strArr, @SafeParcelable.Param(id = 2) CursorWindow[] cursorWindowArr, @SafeParcelable.Param(id = 3) int i4, @SafeParcelable.Param(id = 4) Bundle bundle) {
|
||||
this.zae = false;
|
||||
this.zak = true;
|
||||
this.zaa = i;
|
||||
this.zag = strArr;
|
||||
this.zah = cursorWindowArr;
|
||||
this.zai = i4;
|
||||
this.zaj = bundle;
|
||||
}
|
||||
|
||||
/* JADX WARN: Finally extract failed */
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
@com.google.android.gms.common.annotation.KeepForSdk
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public DataHolder(android.database.Cursor r8, int r9, android.os.Bundle r10) {
|
||||
/*
|
||||
r7 = this;
|
||||
com.google.android.gms.common.sqlite.CursorWrapper r0 = new com.google.android.gms.common.sqlite.CursorWrapper
|
||||
r0.<init>(r8)
|
||||
java.lang.String[] r8 = r0.getColumnNames()
|
||||
java.util.ArrayList r1 = new java.util.ArrayList
|
||||
r1.<init>()
|
||||
int r2 = r0.getCount() // Catch: java.lang.Throwable -> L2e
|
||||
android.database.CursorWindow r3 = r0.getWindow() // Catch: java.lang.Throwable -> L2e
|
||||
r4 = 0
|
||||
r5 = 0
|
||||
if (r3 == 0) goto L30
|
||||
int r6 = r3.getStartPosition() // Catch: java.lang.Throwable -> L2e
|
||||
if (r6 != 0) goto L30
|
||||
r3.acquireReference() // Catch: java.lang.Throwable -> L2e
|
||||
r0.setWindow(r4) // Catch: java.lang.Throwable -> L2e
|
||||
r1.add(r3) // Catch: java.lang.Throwable -> L2e
|
||||
int r3 = r3.getNumRows() // Catch: java.lang.Throwable -> L2e
|
||||
goto L31
|
||||
L2e:
|
||||
r7 = move-exception
|
||||
goto L78
|
||||
L30:
|
||||
r3 = r5
|
||||
L31:
|
||||
if (r3 >= r2) goto L65
|
||||
boolean r6 = r0.moveToPosition(r3) // Catch: java.lang.Throwable -> L2e
|
||||
if (r6 == 0) goto L65
|
||||
android.database.CursorWindow r6 = r0.getWindow() // Catch: java.lang.Throwable -> L2e
|
||||
if (r6 == 0) goto L46
|
||||
r6.acquireReference() // Catch: java.lang.Throwable -> L2e
|
||||
r0.setWindow(r4) // Catch: java.lang.Throwable -> L2e
|
||||
goto L51
|
||||
L46:
|
||||
android.database.CursorWindow r6 = new android.database.CursorWindow // Catch: java.lang.Throwable -> L2e
|
||||
r6.<init>(r5) // Catch: java.lang.Throwable -> L2e
|
||||
r6.setStartPosition(r3) // Catch: java.lang.Throwable -> L2e
|
||||
r0.fillWindow(r3, r6) // Catch: java.lang.Throwable -> L2e
|
||||
L51:
|
||||
int r3 = r6.getNumRows() // Catch: java.lang.Throwable -> L2e
|
||||
if (r3 != 0) goto L58
|
||||
goto L65
|
||||
L58:
|
||||
r1.add(r6) // Catch: java.lang.Throwable -> L2e
|
||||
int r3 = r6.getStartPosition() // Catch: java.lang.Throwable -> L2e
|
||||
int r6 = r6.getNumRows() // Catch: java.lang.Throwable -> L2e
|
||||
int r3 = r3 + r6
|
||||
goto L31
|
||||
L65:
|
||||
r0.close()
|
||||
int r0 = r1.size()
|
||||
android.database.CursorWindow[] r0 = new android.database.CursorWindow[r0]
|
||||
java.lang.Object[] r0 = r1.toArray(r0)
|
||||
android.database.CursorWindow[] r0 = (android.database.CursorWindow[]) r0
|
||||
r7.<init>(r8, r0, r9, r10)
|
||||
return
|
||||
L78:
|
||||
r0.close()
|
||||
throw r7
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.data.DataHolder.<init>(android.database.Cursor, int, android.os.Bundle):void");
|
||||
}
|
||||
|
||||
private DataHolder(Builder builder, int i, Bundle bundle) {
|
||||
this(builder.zaa, zaf(builder, -1), i, (Bundle) null);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public DataHolder(String[] strArr, CursorWindow[] cursorWindowArr, int i, Bundle bundle) {
|
||||
this.zae = false;
|
||||
this.zak = true;
|
||||
this.zaa = 1;
|
||||
this.zag = (String[]) Preconditions.checkNotNull(strArr);
|
||||
this.zah = (CursorWindow[]) Preconditions.checkNotNull(cursorWindowArr);
|
||||
this.zai = i;
|
||||
this.zaj = bundle;
|
||||
zad();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import C.w;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class EntityBuffer<T> extends AbstractDataBuffer<T> {
|
||||
private boolean zaa;
|
||||
private ArrayList zab;
|
||||
|
||||
@KeepForSdk
|
||||
public EntityBuffer(DataHolder dataHolder) {
|
||||
super(dataHolder);
|
||||
this.zaa = false;
|
||||
}
|
||||
|
||||
private final void zab() {
|
||||
synchronized (this) {
|
||||
try {
|
||||
if (!this.zaa) {
|
||||
int count = ((DataHolder) Preconditions.checkNotNull(this.mDataHolder)).getCount();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
this.zab = arrayList;
|
||||
if (count > 0) {
|
||||
arrayList.add(0);
|
||||
String primaryDataMarkerColumn = getPrimaryDataMarkerColumn();
|
||||
String string = this.mDataHolder.getString(primaryDataMarkerColumn, 0, this.mDataHolder.getWindowIndex(0));
|
||||
for (int i = 1; i < count; i++) {
|
||||
int windowIndex = this.mDataHolder.getWindowIndex(i);
|
||||
String string2 = this.mDataHolder.getString(primaryDataMarkerColumn, i, windowIndex);
|
||||
if (string2 == null) {
|
||||
throw new NullPointerException("Missing value for markerColumn: " + primaryDataMarkerColumn + ", at row: " + i + ", for window: " + windowIndex);
|
||||
}
|
||||
if (!string2.equals(string)) {
|
||||
this.zab.add(Integer.valueOf(i));
|
||||
string = string2;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.zaa = true;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.AbstractDataBuffer, com.google.android.gms.common.data.DataBuffer
|
||||
@KeepForSdk
|
||||
public final T get(int i) {
|
||||
int intValue;
|
||||
int intValue2;
|
||||
zab();
|
||||
int zaa = zaa(i);
|
||||
int i4 = 0;
|
||||
if (i >= 0 && i != this.zab.size()) {
|
||||
if (i == this.zab.size() - 1) {
|
||||
intValue = ((DataHolder) Preconditions.checkNotNull(this.mDataHolder)).getCount();
|
||||
intValue2 = ((Integer) this.zab.get(i)).intValue();
|
||||
} else {
|
||||
intValue = ((Integer) this.zab.get(i + 1)).intValue();
|
||||
intValue2 = ((Integer) this.zab.get(i)).intValue();
|
||||
}
|
||||
int i5 = intValue - intValue2;
|
||||
if (i5 == 1) {
|
||||
int zaa2 = zaa(i);
|
||||
int windowIndex = ((DataHolder) Preconditions.checkNotNull(this.mDataHolder)).getWindowIndex(zaa2);
|
||||
String childDataMarkerColumn = getChildDataMarkerColumn();
|
||||
if (childDataMarkerColumn == null || this.mDataHolder.getString(childDataMarkerColumn, zaa2, windowIndex) != null) {
|
||||
i4 = 1;
|
||||
}
|
||||
} else {
|
||||
i4 = i5;
|
||||
}
|
||||
}
|
||||
return getEntry(zaa, i4);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getChildDataMarkerColumn() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.AbstractDataBuffer, com.google.android.gms.common.data.DataBuffer
|
||||
@KeepForSdk
|
||||
public int getCount() {
|
||||
zab();
|
||||
return this.zab.size();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public abstract T getEntry(int i, int i4);
|
||||
|
||||
@KeepForSdk
|
||||
public abstract String getPrimaryDataMarkerColumn();
|
||||
|
||||
public final int zaa(int i) {
|
||||
if (i < 0 || i >= this.zab.size()) {
|
||||
throw new IllegalArgumentException(w.i(i, "Position ", " is out of bounds for this buffer"));
|
||||
}
|
||||
return ((Integer) this.zab.get(i)).intValue();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Freezable<T> {
|
||||
T freeze();
|
||||
|
||||
boolean isDataValid();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import kotlin.reflect.jvm.internal.impl.types.model.ArgumentList;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FreezableUtils {
|
||||
public static <T, E extends Freezable<T>> ArrayList<T> freeze(ArrayList<E> arrayList) {
|
||||
ArgumentList argumentList = (ArrayList<T>) new ArrayList(arrayList.size());
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
argumentList.add(arrayList.get(i).freeze());
|
||||
}
|
||||
return argumentList;
|
||||
}
|
||||
|
||||
public static <T, E extends Freezable<T>> ArrayList<T> freezeIterable(Iterable<E> iterable) {
|
||||
ArgumentList argumentList = (ArrayList<T>) new ArrayList();
|
||||
Iterator<E> it = iterable.iterator();
|
||||
while (it.hasNext()) {
|
||||
argumentList.add(it.next().freeze());
|
||||
}
|
||||
return argumentList;
|
||||
}
|
||||
|
||||
public static <T, E extends Freezable<T>> ArrayList<T> freeze(E[] eArr) {
|
||||
ArgumentList argumentList = (ArrayList<T>) new ArrayList(eArr.length);
|
||||
for (E e4 : eArr) {
|
||||
argumentList.add(e4.freeze());
|
||||
}
|
||||
return argumentList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import C.w;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class SingleRefDataBufferIterator<T> extends DataBufferIterator<T> {
|
||||
private Object zac;
|
||||
|
||||
public SingleRefDataBufferIterator(DataBuffer dataBuffer) {
|
||||
super(dataBuffer);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataBufferIterator, java.util.Iterator
|
||||
public final Object next() {
|
||||
if (!hasNext()) {
|
||||
throw new NoSuchElementException(a.l(this.zab, "Cannot advance the iterator beyond "));
|
||||
}
|
||||
int i = this.zab + 1;
|
||||
this.zab = i;
|
||||
if (i == 0) {
|
||||
Object checkNotNull = Preconditions.checkNotNull(this.zaa.get(0));
|
||||
this.zac = checkNotNull;
|
||||
if (!(checkNotNull instanceof DataBufferRef)) {
|
||||
throw new IllegalStateException(w.o("DataBuffer reference of type ", String.valueOf(checkNotNull.getClass()), " is not movable"));
|
||||
}
|
||||
} else {
|
||||
((DataBufferRef) Preconditions.checkNotNull(this.zac)).zaa(this.zab);
|
||||
}
|
||||
return this.zac;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaa implements Parcelable.Creator {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
|
||||
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
|
||||
int i = 0;
|
||||
ParcelFileDescriptor parcelFileDescriptor = null;
|
||||
int i4 = 0;
|
||||
while (parcel.dataPosition() < validateObjectHeader) {
|
||||
int readHeader = SafeParcelReader.readHeader(parcel);
|
||||
int fieldId = SafeParcelReader.getFieldId(readHeader);
|
||||
if (fieldId == 1) {
|
||||
i = SafeParcelReader.readInt(parcel, readHeader);
|
||||
} else if (fieldId == 2) {
|
||||
parcelFileDescriptor = (ParcelFileDescriptor) SafeParcelReader.createParcelable(parcel, readHeader, ParcelFileDescriptor.CREATOR);
|
||||
} else if (fieldId != 3) {
|
||||
SafeParcelReader.skipUnknownField(parcel, readHeader);
|
||||
} else {
|
||||
i4 = SafeParcelReader.readInt(parcel, readHeader);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
|
||||
return new BitmapTeleporter(i, parcelFileDescriptor, i4);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Object[] newArray(int i) {
|
||||
return new BitmapTeleporter[i];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import com.google.android.gms.common.data.DataHolder;
|
||||
import java.util.HashMap;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zab extends DataHolder.Builder {
|
||||
public zab(String[] strArr, String str) {
|
||||
super(strArr, null, null);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataHolder.Builder
|
||||
public final DataHolder.Builder withRow(ContentValues contentValues) {
|
||||
throw new UnsupportedOperationException("Cannot add data to empty builder");
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.data.DataHolder.Builder
|
||||
public final DataHolder.Builder zaa(HashMap hashMap) {
|
||||
throw new UnsupportedOperationException("Cannot add data to empty builder");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zad extends RuntimeException {
|
||||
public zad(String str) {
|
||||
super("Could not add the value to a new CursorWindow. The size of value may be larger than what a CursorWindow can handle.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.database.CursorWindow;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaf implements Parcelable.Creator {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
|
||||
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
|
||||
int i = 0;
|
||||
int i4 = 0;
|
||||
String[] strArr = null;
|
||||
CursorWindow[] cursorWindowArr = null;
|
||||
Bundle bundle = null;
|
||||
while (parcel.dataPosition() < validateObjectHeader) {
|
||||
int readHeader = SafeParcelReader.readHeader(parcel);
|
||||
int fieldId = SafeParcelReader.getFieldId(readHeader);
|
||||
if (fieldId == 1) {
|
||||
strArr = SafeParcelReader.createStringArray(parcel, readHeader);
|
||||
} else if (fieldId == 2) {
|
||||
cursorWindowArr = (CursorWindow[]) SafeParcelReader.createTypedArray(parcel, readHeader, CursorWindow.CREATOR);
|
||||
} else if (fieldId == 3) {
|
||||
i4 = SafeParcelReader.readInt(parcel, readHeader);
|
||||
} else if (fieldId == 4) {
|
||||
bundle = SafeParcelReader.createBundle(parcel, readHeader);
|
||||
} else if (fieldId != 1000) {
|
||||
SafeParcelReader.skipUnknownField(parcel, readHeader);
|
||||
} else {
|
||||
i = SafeParcelReader.readInt(parcel, readHeader);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
|
||||
DataHolder dataHolder = new DataHolder(i, strArr, cursorWindowArr, i4, bundle);
|
||||
dataHolder.zad();
|
||||
return dataHolder;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Object[] newArray(int i) {
|
||||
return new DataHolder[i];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user