41 lines
1.3 KiB
Java
41 lines
1.3 KiB
Java
package c.f.j.p;
|
|
|
|
import android.net.Uri;
|
|
import android.util.Base64;
|
|
import c.f.d.b.a;
|
|
import c.f.d.g.g;
|
|
import c.f.j.j.e;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.facebook.imagepipeline.request.ImageRequest;
|
|
import java.io.ByteArrayInputStream;
|
|
import java.io.IOException;
|
|
/* compiled from: DataFetchProducer */
|
|
public class m extends g0 {
|
|
public m(g gVar) {
|
|
super(a.i, gVar);
|
|
}
|
|
|
|
@Override // c.f.j.p.g0
|
|
public e d(ImageRequest imageRequest) throws IOException {
|
|
boolean z2;
|
|
String uri = imageRequest.f2265c.toString();
|
|
AnimatableValueParser.j(Boolean.valueOf(uri.substring(0, 5).equals("data:")));
|
|
int indexOf = uri.indexOf(44);
|
|
String substring = uri.substring(indexOf + 1, uri.length());
|
|
String substring2 = uri.substring(0, indexOf);
|
|
if (!substring2.contains(";")) {
|
|
z2 = false;
|
|
} else {
|
|
String[] split = substring2.split(";");
|
|
z2 = split[split.length - 1].equals("base64");
|
|
}
|
|
byte[] decode = z2 ? Base64.decode(substring, 0) : Uri.decode(substring).getBytes();
|
|
return c(new ByteArrayInputStream(decode), decode.length);
|
|
}
|
|
|
|
@Override // c.f.j.p.g0
|
|
public String e() {
|
|
return "DataFetchProducer";
|
|
}
|
|
}
|