56 lines
1.7 KiB
Java
56 lines
1.7 KiB
Java
package c.f.j.p;
|
|
|
|
import android.content.res.AssetFileDescriptor;
|
|
import android.content.res.AssetManager;
|
|
import c.f.d.g.g;
|
|
import c.f.j.j.e;
|
|
import com.facebook.imagepipeline.request.ImageRequest;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.util.concurrent.Executor;
|
|
/* compiled from: LocalAssetFetchProducer */
|
|
public class d0 extends g0 {
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final AssetManager f479c;
|
|
|
|
public d0(Executor executor, g gVar, AssetManager assetManager) {
|
|
super(executor, gVar);
|
|
this.f479c = assetManager;
|
|
}
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:12:0x0031, code lost:
|
|
if (r1 == null) goto L_0x0036;
|
|
*/
|
|
@Override // c.f.j.p.g0
|
|
public e d(ImageRequest imageRequest) throws IOException {
|
|
int i;
|
|
InputStream open = this.f479c.open(imageRequest.f2297c.getPath().substring(1), 2);
|
|
AssetFileDescriptor assetFileDescriptor = null;
|
|
try {
|
|
assetFileDescriptor = this.f479c.openFd(imageRequest.f2297c.getPath().substring(1));
|
|
i = (int) assetFileDescriptor.getLength();
|
|
} catch (IOException unused) {
|
|
i = -1;
|
|
} catch (Throwable th) {
|
|
if (assetFileDescriptor != null) {
|
|
try {
|
|
assetFileDescriptor.close();
|
|
} catch (IOException unused2) {
|
|
}
|
|
}
|
|
throw th;
|
|
}
|
|
try {
|
|
assetFileDescriptor.close();
|
|
} catch (IOException unused3) {
|
|
}
|
|
return c(open, i);
|
|
}
|
|
|
|
@Override // c.f.j.p.g0
|
|
public String e() {
|
|
return "LocalAssetFetchProducer";
|
|
}
|
|
}
|