discord-jadx/app/src/main/java/b/f/j/h/a.java

113 lines
3.6 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.f.j.h;
2021-07-24 02:37:17 +00:00
import android.graphics.Bitmap;
2021-12-17 21:59:34 +00:00
import b.f.j.d.b;
import b.f.j.j.c;
import b.f.j.j.e;
import b.f.j.j.h;
import b.f.j.j.i;
import b.f.j.n.d;
2021-07-24 02:37:17 +00:00
import com.facebook.common.references.CloseableReference;
import com.facebook.imagepipeline.decoder.DecodeException;
2022-01-13 08:07:50 +00:00
import java.io.InputStream;
2021-07-24 02:37:17 +00:00
import java.util.Objects;
/* compiled from: DefaultImageDecoder */
public class a implements b {
public final b a;
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public final b f585b;
2021-12-17 21:59:34 +00:00
public final d c;
2022-02-02 08:50:56 +00:00
public final b d = new C0064a();
2021-07-24 02:37:17 +00:00
/* compiled from: DefaultImageDecoder */
2021-12-17 21:59:34 +00:00
/* renamed from: b.f.j.h.a$a reason: collision with other inner class name */
2022-02-02 08:50:56 +00:00
public class C0064a implements b {
public C0064a() {
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.f.j.h.b
2021-07-24 02:37:17 +00:00
public c a(e eVar, int i, i iVar, b bVar) {
2022-01-13 08:07:50 +00:00
eVar.x();
2021-12-17 21:59:34 +00:00
b.f.i.c cVar = eVar.l;
if (cVar == b.f.i.b.a) {
2022-01-13 08:07:50 +00:00
CloseableReference<Bitmap> b2 = a.this.c.b(eVar, bVar.d, null, i, null);
2021-07-24 02:37:17 +00:00
try {
2022-01-13 08:07:50 +00:00
b.c.a.a0.d.g1(null, b2);
eVar.x();
2021-12-02 18:53:44 +00:00
int i2 = eVar.m;
2022-01-13 08:07:50 +00:00
eVar.x();
b.f.j.j.d dVar = new b.f.j.j.d(b2, iVar, i2, eVar.n);
Boolean bool = Boolean.FALSE;
if (c.j.contains("is_rounded")) {
dVar.k.put("is_rounded", bool);
}
return dVar;
2021-07-24 02:37:17 +00:00
} finally {
2021-12-17 21:59:34 +00:00
b2.close();
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
} else if (cVar == b.f.i.b.c) {
2022-01-13 08:07:50 +00:00
a aVar = a.this;
Objects.requireNonNull(aVar);
eVar.x();
2021-12-02 18:53:44 +00:00
if (eVar.o != -1) {
2022-01-13 08:07:50 +00:00
eVar.x();
2021-12-02 18:53:44 +00:00
if (eVar.p != -1) {
2021-07-24 02:37:17 +00:00
Objects.requireNonNull(bVar);
2022-01-13 08:07:50 +00:00
b bVar2 = aVar.a;
return bVar2 != null ? bVar2.a(eVar, i, iVar, bVar) : aVar.b(eVar, bVar);
2021-07-24 02:37:17 +00:00
}
}
throw new DecodeException("image width or height is incorrect", eVar);
2021-12-17 21:59:34 +00:00
} else if (cVar == b.f.i.b.j) {
2022-01-27 07:52:47 +00:00
b bVar3 = a.this.f585b;
2022-01-13 08:07:50 +00:00
if (bVar3 != null) {
return bVar3.a(eVar, i, iVar, bVar);
2021-07-24 02:37:17 +00:00
}
2022-01-13 08:07:50 +00:00
throw new DecodeException("Animated WebP support not set up!", eVar);
} else if (cVar != b.f.i.c.a) {
return a.this.b(eVar, bVar);
} else {
2021-07-24 02:37:17 +00:00
throw new DecodeException("unknown image format", eVar);
}
}
}
public a(b bVar, b bVar2, d dVar) {
this.a = bVar;
2022-01-27 07:52:47 +00:00
this.f585b = bVar2;
2021-12-17 21:59:34 +00:00
this.c = dVar;
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.f.j.h.b
2021-07-24 02:37:17 +00:00
public c a(e eVar, int i, i iVar, b bVar) {
2022-01-13 08:07:50 +00:00
InputStream e;
2021-07-24 02:37:17 +00:00
Objects.requireNonNull(bVar);
2022-01-13 08:07:50 +00:00
eVar.x();
2021-12-17 21:59:34 +00:00
b.f.i.c cVar = eVar.l;
2022-01-13 08:07:50 +00:00
if ((cVar == null || cVar == b.f.i.c.a) && (e = eVar.e()) != null) {
eVar.l = b.f.i.d.b(e);
2021-07-24 02:37:17 +00:00
}
return this.d.a(eVar, i, iVar, bVar);
}
2021-12-17 21:59:34 +00:00
public b.f.j.j.d b(e eVar, b bVar) {
CloseableReference<Bitmap> a = this.c.a(eVar, bVar.d, null, null);
2021-07-24 02:37:17 +00:00
try {
2022-01-13 08:07:50 +00:00
b.c.a.a0.d.g1(null, a);
2021-07-24 02:37:17 +00:00
i iVar = h.a;
2022-01-13 08:07:50 +00:00
eVar.x();
2021-12-02 18:53:44 +00:00
int i = eVar.m;
2022-01-13 08:07:50 +00:00
eVar.x();
b.f.j.j.d dVar = new b.f.j.j.d(a, iVar, i, eVar.n);
Boolean bool = Boolean.FALSE;
if (c.j.contains("is_rounded")) {
dVar.k.put("is_rounded", bool);
}
return dVar;
2021-07-24 02:37:17 +00:00
} finally {
a.close();
}
}
}