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,121 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.ResultReceiver;
|
||||
import android.widget.ImageView;
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.common.internal.Constants;
|
||||
import com.google.android.gms.internal.base.zam;
|
||||
import com.google.android.gms.internal.base.zat;
|
||||
import com.google.android.gms.internal.base.zau;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ImageManager {
|
||||
private static final Object zaa = new Object();
|
||||
private static HashSet zab = new HashSet();
|
||||
private static ImageManager zac;
|
||||
private final Context zad;
|
||||
private final Handler zae = new zau(Looper.getMainLooper());
|
||||
private final ExecutorService zaf = zat.zaa().zab(4, 2);
|
||||
private final zam zag = new zam();
|
||||
private final Map zah = new HashMap();
|
||||
private final Map zai = new HashMap();
|
||||
private final Map zaj = new HashMap();
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ImageReceiver extends ResultReceiver {
|
||||
private final Uri zab;
|
||||
private final ArrayList zac;
|
||||
|
||||
public ImageReceiver(Uri uri) {
|
||||
super(new zau(Looper.getMainLooper()));
|
||||
this.zab = uri;
|
||||
this.zac = new ArrayList();
|
||||
}
|
||||
|
||||
@Override // android.os.ResultReceiver
|
||||
public final void onReceiveResult(int i, Bundle bundle) {
|
||||
ParcelFileDescriptor parcelFileDescriptor = (ParcelFileDescriptor) bundle.getParcelable("com.google.android.gms.extra.fileDescriptor");
|
||||
ImageManager imageManager = ImageManager.this;
|
||||
imageManager.zaf.execute(new zaa(imageManager, this.zab, parcelFileDescriptor));
|
||||
}
|
||||
|
||||
public final void zab(zag zagVar) {
|
||||
Asserts.checkMainThread("ImageReceiver.addImageRequest() must be called in the main thread");
|
||||
this.zac.add(zagVar);
|
||||
}
|
||||
|
||||
public final void zac(zag zagVar) {
|
||||
Asserts.checkMainThread("ImageReceiver.removeImageRequest() must be called in the main thread");
|
||||
this.zac.remove(zagVar);
|
||||
}
|
||||
|
||||
public final void zad() {
|
||||
Intent intent = new Intent(Constants.ACTION_LOAD_IMAGE);
|
||||
intent.setPackage("com.google.android.gms");
|
||||
intent.putExtra(Constants.EXTRA_URI, this.zab);
|
||||
intent.putExtra(Constants.EXTRA_RESULT_RECEIVER, this);
|
||||
intent.putExtra(Constants.EXTRA_PRIORITY, 3);
|
||||
ImageManager.this.zad.sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface OnImageLoadedListener {
|
||||
void onImageLoaded(Uri uri, Drawable drawable, boolean z3);
|
||||
}
|
||||
|
||||
private ImageManager(Context context, boolean z3) {
|
||||
this.zad = context.getApplicationContext();
|
||||
}
|
||||
|
||||
public static ImageManager create(Context context) {
|
||||
if (zac == null) {
|
||||
zac = new ImageManager(context, false);
|
||||
}
|
||||
return zac;
|
||||
}
|
||||
|
||||
public void loadImage(ImageView imageView, int i) {
|
||||
zaj(new zae(imageView, i));
|
||||
}
|
||||
|
||||
public final void zaj(zag zagVar) {
|
||||
Asserts.checkMainThread("ImageManager.loadImage() must be called in the main thread");
|
||||
new zab(this, zagVar).run();
|
||||
}
|
||||
|
||||
public void loadImage(ImageView imageView, Uri uri) {
|
||||
zaj(new zae(imageView, uri));
|
||||
}
|
||||
|
||||
public void loadImage(ImageView imageView, Uri uri, int i) {
|
||||
zae zaeVar = new zae(imageView, uri);
|
||||
zaeVar.zab = i;
|
||||
zaj(zaeVar);
|
||||
}
|
||||
|
||||
public void loadImage(OnImageLoadedListener onImageLoadedListener, Uri uri) {
|
||||
zaj(new zaf(onImageLoadedListener, uri));
|
||||
}
|
||||
|
||||
public void loadImage(OnImageLoadedListener onImageLoadedListener, Uri uri, int i) {
|
||||
zaf zafVar = new zaf(onImageLoadedListener, uri);
|
||||
zafVar.zab = i;
|
||||
zaj(zafVar);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import C.w;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Size {
|
||||
private final int zaa;
|
||||
private final int zab;
|
||||
|
||||
public Size(int i, int i4) {
|
||||
this.zaa = i;
|
||||
this.zab = i4;
|
||||
}
|
||||
|
||||
public static Size parseSize(String str) throws NumberFormatException {
|
||||
if (str == null) {
|
||||
throw new IllegalArgumentException("string must not be null");
|
||||
}
|
||||
int indexOf = str.indexOf(42);
|
||||
if (indexOf < 0) {
|
||||
indexOf = str.indexOf(120);
|
||||
}
|
||||
if (indexOf < 0) {
|
||||
throw zaa(str);
|
||||
}
|
||||
try {
|
||||
return new Size(Integer.parseInt(str.substring(0, indexOf)), Integer.parseInt(str.substring(indexOf + 1)));
|
||||
} catch (NumberFormatException unused) {
|
||||
throw zaa(str);
|
||||
}
|
||||
}
|
||||
|
||||
private static NumberFormatException zaa(String str) {
|
||||
throw new NumberFormatException(w.o("Invalid Size: \"", str, "\""));
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof Size) {
|
||||
Size size = (Size) obj;
|
||||
if (this.zaa == size.zaa && this.zab == size.zab) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int i = this.zab;
|
||||
int i4 = this.zaa;
|
||||
return ((i4 >>> 16) | (i4 << 16)) ^ i;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.zaa + "x" + this.zab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.ImagesContract;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
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.util.Locale;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@SafeParcelable.Class(creator = "WebImageCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class WebImage extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<WebImage> CREATOR = new zah();
|
||||
|
||||
@SafeParcelable.VersionField(id = 1)
|
||||
final int zaa;
|
||||
|
||||
@SafeParcelable.Field(getter = "getUrl", id = 2)
|
||||
private final Uri zab;
|
||||
|
||||
@SafeParcelable.Field(getter = "getWidth", id = 3)
|
||||
private final int zac;
|
||||
|
||||
@SafeParcelable.Field(getter = "getHeight", id = 4)
|
||||
private final int zad;
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public WebImage(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) Uri uri, @SafeParcelable.Param(id = 3) int i4, @SafeParcelable.Param(id = 4) int i5) {
|
||||
this.zaa = i;
|
||||
this.zab = uri;
|
||||
this.zac = i4;
|
||||
this.zad = i5;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj != null && (obj instanceof WebImage)) {
|
||||
WebImage webImage = (WebImage) obj;
|
||||
if (Objects.equal(this.zab, webImage.zab) && this.zac == webImage.zac && this.zad == webImage.zad) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return this.zad;
|
||||
}
|
||||
|
||||
public Uri getUrl() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(this.zab, Integer.valueOf(this.zac), Integer.valueOf(this.zad));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public JSONObject toJson() {
|
||||
JSONObject jSONObject = new JSONObject();
|
||||
try {
|
||||
jSONObject.put(ImagesContract.URL, this.zab.toString());
|
||||
jSONObject.put("width", this.zac);
|
||||
jSONObject.put("height", this.zad);
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
return jSONObject;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Locale locale = Locale.US;
|
||||
return "Image " + this.zac + "x" + this.zad + " " + this.zab.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, this.zaa);
|
||||
SafeParcelWriter.writeParcelable(parcel, 2, getUrl(), i, false);
|
||||
SafeParcelWriter.writeInt(parcel, 3, getWidth());
|
||||
SafeParcelWriter.writeInt(parcel, 4, getHeight());
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public WebImage(Uri uri) throws IllegalArgumentException {
|
||||
this(uri, 0, 0);
|
||||
}
|
||||
|
||||
public WebImage(Uri uri, int i, int i4) throws IllegalArgumentException {
|
||||
this(1, uri, i, i4);
|
||||
if (uri == null) {
|
||||
throw new IllegalArgumentException("url cannot be null");
|
||||
}
|
||||
if (i < 0 || i4 < 0) {
|
||||
throw new IllegalArgumentException("width and height must not be negative");
|
||||
}
|
||||
}
|
||||
|
||||
/* 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 WebImage(org.json.JSONObject r5) throws java.lang.IllegalArgumentException {
|
||||
/*
|
||||
r4 = this;
|
||||
android.net.Uri r0 = android.net.Uri.EMPTY
|
||||
java.lang.String r1 = "url"
|
||||
boolean r2 = r5.has(r1)
|
||||
if (r2 == 0) goto L12
|
||||
java.lang.String r1 = r5.getString(r1) // Catch: org.json.JSONException -> L12
|
||||
android.net.Uri r0 = android.net.Uri.parse(r1) // Catch: org.json.JSONException -> L12
|
||||
L12:
|
||||
java.lang.String r1 = "width"
|
||||
r2 = 0
|
||||
int r1 = r5.optInt(r1, r2)
|
||||
java.lang.String r3 = "height"
|
||||
int r5 = r5.optInt(r3, r2)
|
||||
r4.<init>(r0, r1, r5)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.images.WebImage.<init>(org.json.JSONObject):void");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zaa implements Runnable {
|
||||
final /* synthetic */ ImageManager zaa;
|
||||
private final Uri zab;
|
||||
private final ParcelFileDescriptor zac;
|
||||
|
||||
public zaa(ImageManager imageManager, Uri uri, ParcelFileDescriptor parcelFileDescriptor) {
|
||||
this.zaa = imageManager;
|
||||
this.zab = uri;
|
||||
this.zac = parcelFileDescriptor;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
Handler handler;
|
||||
Asserts.checkNotMainThread("LoadBitmapFromDiskRunnable can't be executed in the main thread");
|
||||
ParcelFileDescriptor parcelFileDescriptor = this.zac;
|
||||
Bitmap bitmap = null;
|
||||
boolean z3 = false;
|
||||
if (parcelFileDescriptor != null) {
|
||||
try {
|
||||
bitmap = BitmapFactory.decodeFileDescriptor(parcelFileDescriptor.getFileDescriptor());
|
||||
} catch (OutOfMemoryError e4) {
|
||||
Log.e("ImageManager", "OOM while loading bitmap for uri: ".concat(String.valueOf(this.zab)), e4);
|
||||
z3 = true;
|
||||
}
|
||||
try {
|
||||
this.zac.close();
|
||||
} catch (IOException e5) {
|
||||
Log.e("ImageManager", "closed failed", e5);
|
||||
}
|
||||
}
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
ImageManager imageManager = this.zaa;
|
||||
handler = imageManager.zae;
|
||||
handler.post(new zac(imageManager, this.zab, bitmap, z3, countDownLatch));
|
||||
try {
|
||||
countDownLatch.await();
|
||||
} catch (InterruptedException unused) {
|
||||
Log.w("ImageManager", "Latch interrupted while posting ".concat(String.valueOf(this.zab)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.SystemClock;
|
||||
import com.google.android.gms.common.images.ImageManager;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.internal.base.zam;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zab implements Runnable {
|
||||
final /* synthetic */ ImageManager zaa;
|
||||
private final zag zab;
|
||||
|
||||
public zab(ImageManager imageManager, zag zagVar) {
|
||||
this.zaa = imageManager;
|
||||
this.zab = zagVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
Map map;
|
||||
zam zamVar;
|
||||
Map map2;
|
||||
Map map3;
|
||||
Object obj;
|
||||
HashSet hashSet;
|
||||
HashSet hashSet2;
|
||||
Map map4;
|
||||
Map map5;
|
||||
Map map6;
|
||||
zam zamVar2;
|
||||
Map map7;
|
||||
Asserts.checkMainThread("LoadImageRunnable must be executed on the main thread");
|
||||
map = this.zaa.zah;
|
||||
ImageManager.ImageReceiver imageReceiver = (ImageManager.ImageReceiver) map.get(this.zab);
|
||||
if (imageReceiver != null) {
|
||||
map7 = this.zaa.zah;
|
||||
map7.remove(this.zab);
|
||||
imageReceiver.zac(this.zab);
|
||||
}
|
||||
zag zagVar = this.zab;
|
||||
zad zadVar = zagVar.zaa;
|
||||
Uri uri = zadVar.zaa;
|
||||
if (uri == null) {
|
||||
ImageManager imageManager = this.zaa;
|
||||
Context context = imageManager.zad;
|
||||
zamVar = imageManager.zag;
|
||||
zagVar.zab(context, zamVar, true);
|
||||
return;
|
||||
}
|
||||
map2 = this.zaa.zaj;
|
||||
Long l4 = (Long) map2.get(uri);
|
||||
if (l4 != null) {
|
||||
if (SystemClock.elapsedRealtime() - l4.longValue() < 3600000) {
|
||||
zag zagVar2 = this.zab;
|
||||
ImageManager imageManager2 = this.zaa;
|
||||
Context context2 = imageManager2.zad;
|
||||
zamVar2 = imageManager2.zag;
|
||||
zagVar2.zab(context2, zamVar2, true);
|
||||
return;
|
||||
}
|
||||
map6 = this.zaa.zaj;
|
||||
map6.remove(zadVar.zaa);
|
||||
}
|
||||
this.zab.zaa(null, false, true, false);
|
||||
map3 = this.zaa.zai;
|
||||
ImageManager.ImageReceiver imageReceiver2 = (ImageManager.ImageReceiver) map3.get(zadVar.zaa);
|
||||
if (imageReceiver2 == null) {
|
||||
imageReceiver2 = new ImageManager.ImageReceiver(zadVar.zaa);
|
||||
map5 = this.zaa.zai;
|
||||
map5.put(zadVar.zaa, imageReceiver2);
|
||||
}
|
||||
imageReceiver2.zab(this.zab);
|
||||
zag zagVar3 = this.zab;
|
||||
if (!(zagVar3 instanceof zaf)) {
|
||||
map4 = this.zaa.zah;
|
||||
map4.put(zagVar3, imageReceiver2);
|
||||
}
|
||||
obj = ImageManager.zaa;
|
||||
synchronized (obj) {
|
||||
try {
|
||||
hashSet = ImageManager.zab;
|
||||
if (!hashSet.contains(zadVar.zaa)) {
|
||||
hashSet2 = ImageManager.zab;
|
||||
hashSet2.add(zadVar.zaa);
|
||||
imageReceiver2.zad();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.SystemClock;
|
||||
import com.google.android.gms.common.images.ImageManager;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.internal.base.zam;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zac implements Runnable {
|
||||
final /* synthetic */ ImageManager zaa;
|
||||
private final Uri zab;
|
||||
private final Bitmap zac;
|
||||
private final CountDownLatch zad;
|
||||
|
||||
public zac(ImageManager imageManager, Uri uri, Bitmap bitmap, boolean z3, CountDownLatch countDownLatch) {
|
||||
this.zaa = imageManager;
|
||||
this.zab = uri;
|
||||
this.zac = bitmap;
|
||||
this.zad = countDownLatch;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
Map map;
|
||||
Object obj;
|
||||
HashSet hashSet;
|
||||
ArrayList arrayList;
|
||||
Map map2;
|
||||
zam zamVar;
|
||||
Map map3;
|
||||
Asserts.checkMainThread("OnBitmapLoadedRunnable must be executed in the main thread");
|
||||
Bitmap bitmap = this.zac;
|
||||
map = this.zaa.zai;
|
||||
ImageManager.ImageReceiver imageReceiver = (ImageManager.ImageReceiver) map.remove(this.zab);
|
||||
if (imageReceiver != null) {
|
||||
arrayList = imageReceiver.zac;
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
zag zagVar = (zag) arrayList.get(i);
|
||||
Bitmap bitmap2 = this.zac;
|
||||
if (bitmap2 == null || bitmap == null) {
|
||||
map2 = this.zaa.zaj;
|
||||
map2.put(this.zab, Long.valueOf(SystemClock.elapsedRealtime()));
|
||||
ImageManager imageManager = this.zaa;
|
||||
Context context = imageManager.zad;
|
||||
zamVar = imageManager.zag;
|
||||
zagVar.zab(context, zamVar, false);
|
||||
} else {
|
||||
zagVar.zac(this.zaa.zad, bitmap2, false);
|
||||
}
|
||||
if (!(zagVar instanceof zaf)) {
|
||||
map3 = this.zaa.zah;
|
||||
map3.remove(zagVar);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.zad.countDown();
|
||||
obj = ImageManager.zaa;
|
||||
synchronized (obj) {
|
||||
hashSet = ImageManager.zab;
|
||||
hashSet.remove(this.zab);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.net.Uri;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zad {
|
||||
public final Uri zaa;
|
||||
|
||||
public zad(Uri uri) {
|
||||
this.zaa = uri;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof zad) {
|
||||
return Objects.equal(((zad) obj).zaa, this.zaa);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.hashCode(this.zaa);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.widget.ImageView;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.internal.base.zak;
|
||||
import com.google.android.gms.internal.base.zal;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zae extends zag {
|
||||
private final WeakReference zac;
|
||||
|
||||
public zae(ImageView imageView, int i) {
|
||||
super(Uri.EMPTY, i);
|
||||
Asserts.checkNotNull(imageView);
|
||||
this.zac = new WeakReference(imageView);
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof zae)) {
|
||||
return false;
|
||||
}
|
||||
ImageView imageView = (ImageView) this.zac.get();
|
||||
ImageView imageView2 = (ImageView) ((zae) obj).zac.get();
|
||||
return (imageView2 == null || imageView == null || !Objects.equal(imageView2, imageView)) ? false : true;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.images.zag
|
||||
public final void zaa(Drawable drawable, boolean z3, boolean z4, boolean z5) {
|
||||
ImageView imageView = (ImageView) this.zac.get();
|
||||
if (imageView != null) {
|
||||
if (!z4 && !z5 && (imageView instanceof zal)) {
|
||||
throw null;
|
||||
}
|
||||
boolean z6 = false;
|
||||
if (!z4 && !z3) {
|
||||
z6 = true;
|
||||
}
|
||||
if (z6) {
|
||||
Drawable drawable2 = imageView.getDrawable();
|
||||
if (drawable2 == null) {
|
||||
drawable2 = null;
|
||||
} else if (drawable2 instanceof zak) {
|
||||
drawable2 = ((zak) drawable2).zaa();
|
||||
}
|
||||
drawable = new zak(drawable2, drawable);
|
||||
}
|
||||
imageView.setImageDrawable(drawable);
|
||||
if (imageView instanceof zal) {
|
||||
throw null;
|
||||
}
|
||||
if (drawable == null || !z6) {
|
||||
return;
|
||||
}
|
||||
((zak) drawable).zab(250);
|
||||
}
|
||||
}
|
||||
|
||||
public zae(ImageView imageView, Uri uri) {
|
||||
super(uri, 0);
|
||||
Asserts.checkNotNull(imageView);
|
||||
this.zac = new WeakReference(imageView);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import com.google.android.gms.common.images.ImageManager;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaf extends zag {
|
||||
private final WeakReference zac;
|
||||
|
||||
public zaf(ImageManager.OnImageLoadedListener onImageLoadedListener, Uri uri) {
|
||||
super(uri, 0);
|
||||
Asserts.checkNotNull(onImageLoadedListener);
|
||||
this.zac = new WeakReference(onImageLoadedListener);
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof zaf)) {
|
||||
return false;
|
||||
}
|
||||
zaf zafVar = (zaf) obj;
|
||||
ImageManager.OnImageLoadedListener onImageLoadedListener = (ImageManager.OnImageLoadedListener) this.zac.get();
|
||||
ImageManager.OnImageLoadedListener onImageLoadedListener2 = (ImageManager.OnImageLoadedListener) zafVar.zac.get();
|
||||
return onImageLoadedListener2 != null && onImageLoadedListener != null && Objects.equal(onImageLoadedListener2, onImageLoadedListener) && Objects.equal(zafVar.zaa, this.zaa);
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.hashCode(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.images.zag
|
||||
public final void zaa(Drawable drawable, boolean z3, boolean z4, boolean z5) {
|
||||
ImageManager.OnImageLoadedListener onImageLoadedListener;
|
||||
if (z4 || (onImageLoadedListener = (ImageManager.OnImageLoadedListener) this.zac.get()) == null) {
|
||||
return;
|
||||
}
|
||||
onImageLoadedListener.onImageLoaded(this.zaa.zaa, drawable, z5);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.internal.base.zam;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class zag {
|
||||
final zad zaa;
|
||||
protected int zab;
|
||||
|
||||
public zag(Uri uri, int i) {
|
||||
this.zab = 0;
|
||||
this.zaa = new zad(uri);
|
||||
this.zab = i;
|
||||
}
|
||||
|
||||
public abstract void zaa(Drawable drawable, boolean z3, boolean z4, boolean z5);
|
||||
|
||||
public final void zab(Context context, zam zamVar, boolean z3) {
|
||||
int i = this.zab;
|
||||
zaa(i != 0 ? context.getResources().getDrawable(i) : null, z3, false, false);
|
||||
}
|
||||
|
||||
public final void zac(Context context, Bitmap bitmap, boolean z3) {
|
||||
Asserts.checkNotNull(bitmap);
|
||||
zaa(new BitmapDrawable(context.getResources(), bitmap), false, false, true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zah 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;
|
||||
Uri uri = null;
|
||||
int i5 = 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) {
|
||||
uri = (Uri) SafeParcelReader.createParcelable(parcel, readHeader, Uri.CREATOR);
|
||||
} else if (fieldId == 3) {
|
||||
i5 = SafeParcelReader.readInt(parcel, readHeader);
|
||||
} else if (fieldId != 4) {
|
||||
SafeParcelReader.skipUnknownField(parcel, readHeader);
|
||||
} else {
|
||||
i4 = SafeParcelReader.readInt(parcel, readHeader);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
|
||||
return new WebImage(i, uri, i5, i4);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Object[] newArray(int i) {
|
||||
return new WebImage[i];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user