Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

View File

@@ -0,0 +1,150 @@
package com.bumptech.glide.request;
/* loaded from: classes.dex */
public final class ErrorRequestCoordinator implements RequestCoordinator, Request {
private final RequestCoordinator a;
private Request b;
private Request c;
public ErrorRequestCoordinator(RequestCoordinator requestCoordinator) {
this.a = requestCoordinator;
}
private boolean h() {
RequestCoordinator requestCoordinator = this.a;
return requestCoordinator == null || requestCoordinator.c(this);
}
private boolean i() {
RequestCoordinator requestCoordinator = this.a;
return requestCoordinator == null || requestCoordinator.d(this);
}
private boolean j() {
RequestCoordinator requestCoordinator = this.a;
return requestCoordinator != null && requestCoordinator.c();
}
public void a(Request request, Request request2) {
this.b = request;
this.c = request2;
}
@Override // com.bumptech.glide.request.Request
public boolean b() {
return (this.b.d() ? this.c : this.b).b();
}
@Override // com.bumptech.glide.request.RequestCoordinator
public boolean c(Request request) {
return h() && g(request);
}
@Override // com.bumptech.glide.request.Request
public void clear() {
this.b.clear();
if (this.c.isRunning()) {
this.c.clear();
}
}
@Override // com.bumptech.glide.request.Request
public boolean d() {
return this.b.d() && this.c.d();
}
@Override // com.bumptech.glide.request.Request
public void e() {
if (this.b.isRunning()) {
return;
}
this.b.e();
}
@Override // com.bumptech.glide.request.RequestCoordinator
public boolean f(Request request) {
return f() && g(request);
}
@Override // com.bumptech.glide.request.Request
public boolean g() {
return (this.b.d() ? this.c : this.b).g();
}
@Override // com.bumptech.glide.request.Request
public boolean isCancelled() {
return (this.b.d() ? this.c : this.b).isCancelled();
}
@Override // com.bumptech.glide.request.Request
public boolean isRunning() {
return (this.b.d() ? this.c : this.b).isRunning();
}
@Override // com.bumptech.glide.request.Request
public void pause() {
if (!this.b.d()) {
this.b.pause();
}
if (this.c.isRunning()) {
this.c.pause();
}
}
private boolean f() {
RequestCoordinator requestCoordinator = this.a;
return requestCoordinator == null || requestCoordinator.f(this);
}
private boolean g(Request request) {
return request.equals(this.b) || (this.b.d() && request.equals(this.c));
}
@Override // com.bumptech.glide.request.RequestCoordinator
public void b(Request request) {
if (!request.equals(this.c)) {
if (this.c.isRunning()) {
return;
}
this.c.e();
} else {
RequestCoordinator requestCoordinator = this.a;
if (requestCoordinator != null) {
requestCoordinator.b(this);
}
}
}
@Override // com.bumptech.glide.request.RequestCoordinator
public boolean c() {
return j() || b();
}
@Override // com.bumptech.glide.request.RequestCoordinator
public boolean d(Request request) {
return i() && g(request);
}
@Override // com.bumptech.glide.request.Request
public void a() {
this.b.a();
this.c.a();
}
@Override // com.bumptech.glide.request.RequestCoordinator
public void e(Request request) {
RequestCoordinator requestCoordinator = this.a;
if (requestCoordinator != null) {
requestCoordinator.e(this);
}
}
@Override // com.bumptech.glide.request.Request
public boolean a(Request request) {
if (!(request instanceof ErrorRequestCoordinator)) {
return false;
}
ErrorRequestCoordinator errorRequestCoordinator = (ErrorRequestCoordinator) request;
return this.b.a(errorRequestCoordinator.b) && this.c.a(errorRequestCoordinator.c);
}
}

View File

@@ -0,0 +1,24 @@
package com.bumptech.glide.request;
/* loaded from: classes.dex */
public interface Request {
void a();
boolean a(Request request);
boolean b();
void clear();
boolean d();
void e();
boolean g();
boolean isCancelled();
boolean isRunning();
void pause();
}

View File

@@ -0,0 +1,16 @@
package com.bumptech.glide.request;
/* loaded from: classes.dex */
public interface RequestCoordinator {
void b(Request request);
boolean c();
boolean c(Request request);
boolean d(Request request);
void e(Request request);
boolean f(Request request);
}

View File

@@ -0,0 +1,12 @@
package com.bumptech.glide.request;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.target.Target;
/* loaded from: classes.dex */
public interface RequestListener<R> {
boolean a(GlideException glideException, Object obj, Target<R> target, boolean z);
boolean a(R r, Object obj, Target<R> target, DataSource dataSource, boolean z);
}

View File

