package o; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import com.bumptech.glide.Glide; import java.security.MessageDigest; /* loaded from: classes.dex */ public final class lvR implements wfh { private final wfh a; private final boolean d; public lvR(wfh wfhVar, boolean z) { this.a = wfhVar; this.d = z; } @Override // o.wfh public final Ezi b(Context context, Ezi ezi, int i, int i2) { sqY sqy = Glide.a(context).a; Drawable e = ezi.e(); Ezi EN_ = C16327nWu.EN_(sqy, e, i, i2); if (EN_ == null) { if (!this.d) { return ezi; } StringBuilder sb = new StringBuilder("Unable to convert "); sb.append(e); sb.append(" to a Bitmap"); throw new IllegalArgumentException(sb.toString()); } Ezi b = this.a.b(context, EN_, i, i2); if (b.equals(EN_)) { b.b(); return ezi; } Resources resources = context.getResources(); if (b == null) { return null; } return new JzU(resources, b); } @Override // o.InterfaceC2545agd public final boolean equals(Object obj) { if (obj instanceof lvR) { return this.a.equals(((lvR) obj).a); } return false; } @Override // o.InterfaceC2545agd public final int hashCode() { return this.a.hashCode(); } @Override // o.InterfaceC2545agd public final void a(MessageDigest messageDigest) { this.a.a(messageDigest); } }