Initial version -- added millennium read funcionality

This commit is contained in:
Pablo
2026-03-09 22:05:28 +01:00
commit 77c2ded482
2770 changed files with 141927 additions and 0 deletions
@@ -0,0 +1,54 @@
package com.google.android.gms.maps.model;
import com.google.android.gms.common.internal.Preconditions;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
/* JADX INFO: compiled from: com.google.android.gms:play-services-maps@@19.0.0 */
/* JADX INFO: loaded from: classes2.dex */
public abstract class UrlTileProvider implements TileProvider {
private final int zza;
private final int zzb;
public UrlTileProvider(int i, int i2) {
this.zza = i;
this.zzb = i2;
}
@Override // com.google.android.gms.maps.model.TileProvider
public final Tile getTile(int i, int i2, int i3) {
URL tileUrl = getTileUrl(i, i2, i3);
if (tileUrl == null) {
return NO_TILE;
}
try {
com.google.android.gms.internal.maps.zzf.zzb(4352);
int i4 = this.zza;
int i5 = this.zzb;
InputStream inputStream = tileUrl.openConnection().getInputStream();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
Preconditions.checkNotNull(inputStream, "from must not be null.");
Preconditions.checkNotNull(byteArrayOutputStream, "to must not be null.");
byte[] bArr = new byte[4096];
while (true) {
int i6 = inputStream.read(bArr);
if (i6 == -1) {
Tile tile = new Tile(i4, i5, byteArrayOutputStream.toByteArray());
com.google.android.gms.internal.maps.zzf.zza();
return tile;
}
byteArrayOutputStream.write(bArr, 0, i6);
}
} catch (IOException unused) {
com.google.android.gms.internal.maps.zzf.zza();
return null;
} catch (Throwable th) {
com.google.android.gms.internal.maps.zzf.zza();
throw th;
}
}
public abstract URL getTileUrl(int i, int i2, int i3);
}