121 lines
4.2 KiB
Java
121 lines
4.2 KiB
Java
package o;
|
|
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.BitmapFactory;
|
|
import android.graphics.BitmapRegionDecoder;
|
|
import android.graphics.Rect;
|
|
import com.pdfview.subsamplincscaleimageview.SubsamplingScaleImageView;
|
|
import java.util.concurrent.locks.ReadWriteLock;
|
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class Qgz implements InterfaceC14459ftc {
|
|
private static int b = 1;
|
|
private static int c;
|
|
private BitmapRegionDecoder a;
|
|
private final ReadWriteLock d;
|
|
private final Bitmap.Config e;
|
|
|
|
public Qgz() {
|
|
this((byte) 0);
|
|
}
|
|
|
|
private Qgz(byte b2) {
|
|
this.d = new ReentrantReadWriteLock(true);
|
|
Bitmap.Config Pi_ = SubsamplingScaleImageView.Pi_();
|
|
if (Pi_ != null) {
|
|
this.e = Pi_;
|
|
} else {
|
|
this.e = Bitmap.Config.RGB_565;
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:15:0x0093, code lost:
|
|
|
|
if (((java.lang.Boolean) java.lang.String.class.getMethod("equals", r11).invoke(r5, r8)).booleanValue() != false) goto L21;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:16:0x00b8, code lost:
|
|
|
|
r0 = o.Qgz.b + 75;
|
|
o.Qgz.c = r0 % 128;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:17:0x00c1, code lost:
|
|
|
|
if ((r0 % 2) == 0) goto L24;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:18:0x00c3, code lost:
|
|
|
|
r15 = r15.get(0);
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:19:0x00cc, code lost:
|
|
|
|
r15 = r3.getIdentifier(r15, "drawable", r1);
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:24:0x00c8, code lost:
|
|
|
|
r15 = r15.get(1);
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:27:0x00b6, code lost:
|
|
|
|
if (((java.lang.Boolean) java.lang.String.class.getMethod("equals", java.lang.Object.class).invoke(r15.get(0), "drawable")).booleanValue() != false) goto L21;
|
|
*/
|
|
@Override // o.InterfaceC14459ftc
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final android.graphics.Point Pv_(android.content.Context r14, android.net.Uri r15) throws java.lang.Exception {
|
|
/*
|
|
Method dump skipped, instructions count: 560
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.Qgz.Pv_(android.content.Context, android.net.Uri):android.graphics.Point");
|
|
}
|
|
|
|
@Override // o.InterfaceC14459ftc
|
|
public final Bitmap Pu_(Rect rect, int i) {
|
|
this.d.readLock().lock();
|
|
try {
|
|
BitmapRegionDecoder bitmapRegionDecoder = this.a;
|
|
if (bitmapRegionDecoder == null || bitmapRegionDecoder.isRecycled()) {
|
|
throw new IllegalStateException("Cannot decode region after decoder has been recycled");
|
|
}
|
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
|
options.inSampleSize = i;
|
|
options.inPreferredConfig = this.e;
|
|
Bitmap decodeRegion = this.a.decodeRegion(rect, options);
|
|
if (decodeRegion != null) {
|
|
return decodeRegion;
|
|
}
|
|
throw new RuntimeException("Skia image decoder returned null bitmap - image format may not be supported");
|
|
} finally {
|
|
this.d.readLock().unlock();
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC14459ftc
|
|
public final boolean a() {
|
|
boolean z;
|
|
synchronized (this) {
|
|
BitmapRegionDecoder bitmapRegionDecoder = this.a;
|
|
if (bitmapRegionDecoder != null) {
|
|
z = bitmapRegionDecoder.isRecycled() ? false : true;
|
|
}
|
|
}
|
|
return z;
|
|
}
|
|
|
|
@Override // o.InterfaceC14459ftc
|
|
public final void c() {
|
|
synchronized (this) {
|
|
this.d.writeLock().lock();
|
|
try {
|
|
this.a.recycle();
|
|
this.a = null;
|
|
} finally {
|
|
this.d.writeLock().unlock();
|
|
}
|
|
}
|
|
}
|
|
}
|