Source/sources/android/support/p000v4/print/PrintHelper.java
@RequiresApi(19)
    public void writeBitmap(PrintAttributes attributes, int fittingMode, Bitmap bitmap, ParcelFileDescriptor fileDescriptor, CancellationSignal cancellationSignal, WriteResultCallback writeResultCallback) {
        final PrintAttributes pdfAttributes;
        if (IS_MIN_MARGINS_HANDLING_CORRECT) {
            pdfAttributes = attributes;
        } else {
            pdfAttributes = copyAttributes(attributes).setMinMargins(new Margins(0, 0, 0, 0)).build();
        }
        final CancellationSignal cancellationSignal2 = cancellationSignal;
        final Bitmap bitmap2 = bitmap;
        final PrintAttributes printAttributes = attributes;
        final int i = fittingMode;
        final ParcelFileDescriptor parcelFileDescriptor = fileDescriptor;
        final WriteResultCallback writeResultCallback2 = writeResultCallback;
        new AsyncTask<Void, Void, Throwable>() {
            /* access modifiers changed from: protected */
            /* JADX WARNING: No exception handlers in catch block: Catch:{  } */
            /* JADX WARNING: Unknown top exception splitter block from list: {B:20:0x0070=Splitter:B:20:0x0070, B:33:0x00ab=Splitter:B:33:0x00ab, B:46:0x00dc=Splitter:B:46:0x00dc} */
            /* Code decompiled incorrectly, please refer to instructions dump. */
            public java.lang.Throwable doInBackground(java.lang.Void... r12) {
                /*
                    r11 = this;
                    r7 = 0
                    android.os.CancellationSignal r8 = r2     // Catch:{ Throwable -> 0x0078 }
                    boolean r8 = r8.isCanceled()     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x000a
                L_0x0009:
                    return r7
                L_0x000a:
                    android.print.pdf.PrintedPdfDocument r6 = new android.print.pdf.PrintedPdfDocument     // Catch:{ Throwable -> 0x0078 }
                    android.support.v4.print.PrintHelper r8 = android.support.p000v4.print.PrintHelper.this     // Catch:{ Throwable -> 0x0078 }
                    android.content.Context r8 = r8.mContext     // Catch:{ Throwable -> 0x0078 }
                    android.print.PrintAttributes r9 = r3     // Catch:{ Throwable -> 0x0078 }
                    r6.<init>(r8, r9)     // Catch:{ Throwable -> 0x0078 }
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    android.print.PrintAttributes r9 = r3     // Catch:{ Throwable -> 0x0078 }
                    int r9 = r9.getColorMode()     // Catch:{ Throwable -> 0x0078 }
                    android.graphics.Bitmap r4 = android.support.p000v4.print.PrintHelper.convertBitmapForColorMode(r8, r9)     // Catch:{ Throwable -> 0x0078 }
                    android.os.CancellationSignal r8 = r2     // Catch:{ Throwable -> 0x0078 }
                    boolean r8 = r8.isCanceled()     // Catch:{ Throwable -> 0x0078 }
                    if (r8 != 0) goto L_0x0009
                    r8 = 1
                    android.graphics.pdf.PdfDocument$Page r5 = r6.startPage(r8)     // Catch:{ all -> 0x009e }
                    boolean r8 = android.support.p000v4.print.PrintHelper.IS_MIN_MARGINS_HANDLING_CORRECT     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x007a
                    android.graphics.RectF r0 = new android.graphics.RectF     // Catch:{ all -> 0x009e }
                    android.graphics.pdf.PdfDocument$PageInfo r8 = r5.getInfo()     // Catch:{ all -> 0x009e }
                    android.graphics.Rect r8 = r8.getContentRect()     // Catch:{ all -> 0x009e }
                    r0.<init>(r8)     // Catch:{ all -> 0x009e }
                L_0x003f:
                    int r8 = r4.getWidth()     // Catch:{ all -> 0x009e }
                    int r9 = r4.getHeight()     // Catch:{ all -> 0x009e }
                    int r10 = r6     // Catch:{ all -> 0x009e }
                    android.graphics.Matrix r3 = android.support.p000v4.print.PrintHelper.getMatrix(r8, r9, r0, r10)     // Catch:{ all -> 0x009e }
                    boolean r8 = android.support.p000v4.print.PrintHelper.IS_MIN_MARGINS_HANDLING_CORRECT     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x00b3
                L_0x0051:
                    android.graphics.Canvas r8 = r5.getCanvas()     // Catch:{ all -> 0x009e }
                    r9 = 0
                    r8.drawBitmap(r4, r3, r9)     // Catch:{ all -> 0x009e }
                    r6.finishPage(r5)     // Catch:{ all -> 0x009e }
                    android.os.CancellationSignal r8 = r2     // Catch:{ all -> 0x009e }
                    boolean r8 = r8.isCanceled()     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x00c2
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x0070
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ IOException -> 0x00e9 }
                    r8.close()     // Catch:{ IOException -> 0x00e9 }
                L_0x0070:
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r8) goto L_0x0009
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                    goto L_0x0009
                L_0x0078:
                    r7 = move-exception
                    goto L_0x0009
                L_0x007a:
                    android.print.pdf.PrintedPdfDocument r1 = new android.print.pdf.PrintedPdfDocument     // Catch:{ all -> 0x009e }
                    android.support.v4.print.PrintHelper r8 = android.support.p000v4.print.PrintHelper.this     // Catch:{ all -> 0x009e }
                    android.content.Context r8 = r8.mContext     // Catch:{ all -> 0x009e }
                    android.print.PrintAttributes r9 = r5     // Catch:{ all -> 0x009e }
                    r1.<init>(r8, r9)     // Catch:{ all -> 0x009e }
                    r8 = 1
                    android.graphics.pdf.PdfDocument$Page r2 = r1.startPage(r8)     // Catch:{ all -> 0x009e }
                    android.graphics.RectF r0 = new android.graphics.RectF     // Catch:{ all -> 0x009e }
                    android.graphics.pdf.PdfDocument$PageInfo r8 = r2.getInfo()     // Catch:{ all -> 0x009e }
                    android.graphics.Rect r8 = r8.getContentRect()     // Catch:{ all -> 0x009e }
                    r0.<init>(r8)     // Catch:{ all -> 0x009e }
                    r1.finishPage(r2)     // Catch:{ all -> 0x009e }
                    r1.close()     // Catch:{ all -> 0x009e }
                    goto L_0x003f
                L_0x009e:
                    r8 = move-exception
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r9 == 0) goto L_0x00ab
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ IOException -> 0x00e5 }
                    r9.close()     // Catch:{ IOException -> 0x00e5 }
                L_0x00ab:
                    android.graphics.Bitmap r9 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r9) goto L_0x00b2
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                L_0x00b2:
                    throw r8     // Catch:{ Throwable -> 0x0078 }
                L_0x00b3:
                    float r8 = r0.left     // Catch:{ all -> 0x009e }
                    float r9 = r0.top     // Catch:{ all -> 0x009e }
                    r3.postTranslate(r8, r9)     // Catch:{ all -> 0x009e }
                    android.graphics.Canvas r8 = r5.getCanvas()     // Catch:{ all -> 0x009e }
                    r8.clipRect(r0)     // Catch:{ all -> 0x009e }
                    goto L_0x0051
                L_0x00c2:
                    java.io.FileOutputStream r8 = new java.io.FileOutputStream     // Catch:{ all -> 0x009e }
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ all -> 0x009e }
                    java.io.FileDescriptor r9 = r9.getFileDescriptor()     // Catch:{ all -> 0x009e }
                    r8.<init>(r9)     // Catch:{ all -> 0x009e }
                    r6.writeTo(r8)     // Catch:{ all -> 0x009e }
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x00dc
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ IOException -> 0x00e7 }
                    r8.close()     // Catch:{ IOException -> 0x00e7 }
                L_0x00dc:
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r8) goto L_0x0009
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                    goto L_0x0009
                L_0x00e5:
                    r9 = move-exception
                    goto L_0x00ab
                L_0x00e7:
                    r8 = move-exception
                    goto L_0x00dc
                L_0x00e9:
                    r8 = move-exception
                    goto L_0x0070
                */
                throw new UnsupportedOperationException("Method not decompiled: android.support.p000v4.print.PrintHelper.C01191.doInBackground(java.lang.Void[]):java.lang.Throwable");
            }

            /* access modifiers changed from: protected */
            public void onPostExecute(Throwable throwable) {
                if (cancellationSignal2.isCanceled()) {
                    writeResultCallback2.onWriteCancelled();
                } else if (throwable == null) {
                    writeResultCallback2.onWriteFinished(new PageRange[]{PageRange.ALL_PAGES});
                } else {
                    Log.e(PrintHelper.LOG_TAG, "Error writing printed content", throwable);
                    writeResultCallback2.onWriteFailed(null);
                }
            }
        }.execute(new Void[0]);
    }
