52 lines
1.5 KiB
Java
52 lines
1.5 KiB
Java
package c.c.a.x;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.text.TextUtils;
|
|
import android.view.View;
|
|
import androidx.annotation.Nullable;
|
|
import c.c.a.b0.c;
|
|
import c.c.a.k;
|
|
import c.d.b.a.a;
|
|
import com.discord.widgets.chat.input.MentionUtilsKt;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
/* compiled from: ImageAssetManager */
|
|
public class b {
|
|
public static final Object a = new Object();
|
|
public final Context b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public String f299c;
|
|
@Nullable
|
|
public c.c.a.b d;
|
|
public final Map<String, k> e;
|
|
|
|
public b(Drawable.Callback callback, String str, c.c.a.b bVar, Map<String, k> map) {
|
|
this.f299c = str;
|
|
if (!TextUtils.isEmpty(str)) {
|
|
String str2 = this.f299c;
|
|
if (str2.charAt(str2.length() - 1) != '/') {
|
|
this.f299c = a.C(new StringBuilder(), this.f299c, MentionUtilsKt.SLASH_CHAR);
|
|
}
|
|
}
|
|
if (!(callback instanceof View)) {
|
|
c.b("LottieDrawable must be inside of a view for images to work.");
|
|
this.e = new HashMap();
|
|
this.b = null;
|
|
return;
|
|
}
|
|
this.b = ((View) callback).getContext();
|
|
this.e = map;
|
|
this.d = bVar;
|
|
}
|
|
|
|
public final Bitmap a(String str, @Nullable Bitmap bitmap) {
|
|
synchronized (a) {
|
|
this.e.get(str).e = bitmap;
|
|
}
|
|
return bitmap;
|
|
}
|
|
}
|