@@ -0,0 +1,561 @@
package com.bumptech.glide.request;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.Option;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.Transformation;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.CenterInside;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.load.resource.bitmap.DownsampleStrategy;
import com.bumptech.glide.load.resource.bitmap.DrawableTransformation;
import com.bumptech.glide.load.resource.bitmap.FitCenter;
import com.bumptech.glide.load.resource.gif.GifDrawable;
import com.bumptech.glide.load.resource.gif.GifDrawableTransformation;
import com.bumptech.glide.signature.EmptySignature;
import com.bumptech.glide.util.CachedHashCodeArrayMap;
import com.bumptech.glide.util.Preconditions;
import com.bumptech.glide.util.Util;
import com.ijm.dataencryption.de.DataDecryptTool;
import com.ubt.jimu.base.util.FileUtil;
import com.ubt.jimu.unity.bluetooth.UnityActivity;
import com.ubtrobot.jimu.robotapi.PeripheralType;
import java.util.Map;
/* loaded from: classes.dex */
public class RequestOptions implements Cloneable {
private static RequestOptions B;
private static RequestOptions C;
private static RequestOptions D;
private boolean A;
private int a;
private Drawable e;
private int f;
private Drawable g;
private int h;
private boolean m;
private Drawable o;
private int p;
private boolean t;
private Resources.Theme u;
private boolean v;
private boolean x;
private boolean y;
private float b = 1.0f;
private DiskCacheStrategy c = DiskCacheStrategy.d;
private Priority d = Priority.NORMAL;
private boolean i = true;
private int j = -1;
private int k = -1;
private Key l = EmptySignature.a();
private boolean n = true;
private Options q = new Options();
private Map<Class<?>, Transformation<?>> r = new CachedHashCodeArrayMap();
private Class<?> s = Object.class;
private boolean z = true;
public static RequestOptions N() {
if (C == null) {
RequestOptions b = new RequestOptions().b();
b.a();
C = b;
}
return C;
}
public static RequestOptions O() {
if (D == null) {
RequestOptions h = new RequestOptions().h();
h.a();
D = h;
}
return D;
}
public static RequestOptions P() {
if (B == null) {
RequestOptions i = new RequestOptions().i();
i.a();
B = i;
}
return B;
}
private RequestOptions Q() {
if (this.t) {
throw new IllegalStateException("You cannot modify locked RequestOptions, consider clone()");
}
return this;
}
public static RequestOptions b(DiskCacheStrategy diskCacheStrategy) {
return new RequestOptions().a(diskCacheStrategy);
}
private static boolean b(int i, int i2) {
return (i & i2) != 0;
}
private RequestOptions c(DownsampleStrategy downsampleStrategy, Transformation<Bitmap> transformation) {
return a(downsampleStrategy, transformation, false);
}
private RequestOptions d(DownsampleStrategy downsampleStrategy, Transformation<Bitmap> transformation) {
return a(downsampleStrategy, transformation, true);
}
public final boolean A() {
return this.A;
}
public final boolean B() {
return this.x;
}
public final boolean C() {
return this.i;
}
public final boolean D() {
return c(8);
}
boolean E() {
return this.z;
}
public final boolean F() {
return this.n;
}
public final boolean G() {
return this.m;
}
public final boolean H() {
return c(2048);
}
public final boolean I() {
return Util.b(this.k, this.j);
}
public RequestOptions J() {
this.t = true;
return this;
}
public RequestOptions K() {
return a(DownsampleStrategy.b, new CenterCrop());
}
public RequestOptions L() {
return c(DownsampleStrategy.c, new CenterInside());
}
public RequestOptions M() {
return c(DownsampleStrategy.a, new FitCenter());
}
public RequestOptions a(float f) {
if (this.v) {
return m6clone().a(f);
}
if (f < 0.0f || f > 1.0f) {
throw new IllegalArgumentException("sizeMultiplier must be between 0 and 1");
}
this.b = f;
this.a |= 2;
Q();
return this;
}
public boolean equals(Object obj) {
if (!(obj instanceof RequestOptions)) {
return false;
}
RequestOptions requestOptions = (RequestOptions) obj;
return Float.compare(requestOptions.b, this.b) == 0 && this.f == requestOptions.f && Util.b(this.e, requestOptions.e) && this.h == requestOptions.h && Util.b(this.g, requestOptions.g) && this.p == requestOptions.p && Util.b(this.o, requestOptions.o) && this.i == requestOptions.i && this.j == requestOptions.j && this.k == requestOptions.k && this.m == requestOptions.m && this.n == requestOptions.n && this.x == requestOptions.x && this.y == requestOptions.y && this.c.equals(requestOptions.c) && this.d == requestOptions.d && this.q.equals(requestOptions.q) && this.r.equals(requestOptions.r) && this.s.equals(requestOptions.s) && Util.b(this.l, requestOptions.l) && Util.b(this.u, requestOptions.u);
}
public RequestOptions h() {
return b(DownsampleStrategy.c, new CircleCrop());
}
public int hashCode() {
return Util.a(this.u, Util.a(this.l, Util.a(this.s, Util.a(this.r, Util.a(this.q, Util.a(this.d, Util.a(this.c, Util.a(this.y, Util.a(this.x, Util.a(this.n, Util.a(this.m, Util.a(this.k, Util.a(this.j, Util.a(this.i, Util.a(this.o, Util.a(this.p, Util.a(this.g, Util.a(this.h, Util.a(this.e, Util.a(this.f, Util.a(this.b)))))))))))))))))))));
}
public RequestOptions i() {
return d(DownsampleStrategy.a, new FitCenter());
}
public final DiskCacheStrategy j() {
return this.c;
}
public final int k() {
return this.f;
}
public final Drawable l() {
return this.e;
}
public final Drawable m() {
return this.o;
}
public final int n() {
return this.p;
}
public final boolean o() {
return this.y;
}
public final Options p() {
return this.q;
}
public final int q() {
return this.j;
}
public final int r() {
return this.k;
}
public final Drawable s() {
return this.g;
}
public final int t() {
return this.h;
}
public final Priority u() {
return this.d;
}
public final Class<?> v() {
return this.s;
}
public final Key w() {
return this.l;
}
public final float x() {
return this.b;
}
public final Resources.Theme y() {
return this.u;
}
public final Map<Class<?>, Transformation<?>> z() {
return this.r;
}
public static RequestOptions b(Key key) {
return new RequestOptions().a(key);
}
private boolean c(int i) {
return b(this.a, i);
}
/* renamed from: clone, reason: merged with bridge method [inline-methods] */
public RequestOptions m6clone() {
try {
RequestOptions requestOptions = (RequestOptions) super.clone();
requestOptions.q = new Options();
requestOptions.q.a(this.q);
requestOptions.r = new CachedHashCodeArrayMap();
requestOptions.r.putAll(this.r);
requestOptions.t = false;
requestOptions.v = false;
return requestOptions;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
public static RequestOptions b(Transformation<Bitmap> transformation) {
return new RequestOptions().a(transformation);
}
public static RequestOptions b(Class<?> cls) {
return new RequestOptions().a(cls);
}
public RequestOptions b(boolean z) {
if (this.v) {
return m6clone().b(z);
}
this.A = z;
this.a |= 1048576;
Q();
return this;
}
public RequestOptions a(DiskCacheStrategy diskCacheStrategy) {
if (this.v) {
return m6clone().a(diskCacheStrategy);
}
Preconditions.a(diskCacheStrategy);
this.c = diskCacheStrategy;
this.a |= 4;
Q();
return this;
}
public RequestOptions b(int i) {
if (this.v) {
return m6clone().b(i);
}
this.h = i;
this.a |= PeripheralType.SERVO;
Q();
return this;
}
public RequestOptions a(Priority priority) {
if (this.v) {
return m6clone().a(priority);
}
Preconditions.a(priority);
this.d = priority;
this.a |= 8;
Q();
return this;
}
public RequestOptions b() {
return b(DownsampleStrategy.b, new CenterCrop());
}
final RequestOptions b(DownsampleStrategy downsampleStrategy, Transformation<Bitmap> transformation) {
if (this.v) {
return m6clone().b(downsampleStrategy, transformation);
}
a(downsampleStrategy);
return a(transformation);
}
public RequestOptions a(int i) {
if (this.v) {
return m6clone().a(i);
}
this.f = i;
this.a |= 32;
Q();
return this;
}
public RequestOptions a(boolean z) {
if (this.v) {
return m6clone().a(true);
}
this.i = !z;
this.a |= DataDecryptTool.DECRYPT_ALL_FILE;
Q();
return this;
}
public RequestOptions a(int i, int i2) {
if (this.v) {
return m6clone().a(i, i2);
}
this.k = i;
this.j = i2;
this.a |= DataDecryptTool.DECRYPT_DB_FILE;
Q();
return this;
}
public RequestOptions a(Key key) {
if (this.v) {
return m6clone().a(key);
}
Preconditions.a(key);
this.l = key;
this.a |= DataDecryptTool.DECRYPT_SP_FILE;
Q();
return this;
}
public <T> RequestOptions a(Option<T> option, T t) {
if (this.v) {
return m6clone().a((Option<Option<T>>) option, (Option<T>) t);
}
Preconditions.a(option);
Preconditions.a(t);
this.q.a(option, t);
Q();
return this;
}
public RequestOptions a(Class<?> cls) {
if (this.v) {
return m6clone().a(cls);
}
Preconditions.a(cls);
this.s = cls;
this.a |= FileUtil.ZIP_BUFFER_SIZE;
Q();
return this;
}
public RequestOptions a(DownsampleStrategy downsampleStrategy) {
Option<DownsampleStrategy> option = DownsampleStrategy.f;
Preconditions.a(downsampleStrategy);
return a((Option<Option<DownsampleStrategy>>) option, (Option<DownsampleStrategy>) downsampleStrategy);
}
final RequestOptions a(DownsampleStrategy downsampleStrategy, Transformation<Bitmap> transformation) {
if (this.v) {
return m6clone().a(downsampleStrategy, transformation);
}
a(downsampleStrategy);
return a(transformation, false);
}
private RequestOptions a(DownsampleStrategy downsampleStrategy, Transformation<Bitmap> transformation, boolean z) {
RequestOptions b = z ? b(downsampleStrategy, transformation) : a(downsampleStrategy, transformation);
b.z = true;
return b;
}
public RequestOptions a(Transformation<Bitmap> transformation) {
return a(transformation, true);
}
private RequestOptions a(Transformation<Bitmap> transformation, boolean z) {
if (this.v) {
return m6clone().a(transformation, z);
}
DrawableTransformation drawableTransformation = new DrawableTransformation(transformation, z);
a(Bitmap.class, transformation, z);
a(Drawable.class, drawableTransformation, z);
drawableTransformation.a();
a(BitmapDrawable.class, drawableTransformation, z);
a(GifDrawable.class, new GifDrawableTransformation(transformation), z);
Q();
return this;
}
private <T> RequestOptions a(Class<T> cls, Transformation<T> transformation, boolean z) {
if (this.v) {
return m6clone().a(cls, transformation, z);
}
Preconditions.a(cls);
Preconditions.a(transformation);
this.r.put(cls, transformation);
this.a |= 2048;
this.n = true;
this.a |= 65536;
this.z = false;
if (z) {
this.a |= 131072;
this.m = true;
}
Q();
return this;
}
public RequestOptions a(RequestOptions requestOptions) {
if (this.v) {
return m6clone().a(requestOptions);
}
if (b(requestOptions.a, 2)) {
this.b = requestOptions.b;
}
if (b(requestOptions.a, 262144)) {
this.x = requestOptions.x;
}
if (b(requestOptions.a, 1048576)) {
this.A = requestOptions.A;
}
if (b(requestOptions.a, 4)) {
this.c = requestOptions.c;
}
if (b(requestOptions.a, 8)) {
this.d = requestOptions.d;
}
if (b(requestOptions.a, 16)) {
this.e = requestOptions.e;
}
if (b(requestOptions.a, 32)) {
this.f = requestOptions.f;
}
if (b(requestOptions.a, 64)) {
this.g = requestOptions.g;
}
if (b(requestOptions.a, PeripheralType.SERVO)) {
this.h = requestOptions.h;
}
if (b(requestOptions.a, DataDecryptTool.DECRYPT_ALL_FILE)) {
this.i = requestOptions.i;
}
if (b(requestOptions.a, DataDecryptTool.DECRYPT_DB_FILE)) {
this.k = requestOptions.k;
this.j = requestOptions.j;
}
if (b(requestOptions.a, DataDecryptTool.DECRYPT_SP_FILE)) {
this.l = requestOptions.l;
}
if (b(requestOptions.a, FileUtil.ZIP_BUFFER_SIZE)) {
this.s = requestOptions.s;
}
if (b(requestOptions.a, UnityActivity.BLOCKLY_TYPE_NONE)) {
this.o = requestOptions.o;
}
if (b(requestOptions.a, 16384)) {
this.p = requestOptions.p;
}
if (b(requestOptions.a, 32768)) {
this.u = requestOptions.u;
}
if (b(requestOptions.a, 65536)) {
this.n = requestOptions.n;
}
if (b(requestOptions.a, 131072)) {
this.m = requestOptions.m;
}
if (b(requestOptions.a, 2048)) {
this.r.putAll(requestOptions.r);
this.z = requestOptions.z;
}
if (b(requestOptions.a, 524288)) {
this.y = requestOptions.y;
}
if (!this.n) {
this.r.clear();
this.a &= -2049;
this.m = false;
this.a &= -131073;
this.z = true;
}
this.a |= requestOptions.a;
this.q.a(requestOptions.q);
Q();
return this;
}
public RequestOptions a() {
if (this.t && !this.v) {
throw new IllegalStateException("You cannot auto lock an already locked options object, try clone() first");
}
this.v = true;
J();
return this;
}
}

View File

@@ -0,0 +1,12 @@
package com.bumptech.glide.request;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.load.engine.Resource;
/* loaded from: classes.dex */
public interface ResourceCallback {
void a(GlideException glideException);
void a(Resource<?> resource, DataSource dataSource);
}

View File

@@ -0,0 +1,460 @@
package com.bumptech.glide.request;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.Log;
import androidx.core.util.Pools$Pool;
import com.bumptech.glide.GlideContext;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.Engine;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.resource.drawable.DrawableDecoderCompat;
import com.bumptech.glide.request.target.SizeReadyCallback;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.request.transition.TransitionFactory;
import com.bumptech.glide.util.LogTime;
import com.bumptech.glide.util.Util;
import com.bumptech.glide.util.pool.FactoryPools;
import com.bumptech.glide.util.pool.StateVerifier;
/* loaded from: classes.dex */
public final class SingleRequest<R> implements Request, SizeReadyCallback, ResourceCallback, FactoryPools.Poolable {
private static final Pools$Pool<SingleRequest<?>> B = FactoryPools.a(150, new FactoryPools.Factory<SingleRequest<?>>() { // from class: com.bumptech.glide.request.SingleRequest.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.bumptech.glide.util.pool.FactoryPools.Factory
public SingleRequest<?> a() {
return new SingleRequest<>();
}
});
private static final boolean C = Log.isLoggable("Request", 2);
private int A;
private boolean a;
private final String b;
private final StateVerifier c;
private RequestListener<R> d;
private RequestCoordinator e;
private Context f;
private GlideContext g;
private Object h;
private Class<R> i;
private RequestOptions j;
private int k;
private int l;
private Priority m;
private Target<R> n;
private RequestListener<R> o;
private Engine p;
private TransitionFactory<? super R> q;
private Resource<R> r;
private Engine.LoadStatus s;
private long t;
private Status u;
private Drawable v;
private Drawable x;
private Drawable y;
private int z;
private enum Status {
PENDING,
RUNNING,
WAITING_FOR_SIZE,
COMPLETE,
FAILED,
CANCELLED,
CLEARED,
PAUSED
}
SingleRequest() {
this.b = C ? String.valueOf(super.hashCode()) : null;
this.c = StateVerifier.b();
}
private void a(Context context, GlideContext glideContext, Object obj, Class<R> cls, RequestOptions requestOptions, int i, int i2, Priority priority, Target<R> target, RequestListener<R> requestListener, RequestListener<R> requestListener2, RequestCoordinator requestCoordinator, Engine engine, TransitionFactory<? super R> transitionFactory) {
this.f = context;
this.g = glideContext;
this.h = obj;
this.i = cls;
this.j = requestOptions;
this.k = i;
this.l = i2;
this.m = priority;
this.n = target;
this.d = requestListener;
this.o = requestListener2;
this.e = requestCoordinator;
this.p = engine;
this.q = transitionFactory;
this.u = Status.PENDING;
}
public static <R> SingleRequest<R> b(Context context, GlideContext glideContext, Object obj, Class<R> cls, RequestOptions requestOptions, int i, int i2, Priority priority, Target<R> target, RequestListener<R> requestListener, RequestListener<R> requestListener2, RequestCoordinator requestCoordinator, Engine engine, TransitionFactory<? super R> transitionFactory) {
SingleRequest<R> singleRequest = (SingleRequest) B.a();
if (singleRequest == null) {
singleRequest = new SingleRequest<>();
}
singleRequest.a(context, glideContext, obj, cls, requestOptions, i, i2, priority, target, requestListener, requestListener2, requestCoordinator, engine, transitionFactory);
return singleRequest;
}
private void h() {
if (this.a) {
throw new IllegalStateException("You can't start or clear loads in RequestListener or Target callbacks. If you're trying to start a fallback request when a load fails, use RequestBuilder#error(RequestBuilder). Otherwise consider posting your into() or clear() calls to the main thread using a Handler instead.");
}
}
private boolean i() {
RequestCoordinator requestCoordinator = this.e;
return requestCoordinator == null || requestCoordinator.f(this);
}
private boolean j() {
RequestCoordinator requestCoordinator = this.e;
return requestCoordinator == null || requestCoordinator.c(this);
}
private boolean k() {
RequestCoordinator requestCoordinator = this.e;
return requestCoordinator == null || requestCoordinator.d(this);
}
private Drawable l() {
if (this.v == null) {
this.v = this.j.l();
if (this.v == null && this.j.k() > 0) {
this.v = a(this.j.k());
}
}
return this.v;
}
private Drawable m() {
if (this.y == null) {
this.y = this.j.m();
if (this.y == null && this.j.n() > 0) {
this.y = a(this.j.n());
}
}
return this.y;
}
private Drawable n() {
if (this.x == null) {
this.x = this.j.s();
if (this.x == null && this.j.t() > 0) {
this.x = a(this.j.t());
}
}
return this.x;
}
private boolean o() {
RequestCoordinator requestCoordinator = this.e;
return requestCoordinator == null || !requestCoordinator.c();
}
private void p() {
RequestCoordinator requestCoordinator = this.e;
if (requestCoordinator != null) {
requestCoordinator.b(this);
}
}
private void q() {
RequestCoordinator requestCoordinator = this.e;
if (requestCoordinator != null) {
requestCoordinator.e(this);
}
}
private void r() {
if (j()) {
Drawable m = this.h == null ? m() : null;
if (m == null) {
m = l();
}
if (m == null) {
m = n();
}
this.n.a(m);
}
}
@Override // com.bumptech.glide.util.pool.FactoryPools.Poolable
public StateVerifier c() {
return this.c;
}
@Override // com.bumptech.glide.request.Request
public void clear() {
Util.b();
h();
this.c.a();
if (this.u == Status.CLEARED) {
return;
}
f();
Resource<R> resource = this.r;
if (resource != null) {
a((Resource<?>) resource);
}
if (i()) {
this.n.c(n());
}
this.u = Status.CLEARED;
}
@Override // com.bumptech.glide.request.Request
public boolean d() {
return this.u == Status.FAILED;
}
@Override // com.bumptech.glide.request.Request
public void e() {
h();
this.c.a();
this.t = LogTime.a();
if (this.h == null) {
if (Util.b(this.k, this.l)) {
this.z = this.k;
this.A = this.l;
}
a(new GlideException("Received null model"), m() == null ? 5 : 3);
return;
}
Status status = this.u;
if (status == Status.RUNNING) {
throw new IllegalArgumentException("Cannot restart a running request");
}
if (status == Status.COMPLETE) {
a((Resource<?>) this.r, DataSource.MEMORY_CACHE);
return;
}
this.u = Status.WAITING_FOR_SIZE;
if (Util.b(this.k, this.l)) {
a(this.k, this.l);
} else {
this.n.b(this);
}
Status status2 = this.u;
if ((status2 == Status.RUNNING || status2 == Status.WAITING_FOR_SIZE) && j()) {
this.n.b(n());
}
if (C) {
a("finished run method in " + LogTime.a(this.t));
}
}
void f() {
h();
this.c.a();
this.n.a((SizeReadyCallback) this);
this.u = Status.CANCELLED;
Engine.LoadStatus loadStatus = this.s;
if (loadStatus != null) {
loadStatus.a();
this.s = null;
}
}
@Override // com.bumptech.glide.request.Request
public boolean g() {
return this.u == Status.COMPLETE;
}
@Override // com.bumptech.glide.request.Request
public boolean isCancelled() {
Status status = this.u;
return status == Status.CANCELLED || status == Status.CLEARED;
}
@Override // com.bumptech.glide.request.Request
public boolean isRunning() {
Status status = this.u;
return status == Status.RUNNING || status == Status.WAITING_FOR_SIZE;
}
@Override // com.bumptech.glide.request.Request
public void pause() {
clear();
this.u = Status.PAUSED;
}
@Override // com.bumptech.glide.request.Request
public boolean b() {
return g();
}
@Override // com.bumptech.glide.request.Request
public void a() {
h();
this.f = null;
this.g = null;
this.h = null;
this.i = null;
this.j = null;
this.k = -1;
this.l = -1;
this.n = null;
this.o = null;
this.d = null;
this.e = null;
this.q = null;
this.s = null;
this.v = null;
this.x = null;
this.y = null;
this.z = -1;
this.A = -1;
B.a(this);
}
private void a(Resource<?> resource) {
this.p.b(resource);
this.r = null;
}
private Drawable a(int i) {
return DrawableDecoderCompat.a(this.g, i, this.j.y() != null ? this.j.y() : this.f.getTheme());
}
@Override // com.bumptech.glide.request.target.SizeReadyCallback
public void a(int i, int i2) {
this.c.a();
if (C) {
a("Got onSizeReady in " + LogTime.a(this.t));
}
if (this.u != Status.WAITING_FOR_SIZE) {
return;
}
this.u = Status.RUNNING;
float x = this.j.x();
this.z = a(i, x);
this.A = a(i2, x);
if (C) {
a("finished setup for calling load in " + LogTime.a(this.t));
}
this.s = this.p.a(this.g, this.h, this.j.w(), this.z, this.A, this.j.v(), this.i, this.m, this.j.j(), this.j.z(), this.j.G(), this.j.E(), this.j.p(), this.j.C(), this.j.B(), this.j.A(), this.j.o(), this);
if (this.u != Status.RUNNING) {
this.s = null;
}
if (C) {
a("finished onSizeReady in " + LogTime.a(this.t));
}
}
private static int a(int i, float f) {
return i == Integer.MIN_VALUE ? i : Math.round(f * i);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.bumptech.glide.request.ResourceCallback
public void a(Resource<?> resource, DataSource dataSource) {
this.c.a();
this.s = null;
if (resource == null) {
a(new GlideException("Expected to receive a Resource<R> with an object of " + this.i + " inside, but instead got null."));
return;
}
Object obj = resource.get();
if (obj != null && this.i.isAssignableFrom(obj.getClass())) {
if (!k()) {
a(resource);
this.u = Status.COMPLETE;
return;
} else {
a(resource, obj, dataSource);
return;
}
}
a(resource);
StringBuilder sb = new StringBuilder();
sb.append("Expected to receive an object of ");
sb.append(this.i);
sb.append(" but instead got ");
sb.append(obj != null ? obj.getClass() : "");
sb.append("{");
sb.append(obj);
sb.append("} inside Resource{");
sb.append(resource);
sb.append("}.");
sb.append(obj == null ? " To indicate failure return a null Resource object, rather than a Resource object containing null data." : "");
a(new GlideException(sb.toString()));
}
private void a(Resource<R> resource, R r, DataSource dataSource) {
boolean o = o();
this.u = Status.COMPLETE;
this.r = resource;
if (this.g.d() <= 3) {
Log.d("Glide", "Finished loading " + r.getClass().getSimpleName() + " from " + dataSource + " for " + this.h + " with size [" + this.z + "x" + this.A + "] in " + LogTime.a(this.t) + " ms");
}
this.a = true;
try {
if ((this.o == null || !this.o.a(r, this.h, this.n, dataSource, o)) && (this.d == null || !this.d.a(r, this.h, this.n, dataSource, o))) {
this.n.a(r, this.q.a(dataSource, o));
}
this.a = false;
q();
} catch (Throwable th) {
this.a = false;
throw th;
}
}
@Override // com.bumptech.glide.request.ResourceCallback
public void a(GlideException glideException) {
a(glideException, 5);
}
private void a(GlideException glideException, int i) {
this.c.a();
int d = this.g.d();
if (d <= i) {
Log.w("Glide", "Load failed for " + this.h + " with size [" + this.z + "x" + this.A + "]", glideException);
if (d <= 4) {
glideException.logRootCauses("Glide");
}
}
this.s = null;
this.u = Status.FAILED;
this.a = true;
try {
if ((this.o == null || !this.o.a(glideException, this.h, this.n, o())) && (this.d == null || !this.d.a(glideException, this.h, this.n, o()))) {
r();
}
this.a = false;
p();
} catch (Throwable th) {
this.a = false;
throw th;
}
}
@Override // com.bumptech.glide.request.Request
public boolean a(Request request) {
if (!(request instanceof SingleRequest)) {
return false;
}
SingleRequest singleRequest = (SingleRequest) request;
if (this.k != singleRequest.k || this.l != singleRequest.l || !Util.a(this.h, singleRequest.h) || !this.i.equals(singleRequest.i) || !this.j.equals(singleRequest.j) || this.m != singleRequest.m) {
return false;
}
RequestListener<R> requestListener = this.o;
RequestListener<R> requestListener2 = singleRequest.o;
if (requestListener != null) {
if (requestListener2 == null) {
return false;
}
} else if (requestListener2 != null) {
return false;
}
return true;
}
private void a(String str) {
Log.v("Request", str + " this: " + this.b);
}
}

View File

@@ -0,0 +1,168 @@
package com.bumptech.glide.request;
/* loaded from: classes.dex */
public class ThumbnailRequestCoordinator implements RequestCoordinator, Request {
private final RequestCoordinator a;
private Request b;
private Request c;
private boolean d;
ThumbnailRequestCoordinator() {
this(null);
}
private boolean h() {
RequestCoordinator requestCoordinator = this.a;
return requestCoordinator == null || requestCoordinator.c(this);
}
private boolean i() {
RequestCoordinator requestCoordinator = this.a;
return requestCoordinator == null || requestCoordinator.d(this);
}
private boolean j() {
RequestCoordinator requestCoordinator = this.a;
return requestCoordinator != null && requestCoordinator.c();
}
public void a(Request request, Request request2) {
this.b = request;
this.c = request2;
}
@Override // com.bumptech.glide.request.RequestCoordinator
public void b(Request request) {
RequestCoordinator requestCoordinator;
if (request.equals(this.b) && (requestCoordinator = this.a) != null) {
requestCoordinator.b(this);
}
}
@Override // com.bumptech.glide.request.RequestCoordinator
public boolean c(Request request) {
return h() && request.equals(this.b) && !c();
}
@Override // com.bumptech.glide.request.Request
public void clear() {
this.d = false;
this.c.clear();
this.b.clear();
}
@Override // com.bumptech.glide.request.RequestCoordinator
public boolean d(Request request) {
return i() && (request.equals(this.b) || !this.b.b());
}
@Override // com.bumptech.glide.request.RequestCoordinator
public void e(Request request) {
if (request.equals(this.c)) {
return;
}
RequestCoordinator requestCoordinator = this.a;
if (requestCoordinator != null) {
requestCoordinator.e(this);
}
if (this.c.g()) {
return;
}
this.c.clear();
}
@Override // com.bumptech.glide.request.RequestCoordinator
public boolean f(Request request) {
return f() && request.equals(this.b);
}
@Override // com.bumptech.glide.request.Request
public boolean g() {
return this.b.g() || this.c.g();
}
@Override // com.bumptech.glide.request.Request
public boolean isCancelled() {
return this.b.isCancelled();
}
@Override // com.bumptech.glide.request.Request
public boolean isRunning() {
return this.b.isRunning();
}
@Override // com.bumptech.glide.request.Request
public void pause() {
this.d = false;
this.b.pause();
this.c.pause();
}
public ThumbnailRequestCoordinator(RequestCoordinator requestCoordinator) {
this.a = requestCoordinator;
}
private boolean f() {
RequestCoordinator requestCoordinator = this.a;
return requestCoordinator == null || requestCoordinator.f(this);
}
@Override // com.bumptech.glide.request.RequestCoordinator
public boolean c() {
return j() || b();
}
@Override // com.bumptech.glide.request.Request
public boolean d() {
return this.b.d();
}
@Override // com.bumptech.glide.request.Request
public void a() {
this.b.a();
this.c.a();
}
@Override // com.bumptech.glide.request.Request
public boolean b() {
return this.b.b() || this.c.b();
}
@Override // com.bumptech.glide.request.Request
public boolean a(Request request) {
if (!(request instanceof ThumbnailRequestCoordinator)) {
return false;
}
ThumbnailRequestCoordinator thumbnailRequestCoordinator = (ThumbnailRequestCoordinator) request;
Request request2 = this.b;
if (request2 == null) {
if (thumbnailRequestCoordinator.b != null) {
return false;
}
} else if (!request2.a(thumbnailRequestCoordinator.b)) {
return false;
}
Request request3 = this.c;
Request request4 = thumbnailRequestCoordinator.c;
if (request3 == null) {
if (request4 != null) {
return false;
}
} else if (!request3.a(request4)) {
return false;
}
return true;
}
@Override // com.bumptech.glide.request.Request
public void e() {
this.d = true;
if (!this.b.g() && !this.c.isRunning()) {
this.c.e();
}
if (!this.d || this.b.isRunning()) {
return;
}
this.b.e();
}
}

View File

@@ -0,0 +1,43 @@
package com.bumptech.glide.request.target;
import android.graphics.drawable.Drawable;
import com.bumptech.glide.request.Request;
/* loaded from: classes.dex */
public abstract class BaseTarget<Z> implements Target<Z> {
private Request a;
@Override // com.bumptech.glide.manager.LifecycleListener
public void a() {
}
@Override // com.bumptech.glide.request.target.Target
public void a(Drawable drawable) {
}
@Override // com.bumptech.glide.request.target.Target
public void a(Request request) {
this.a = request;
}
@Override // com.bumptech.glide.manager.LifecycleListener
public void b() {
}
@Override // com.bumptech.glide.request.target.Target
public void b(Drawable drawable) {
}
@Override // com.bumptech.glide.request.target.Target
public Request c() {
return this.a;
}
@Override // com.bumptech.glide.request.target.Target
public void c(Drawable drawable) {
}
@Override // com.bumptech.glide.manager.LifecycleListener
public void onStart() {
}
}

View File

@@ -0,0 +1,17 @@
package com.bumptech.glide.request.target;
import android.graphics.Bitmap;
import android.widget.ImageView;
/* loaded from: classes.dex */
public class BitmapImageViewTarget extends ImageViewTarget<Bitmap> {
public BitmapImageViewTarget(ImageView imageView) {
super(imageView);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.bumptech.glide.request.target.ImageViewTarget
public void a(Bitmap bitmap) {
((ImageView) this.b).setImageBitmap(bitmap);
}
}

View File

@@ -0,0 +1,18 @@
package com.bumptech.glide.request.target;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
/* loaded from: classes.dex */
public class DrawableImageViewTarget extends ImageViewTarget<Drawable> {
public DrawableImageViewTarget(ImageView imageView) {
super(imageView);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.bumptech.glide.request.target.ImageViewTarget
/* renamed from: e, reason: merged with bridge method [inline-methods] */
public void a(Drawable drawable) {
((ImageView) this.b).setImageDrawable(drawable);
}
}

View File

@@ -0,0 +1,85 @@
package com.bumptech.glide.request.target;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
import com.bumptech.glide.request.transition.Transition;
/* loaded from: classes.dex */
public abstract class ImageViewTarget<Z> extends ViewTarget<ImageView, Z> implements Transition.ViewAdapter {
private Animatable h;
public ImageViewTarget(ImageView imageView) {
super(imageView);
}
@Override // com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.request.target.Target
public void a(Drawable drawable) {
super.a(drawable);
c((ImageViewTarget<Z>) null);
d(drawable);
}
protected abstract void a(Z z);
@Override // com.bumptech.glide.request.target.ViewTarget, com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.request.target.Target
public void b(Drawable drawable) {
super.b(drawable);
c((ImageViewTarget<Z>) null);
d(drawable);
}
@Override // com.bumptech.glide.request.target.ViewTarget, com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.request.target.Target
public void c(Drawable drawable) {
super.c(drawable);
Animatable animatable = this.h;
if (animatable != null) {
animatable.stop();
}
c((ImageViewTarget<Z>) null);
d(drawable);
}
public void d(Drawable drawable) {
((ImageView) this.b).setImageDrawable(drawable);
}
@Override // com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.manager.LifecycleListener
public void onStart() {
Animatable animatable = this.h;
if (animatable != null) {
animatable.start();
}
}
@Override // com.bumptech.glide.request.target.Target
public void a(Z z, Transition<? super Z> transition) {
if (transition != null && transition.a(z, this)) {
b((ImageViewTarget<Z>) z);
} else {
c((ImageViewTarget<Z>) z);
}
}
@Override // com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.manager.LifecycleListener
public void b() {
Animatable animatable = this.h;
if (animatable != null) {
animatable.stop();
}
}
private void b(Z z) {
if (z instanceof Animatable) {
this.h = (Animatable) z;
this.h.start();
} else {
this.h = null;
}
}
private void c(Z z) {
a((ImageViewTarget<Z>) z);
b((ImageViewTarget<Z>) z);
}
}

View File

@@ -0,0 +1,18 @@
package com.bumptech.glide.request.target;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
/* loaded from: classes.dex */
public class ImageViewTargetFactory {
public <Z> ViewTarget<ImageView, Z> a(ImageView imageView, Class<Z> cls) {
if (Bitmap.class.equals(cls)) {
return new BitmapImageViewTarget(imageView);
}
if (Drawable.class.isAssignableFrom(cls)) {
return new DrawableImageViewTarget(imageView);
}
throw new IllegalArgumentException("Unhandled class: " + cls + ", try .as*(Class).transcode(ResourceTranscoder)");
}
}

View File

@@ -0,0 +1,31 @@
package com.bumptech.glide.request.target;
import com.bumptech.glide.util.Util;
/* loaded from: classes.dex */
public abstract class SimpleTarget<Z> extends BaseTarget<Z> {
private final int b;
private final int c;
public SimpleTarget() {
this(Integer.MIN_VALUE, Integer.MIN_VALUE);
}
@Override // com.bumptech.glide.request.target.Target
public void a(SizeReadyCallback sizeReadyCallback) {
}
@Override // com.bumptech.glide.request.target.Target
public final void b(SizeReadyCallback sizeReadyCallback) {
if (Util.b(this.b, this.c)) {
sizeReadyCallback.a(this.b, this.c);
return;
}
throw new IllegalArgumentException("Width and height must both be > 0 or Target#SIZE_ORIGINAL, but given width: " + this.b + " and height: " + this.c + ", either provide dimensions in the constructor or call override()");
}
public SimpleTarget(int i, int i2) {
this.b = i;
this.c = i2;
}
}

View File

@@ -0,0 +1,6 @@
package com.bumptech.glide.request.target;
/* loaded from: classes.dex */
public interface SizeReadyCallback {
void a(int i, int i2);
}

View File

@@ -0,0 +1,25 @@
package com.bumptech.glide.request.target;
import android.graphics.drawable.Drawable;
import com.bumptech.glide.manager.LifecycleListener;
import com.bumptech.glide.request.Request;
import com.bumptech.glide.request.transition.Transition;
/* loaded from: classes.dex */
public interface Target<R> extends LifecycleListener {
void a(Drawable drawable);
void a(Request request);
void a(SizeReadyCallback sizeReadyCallback);
void a(R r, Transition<? super R> transition);
void b(Drawable drawable);
void b(SizeReadyCallback sizeReadyCallback);
Request c();
void c(Drawable drawable);
}

View File

@@ -0,0 +1,247 @@
package com.bumptech.glide.request.target;
import android.content.Context;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import com.bumptech.glide.request.Request;
import com.bumptech.glide.util.Preconditions;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes.dex */
public abstract class ViewTarget<T extends View, Z> extends BaseTarget<Z> {
private static Integer g;
protected final T b;
private final SizeDeterminer c;
private View.OnAttachStateChangeListener d;
private boolean e;
private boolean f;
public ViewTarget(T t) {
Preconditions.a(t);
this.b = t;
this.c = new SizeDeterminer(t);
}
private Object d() {
Integer num = g;
return num == null ? this.b.getTag() : this.b.getTag(num.intValue());
}
private void e() {
View.OnAttachStateChangeListener onAttachStateChangeListener = this.d;
if (onAttachStateChangeListener == null || this.f) {
return;
}
this.b.addOnAttachStateChangeListener(onAttachStateChangeListener);
this.f = true;
}
private void f() {
View.OnAttachStateChangeListener onAttachStateChangeListener = this.d;
if (onAttachStateChangeListener == null || !this.f) {
return;
}
this.b.removeOnAttachStateChangeListener(onAttachStateChangeListener);
this.f = false;
}
@Override // com.bumptech.glide.request.target.Target
public void a(SizeReadyCallback sizeReadyCallback) {
this.c.b(sizeReadyCallback);
}
@Override // com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.request.target.Target
public void b(Drawable drawable) {
super.b(drawable);
e();
}
@Override // com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.request.target.Target
public void c(Drawable drawable) {
super.c(drawable);
this.c.b();
if (this.e) {
return;
}
f();
}
public String toString() {
return "Target for: " + this.b;
}
static final class SizeDeterminer {
static Integer e;
private final View a;
private final List<SizeReadyCallback> b = new ArrayList();
boolean c;
private SizeDeterminerLayoutListener d;
private static final class SizeDeterminerLayoutListener implements ViewTreeObserver.OnPreDrawListener {
private final WeakReference<SizeDeterminer> a;
SizeDeterminerLayoutListener(SizeDeterminer sizeDeterminer) {
this.a = new WeakReference<>(sizeDeterminer);
}
@Override // android.view.ViewTreeObserver.OnPreDrawListener
public boolean onPreDraw() {
if (Log.isLoggable("ViewTarget", 2)) {
Log.v("ViewTarget", "OnGlobalLayoutListener called attachStateListener=" + this);
}
SizeDeterminer sizeDeterminer = this.a.get();
if (sizeDeterminer == null) {
return true;
}
sizeDeterminer.a();
return true;
}
}
SizeDeterminer(View view) {
this.a = view;
}
private static int a(Context context) {
if (e == null) {
WindowManager windowManager = (WindowManager) context.getSystemService("window");
Preconditions.a(windowManager);
Display defaultDisplay = windowManager.getDefaultDisplay();
Point point = new Point();
defaultDisplay.getSize(point);
e = Integer.valueOf(Math.max(point.x, point.y));
}
return e.intValue();
}
private boolean a(int i) {
return i > 0 || i == Integer.MIN_VALUE;
}
private void b(int i, int i2) {
Iterator it = new ArrayList(this.b).iterator();
while (it.hasNext()) {
((SizeReadyCallback) it.next()).a(i, i2);
}
}
private int c() {
int paddingTop = this.a.getPaddingTop() + this.a.getPaddingBottom();
ViewGroup.LayoutParams layoutParams = this.a.getLayoutParams();
return a(this.a.getHeight(), layoutParams != null ? layoutParams.height : 0, paddingTop);
}
private int d() {
int paddingLeft = this.a.getPaddingLeft() + this.a.getPaddingRight();
ViewGroup.LayoutParams layoutParams = this.a.getLayoutParams();
return a(this.a.getWidth(), layoutParams != null ? layoutParams.width : 0, paddingLeft);
}
void b(SizeReadyCallback sizeReadyCallback) {
this.b.remove(sizeReadyCallback);
}
void b() {
ViewTreeObserver viewTreeObserver = this.a.getViewTreeObserver();
if (viewTreeObserver.isAlive()) {
viewTreeObserver.removeOnPreDrawListener(this.d);
}
this.d = null;
this.b.clear();
}
void a() {
if (this.b.isEmpty()) {
return;
}
int d = d();
int c = c();
if (a(d, c)) {
b(d, c);
b();
}
}
void a(SizeReadyCallback sizeReadyCallback) {
int d = d();
int c = c();
if (a(d, c)) {
sizeReadyCallback.a(d, c);
return;
}
if (!this.b.contains(sizeReadyCallback)) {
this.b.add(sizeReadyCallback);
}
if (this.d == null) {
ViewTreeObserver viewTreeObserver = this.a.getViewTreeObserver();
this.d = new SizeDeterminerLayoutListener(this);
viewTreeObserver.addOnPreDrawListener(this.d);
}
}
private boolean a(int i, int i2) {
return a(i) && a(i2);
}
private int a(int i, int i2, int i3) {
int i4 = i2 - i3;
if (i4 > 0) {
return i4;
}
if (this.c && this.a.isLayoutRequested()) {
return 0;
}
int i5 = i - i3;
if (i5 > 0) {
return i5;
}
if (this.a.isLayoutRequested() || i2 != -2) {
return 0;
}
if (Log.isLoggable("ViewTarget", 4)) {
Log.i("ViewTarget", "Glide treats LayoutParams.WRAP_CONTENT as a request for an image the size of this device's screen dimensions. If you want to load the original image and are ok with the corresponding memory cost and OOMs (depending on the input size), use .override(Target.SIZE_ORIGINAL). Otherwise, use LayoutParams.MATCH_PARENT, set layout_width and layout_height to fixed dimension, or use .override() with fixed dimensions.");
}
return a(this.a.getContext());
}
}
@Override // com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.request.target.Target
public void a(Request request) {
a((Object) request);
}
private void a(Object obj) {
Integer num = g;
if (num == null) {
this.b.setTag(obj);
} else {
this.b.setTag(num.intValue(), obj);
}
}
@Override // com.bumptech.glide.request.target.Target
public void b(SizeReadyCallback sizeReadyCallback) {
this.c.a(sizeReadyCallback);
}
@Override // com.bumptech.glide.request.target.BaseTarget, com.bumptech.glide.request.target.Target
public Request c() {
Object d = d();
if (d == null) {
return null;
}
if (d instanceof Request) {
return (Request) d;
}
throw new IllegalArgumentException("You must not call setTag() on a view Glide is targeting");
}
}

View File

@@ -0,0 +1,26 @@
package com.bumptech.glide.request.transition;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.request.transition.Transition;
/* loaded from: classes.dex */
public class NoTransition<R> implements Transition<R> {
static final NoTransition<?> a = new NoTransition<>();
private static final TransitionFactory<?> b = new NoAnimationFactory();
public static class NoAnimationFactory<R> implements TransitionFactory<R> {
@Override // com.bumptech.glide.request.transition.TransitionFactory
public Transition<R> a(DataSource dataSource, boolean z) {
return NoTransition.a;
}
}
public static <R> TransitionFactory<R> a() {
return (TransitionFactory<R>) b;
}
@Override // com.bumptech.glide.request.transition.Transition
public boolean a(Object obj, Transition.ViewAdapter viewAdapter) {
return false;
}
}

View File

@@ -0,0 +1,10 @@
package com.bumptech.glide.request.transition;
/* loaded from: classes.dex */
public interface Transition<R> {
public interface ViewAdapter {
}
boolean a(R r, ViewAdapter viewAdapter);
}

View File

@@ -0,0 +1,8 @@
package com.bumptech.glide.request.transition;
import com.bumptech.glide.load.DataSource;
/* loaded from: classes.dex */
public interface TransitionFactory<R> {
Transition<R> a(DataSource dataSource, boolean z);
}