/* access modifiers changed from: 0000 */
access modifiers changed from: 0000
access modifiers changed from : 0000
@RequiresApi(19)
    public void writeBitmap(PrintAttributes attributes, int fittingMode, Bitmap bitmap, ParcelFileDescriptor fileDescriptor, CancellationSignal cancellationSignal, WriteResultCallback writeResultCallback) {
        final PrintAttributes pdfAttributes;
        if (IS_MIN_MARGINS_HANDLING_CORRECT) {
            pdfAttributes = attributes;
        } else {
            pdfAttributes = copyAttributes(attributes).setMinMargins(new Margins(0, 0, 0, 0)).build();
        }
        final CancellationSignal cancellationSignal2 = cancellationSignal;
        final Bitmap bitmap2 = bitmap;
        final PrintAttributes printAttributes = attributes;
        final int i = fittingMode;
        final ParcelFileDescriptor parcelFileDescriptor = fileDescriptor;
        final WriteResultCallback writeResultCallback2 = writeResultCallback;
        new AsyncTask<Void, Void, Throwable>() {
            /* access modifiers changed from: protected */
            /* JADX WARNING: No exception handlers in catch block: Catch:{  } */
            /* JADX WARNING: Unknown top exception splitter block from list: {B:20:0x0070=Splitter:B:20:0x0070, B:33:0x00ab=Splitter:B:33:0x00ab, B:46:0x00dc=Splitter:B:46:0x00dc} */
            /* Code decompiled incorrectly, please refer to instructions dump. */
            public java.lang.Throwable doInBackground(java.lang.Void... r12) {
                /*
                    r11 = this;
                    r7 = 0
                    android.os.CancellationSignal r8 = r2     // Catch:{ Throwable -> 0x0078 }
                    boolean r8 = r8.isCanceled()     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x000a
                L_0x0009:
                    return r7
                L_0x000a:
                    android.print.pdf.PrintedPdfDocument r6 = new android.print.pdf.PrintedPdfDocument     // Catch:{ Throwable -> 0x0078 }
                    android.support.v4.print.PrintHelper r8 = android.support.p000v4.print.PrintHelper.this     // Catch:{ Throwable -> 0x0078 }
                    android.content.Context r8 = r8.mContext     // Catch:{ Throwable -> 0x0078 }
                    android.print.PrintAttributes r9 = r3     // Catch:{ Throwable -> 0x0078 }
                    r6.<init>(r8, r9)     // Catch:{ Throwable -> 0x0078 }
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    android.print.PrintAttributes r9 = r3     // Catch:{ Throwable -> 0x0078 }
                    int r9 = r9.getColorMode()     // Catch:{ Throwable -> 0x0078 }
                    android.graphics.Bitmap r4 = android.support.p000v4.print.PrintHelper.convertBitmapForColorMode(r8, r9)     // Catch:{ Throwable -> 0x0078 }
                    android.os.CancellationSignal r8 = r2     // Catch:{ Throwable -> 0x0078 }
                    boolean r8 = r8.isCanceled()     // Catch:{ Throwable -> 0x0078 }
                    if (r8 != 0) goto L_0x0009
                    r8 = 1
                    android.graphics.pdf.PdfDocument$Page r5 = r6.startPage(r8)     // Catch:{ all -> 0x009e }
                    boolean r8 = android.support.p000v4.print.PrintHelper.IS_MIN_MARGINS_HANDLING_CORRECT     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x007a
                    android.graphics.RectF r0 = new android.graphics.RectF     // Catch:{ all -> 0x009e }
                    android.graphics.pdf.PdfDocument$PageInfo r8 = r5.getInfo()     // Catch:{ all -> 0x009e }
                    android.graphics.Rect r8 = r8.getContentRect()     // Catch:{ all -> 0x009e }
                    r0.<init>(r8)     // Catch:{ all -> 0x009e }
                L_0x003f:
                    int r8 = r4.getWidth()     // Catch:{ all -> 0x009e }
                    int r9 = r4.getHeight()     // Catch:{ all -> 0x009e }
                    int r10 = r6     // Catch:{ all -> 0x009e }
                    android.graphics.Matrix r3 = android.support.p000v4.print.PrintHelper.getMatrix(r8, r9, r0, r10)     // Catch:{ all -> 0x009e }
                    boolean r8 = android.support.p000v4.print.PrintHelper.IS_MIN_MARGINS_HANDLING_CORRECT     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x00b3
                L_0x0051:
                    android.graphics.Canvas r8 = r5.getCanvas()     // Catch:{ all -> 0x009e }
                    r9 = 0
                    r8.drawBitmap(r4, r3, r9)     // Catch:{ all -> 0x009e }
                    r6.finishPage(r5)     // Catch:{ all -> 0x009e }
                    android.os.CancellationSignal r8 = r2     // Catch:{ all -> 0x009e }
                    boolean r8 = r8.isCanceled()     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x00c2
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x0070
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ IOException -> 0x00e9 }
                    r8.close()     // Catch:{ IOException -> 0x00e9 }
                L_0x0070:
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r8) goto L_0x0009
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                    goto L_0x0009
                L_0x0078:
                    r7 = move-exception
                    goto L_0x0009
                L_0x007a:
                    android.print.pdf.PrintedPdfDocument r1 = new android.print.pdf.PrintedPdfDocument     // Catch:{ all -> 0x009e }
                    android.support.v4.print.PrintHelper r8 = android.support.p000v4.print.PrintHelper.this     // Catch:{ all -> 0x009e }
                    android.content.Context r8 = r8.mContext     // Catch:{ all -> 0x009e }
                    android.print.PrintAttributes r9 = r5     // Catch:{ all -> 0x009e }
                    r1.<init>(r8, r9)     // Catch:{ all -> 0x009e }
                    r8 = 1
                    android.graphics.pdf.PdfDocument$Page r2 = r1.startPage(r8)     // Catch:{ all -> 0x009e }
                    android.graphics.RectF r0 = new android.graphics.RectF     // Catch:{ all -> 0x009e }
                    android.graphics.pdf.PdfDocument$PageInfo r8 = r2.getInfo()     // Catch:{ all -> 0x009e }
                    android.graphics.Rect r8 = r8.getContentRect()     // Catch:{ all -> 0x009e }
                    r0.<init>(r8)     // Catch:{ all -> 0x009e }
                    r1.finishPage(r2)     // Catch:{ all -> 0x009e }
                    r1.close()     // Catch:{ all -> 0x009e }
                    goto L_0x003f
                L_0x009e:
                    r8 = move-exception
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r9 == 0) goto L_0x00ab
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ IOException -> 0x00e5 }
                    r9.close()     // Catch:{ IOException -> 0x00e5 }
                L_0x00ab:
                    android.graphics.Bitmap r9 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r9) goto L_0x00b2
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                L_0x00b2:
                    throw r8     // Catch:{ Throwable -> 0x0078 }
                L_0x00b3:
                    float r8 = r0.left     // Catch:{ all -> 0x009e }
                    float r9 = r0.top     // Catch:{ all -> 0x009e }
                    r3.postTranslate(r8, r9)     // Catch:{ all -> 0x009e }
                    android.graphics.Canvas r8 = r5.getCanvas()     // Catch:{ all -> 0x009e }
                    r8.clipRect(r0)     // Catch:{ all -> 0x009e }
                    goto L_0x0051
                L_0x00c2:
                    java.io.FileOutputStream r8 = new java.io.FileOutputStream     // Catch:{ all -> 0x009e }
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ all -> 0x009e }
                    java.io.FileDescriptor r9 = r9.getFileDescriptor()     // Catch:{ all -> 0x009e }
                    r8.<init>(r9)     // Catch:{ all -> 0x009e }
                    r6.writeTo(r8)     // Catch:{ all -> 0x009e }
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x00dc
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ IOException -> 0x00e7 }
                    r8.close()     // Catch:{ IOException -> 0x00e7 }
                L_0x00dc:
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r8) goto L_0x0009
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                    goto L_0x0009
                L_0x00e5:
                    r9 = move-exception
                    goto L_0x00ab
                L_0x00e7:
                    r8 = move-exception
                    goto L_0x00dc
                L_0x00e9:
                    r8 = move-exception
                    goto L_0x0070
                */
                throw new UnsupportedOperationException("Method not decompiled: android.support.p000v4.print.PrintHelper.C01191.doInBackground(java.lang.Void[]):java.lang.Throwable");
            }
            /* access modifiers changed from: protected */
            public void onPostExecute(Throwable throwable) {
                if (cancellationSignal2.isCanceled()) {
                    writeResultCallback2.onWriteCancelled();
                } else if (throwable == null) {
                    writeResultCallback2.onWriteFinished(new PageRange[]{PageRange.ALL_PAGES});
                } else {
                    Log.e(PrintHelper.LOG_TAG, "Error writing printed content", throwable);
                    writeResultCallback2.onWriteFailed(null);
                }
            }
        }.execute(new Void[0]);
    }
