93 lines
2.9 KiB
Java
93 lines
2.9 KiB
Java
|
package o;
|
||
|
|
||
|
import android.os.AsyncTask;
|
||
|
import com.github.barteksc.pdfviewer.PDFView;
|
||
|
import com.shockwave.pdfium.PdfiumCore;
|
||
|
import com.shockwave.pdfium.util.Size;
|
||
|
import java.lang.ref.WeakReference;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class EDi extends AsyncTask<Void, Void, Throwable> {
|
||
|
private msi a;
|
||
|
private WeakReference<PDFView> d;
|
||
|
private Lni e;
|
||
|
private PdfiumCore g;
|
||
|
private int[] i = null;
|
||
|
private boolean b = false;
|
||
|
private String c = null;
|
||
|
|
||
|
@Override // android.os.AsyncTask
|
||
|
protected final /* synthetic */ Throwable doInBackground(Void[] voidArr) {
|
||
|
return c();
|
||
|
}
|
||
|
|
||
|
@Override // android.os.AsyncTask
|
||
|
protected final /* synthetic */ void onPostExecute(Throwable th) {
|
||
|
Throwable th2 = th;
|
||
|
PDFView pDFView = this.d.get();
|
||
|
if (pDFView != null) {
|
||
|
if (th2 == null) {
|
||
|
if (this.b) {
|
||
|
return;
|
||
|
}
|
||
|
msi msiVar = this.a;
|
||
|
pDFView.G = PDFView.IeS.LOADED;
|
||
|
pDFView.y = msiVar;
|
||
|
if (!pDFView.x.isAlive()) {
|
||
|
pDFView.x.start();
|
||
|
}
|
||
|
Cci cci = new Cci(pDFView.x.getLooper(), pDFView);
|
||
|
pDFView.w = cci;
|
||
|
cci.e = true;
|
||
|
uFI ufi = pDFView.D;
|
||
|
pDFView.f6459o.e = true;
|
||
|
Gyh gyh = pDFView.g;
|
||
|
int i = msiVar.f;
|
||
|
pDFView.b(pDFView.h);
|
||
|
return;
|
||
|
}
|
||
|
pDFView.G = PDFView.IeS.ERROR;
|
||
|
InterfaceC0428GiV interfaceC0428GiV = pDFView.g.d;
|
||
|
pDFView.a();
|
||
|
pDFView.invalidate();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public EDi(Lni lni, String str, int[] iArr, PDFView pDFView, PdfiumCore pdfiumCore) {
|
||
|
this.e = lni;
|
||
|
this.d = new WeakReference<>(pDFView);
|
||
|
this.g = pdfiumCore;
|
||
|
}
|
||
|
|
||
|
private Throwable c() {
|
||
|
try {
|
||
|
PDFView pDFView = this.d.get();
|
||
|
if (pDFView != null) {
|
||
|
Lni lni = this.e;
|
||
|
pDFView.getContext();
|
||
|
C12960fMh a = lni.a(this.g, this.c);
|
||
|
PdfiumCore pdfiumCore = this.g;
|
||
|
IUh iUh = pDFView.q;
|
||
|
Size size = new Size(pDFView.getWidth(), pDFView.getHeight());
|
||
|
int[] iArr = this.i;
|
||
|
boolean z = pDFView.H;
|
||
|
int i = pDFView.B;
|
||
|
int i2 = pDFView.C;
|
||
|
int i3 = pDFView.z;
|
||
|
int i4 = pDFView.A;
|
||
|
boolean z2 = pDFView.a;
|
||
|
this.a = new msi(pdfiumCore, a, iUh, size, iArr, z, i, i2, i3, i4, false, pDFView.m);
|
||
|
return null;
|
||
|
}
|
||
|
return new NullPointerException("pdfView == null");
|
||
|
} catch (Throwable th) {
|
||
|
return th;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.os.AsyncTask
|
||
|
protected final void onCancelled() {
|
||
|
this.b = true;
|
||
|
}
|
||
|
}
|