@ RequiresApi ( 19 ) public void writeBitmap ( PrintAttributes attributes , int fittingMode , Bitmap bitmap , ParcelFileDescriptor fileDescriptor , CancellationSignal cancellationSignal , WriteResultCallback writeResultCallback ) { final PrintAttributes pdfAttributes ; if ( IS_MIN_MARGINS_HANDLING_CORRECT ) { pdfAttributes = attributes ; } else { pdfAttributes = copyAttributes ( attributes ) . setMinMargins ( new Margins ( 0 , 0 , 0 , 0 ) ) . build ( ) ; } final CancellationSignal cancellationSignal2 = cancellationSignal ; final Bitmap bitmap2 = bitmap ; final PrintAttributes printAttributes = attributes ; final int i = fittingMode ; final ParcelFileDescriptor parcelFileDescriptor = fileDescriptor ; final WriteResultCallback writeResultCallback2 = writeResultCallback ; new AsyncTask < Void , Void , Throwable > ( ) { /* access modifiers changed from: protected */ /* JADX WARNING: No exception handlers in catch block: Catch:{  } */ /* JADX WARNING: Unknown top exception splitter block from list: {B:20:0x0070=Splitter:B:20:0x0070, B:33:0x00ab=Splitter:B:33:0x00ab, B:46:0x00dc=Splitter:B:46:0x00dc} */ /* Code decompiled incorrectly, please refer to instructions dump. */ public java . lang . Throwable doInBackground ( java . lang . Void ... r12 ) { /*
                    r11 = this;
                    r7 = 0
                    android.os.CancellationSignal r8 = r2     // Catch:{ Throwable -> 0x0078 }
                    boolean r8 = r8.isCanceled()     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x000a
                L_0x0009:
                    return r7
                L_0x000a:
                    android.print.pdf.PrintedPdfDocument r6 = new android.print.pdf.PrintedPdfDocument     // Catch:{ Throwable -> 0x0078 }
                    android.support.v4.print.PrintHelper r8 = android.support.p000v4.print.PrintHelper.this     // Catch:{ Throwable -> 0x0078 }
                    android.content.Context r8 = r8.mContext     // Catch:{ Throwable -> 0x0078 }
                    android.print.PrintAttributes r9 = r3     // Catch:{ Throwable -> 0x0078 }
                    r6.<init>(r8, r9)     // Catch:{ Throwable -> 0x0078 }
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    android.print.PrintAttributes r9 = r3     // Catch:{ Throwable -> 0x0078 }
                    int r9 = r9.getColorMode()     // Catch:{ Throwable -> 0x0078 }
                    android.graphics.Bitmap r4 = android.support.p000v4.print.PrintHelper.convertBitmapForColorMode(r8, r9)     // Catch:{ Throwable -> 0x0078 }
                    android.os.CancellationSignal r8 = r2     // Catch:{ Throwable -> 0x0078 }
                    boolean r8 = r8.isCanceled()     // Catch:{ Throwable -> 0x0078 }
                    if (r8 != 0) goto L_0x0009
                    r8 = 1
                    android.graphics.pdf.PdfDocument$Page r5 = r6.startPage(r8)     // Catch:{ all -> 0x009e }
                    boolean r8 = android.support.p000v4.print.PrintHelper.IS_MIN_MARGINS_HANDLING_CORRECT     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x007a
                    android.graphics.RectF r0 = new android.graphics.RectF     // Catch:{ all -> 0x009e }
                    android.graphics.pdf.PdfDocument$PageInfo r8 = r5.getInfo()     // Catch:{ all -> 0x009e }
                    android.graphics.Rect r8 = r8.getContentRect()     // Catch:{ all -> 0x009e }
                    r0.<init>(r8)     // Catch:{ all -> 0x009e }
                L_0x003f:
                    int r8 = r4.getWidth()     // Catch:{ all -> 0x009e }
                    int r9 = r4.getHeight()     // Catch:{ all -> 0x009e }
                    int r10 = r6     // Catch:{ all -> 0x009e }
                    android.graphics.Matrix r3 = android.support.p000v4.print.PrintHelper.getMatrix(r8, r9, r0, r10)     // Catch:{ all -> 0x009e }
                    boolean r8 = android.support.p000v4.print.PrintHelper.IS_MIN_MARGINS_HANDLING_CORRECT     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x00b3
                L_0x0051:
                    android.graphics.Canvas r8 = r5.getCanvas()     // Catch:{ all -> 0x009e }
                    r9 = 0
                    r8.drawBitmap(r4, r3, r9)     // Catch:{ all -> 0x009e }
                    r6.finishPage(r5)     // Catch:{ all -> 0x009e }
                    android.os.CancellationSignal r8 = r2     // Catch:{ all -> 0x009e }
                    boolean r8 = r8.isCanceled()     // Catch:{ all -> 0x009e }
                    if (r8 == 0) goto L_0x00c2
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x0070
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ IOException -> 0x00e9 }
                    r8.close()     // Catch:{ IOException -> 0x00e9 }
                L_0x0070:
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r8) goto L_0x0009
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                    goto L_0x0009
                L_0x0078:
                    r7 = move-exception
                    goto L_0x0009
                L_0x007a:
                    android.print.pdf.PrintedPdfDocument r1 = new android.print.pdf.PrintedPdfDocument     // Catch:{ all -> 0x009e }
                    android.support.v4.print.PrintHelper r8 = android.support.p000v4.print.PrintHelper.this     // Catch:{ all -> 0x009e }
                    android.content.Context r8 = r8.mContext     // Catch:{ all -> 0x009e }
                    android.print.PrintAttributes r9 = r5     // Catch:{ all -> 0x009e }
                    r1.<init>(r8, r9)     // Catch:{ all -> 0x009e }
                    r8 = 1
                    android.graphics.pdf.PdfDocument$Page r2 = r1.startPage(r8)     // Catch:{ all -> 0x009e }
                    android.graphics.RectF r0 = new android.graphics.RectF     // Catch:{ all -> 0x009e }
                    android.graphics.pdf.PdfDocument$PageInfo r8 = r2.getInfo()     // Catch:{ all -> 0x009e }
                    android.graphics.Rect r8 = r8.getContentRect()     // Catch:{ all -> 0x009e }
                    r0.<init>(r8)     // Catch:{ all -> 0x009e }
                    r1.finishPage(r2)     // Catch:{ all -> 0x009e }
                    r1.close()     // Catch:{ all -> 0x009e }
                    goto L_0x003f
                L_0x009e:
                    r8 = move-exception
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r9 == 0) goto L_0x00ab
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ IOException -> 0x00e5 }
                    r9.close()     // Catch:{ IOException -> 0x00e5 }
                L_0x00ab:
                    android.graphics.Bitmap r9 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r9) goto L_0x00b2
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                L_0x00b2:
                    throw r8     // Catch:{ Throwable -> 0x0078 }
                L_0x00b3:
                    float r8 = r0.left     // Catch:{ all -> 0x009e }
                    float r9 = r0.top     // Catch:{ all -> 0x009e }
                    r3.postTranslate(r8, r9)     // Catch:{ all -> 0x009e }
                    android.graphics.Canvas r8 = r5.getCanvas()     // Catch:{ all -> 0x009e }
                    r8.clipRect(r0)     // Catch:{ all -> 0x009e }
                    goto L_0x0051
                L_0x00c2:
                    java.io.FileOutputStream r8 = new java.io.FileOutputStream     // Catch:{ all -> 0x009e }
                    android.os.ParcelFileDescriptor r9 = r7     // Catch:{ all -> 0x009e }
                    java.io.FileDescriptor r9 = r9.getFileDescriptor()     // Catch:{ all -> 0x009e }
                    r8.<init>(r9)     // Catch:{ all -> 0x009e }
                    r6.writeTo(r8)     // Catch:{ all -> 0x009e }
                    r6.close()     // Catch:{ Throwable -> 0x0078 }
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ Throwable -> 0x0078 }
                    if (r8 == 0) goto L_0x00dc
                    android.os.ParcelFileDescriptor r8 = r7     // Catch:{ IOException -> 0x00e7 }
                    r8.close()     // Catch:{ IOException -> 0x00e7 }
                L_0x00dc:
                    android.graphics.Bitmap r8 = r4     // Catch:{ Throwable -> 0x0078 }
                    if (r4 == r8) goto L_0x0009
                    r4.recycle()     // Catch:{ Throwable -> 0x0078 }
                    goto L_0x0009
                L_0x00e5:
                    r9 = move-exception
                    goto L_0x00ab
                L_0x00e7:
                    r8 = move-exception
                    goto L_0x00dc
                L_0x00e9:
                    r8 = move-exception
                    goto L_0x0070
                */ throw new UnsupportedOperationException ( "Method not decompiled: android.support.p000v4.print.PrintHelper.C01191.doInBackground(java.lang.Void[]):java.lang.Throwable" ) ; } /* access modifiers changed from: protected */ public void onPostExecute ( Throwable throwable ) { if ( cancellationSignal2 . isCanceled ( ) ) { writeResultCallback2 . onWriteCancelled ( ) ; } else if ( throwable == null ) { writeResultCallback2 . onWriteFinished ( new PageRange [ ] { PageRange . ALL_PAGES } ) ; } else { Log . e ( PrintHelper . LOG_TAG , "Error writing printed content" , throwable ) ; writeResultCallback2 . onWriteFailed ( null ) ; } } } . execute ( new Void [ 0 ] ) ; }
access modifiers changed from: 0000
access modifiers changed from : 0000