Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 110dbf84 authored by huiwan's avatar huiwan Committed by android-build-merger
Browse files

Merge "Merge "PrintSpooler: fix monkey crash if height&width small than 0" am:...

Merge "Merge "PrintSpooler: fix monkey crash if height&width small than 0" am: 4a417449 am: c9702683 am: a022d0d7 am: 7686fd5e" into oc-mr1-dev-plus-aosp
am: d86dc388

Change-Id: I62977fd45b2b1cf64e6984e6f57b4f241a63e961
parents 9ffaacfe d86dc388
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -486,6 +486,12 @@ public final class PageAdapter extends Adapter<ViewHolder> {
        loadingContent.layout(0, 0, loadingContent.getMeasuredWidth(),
                loadingContent.getMeasuredHeight());

        // To create a bitmap, height & width should be larger than 0
        if (mPageContentHeight <= 0 || mPageContentWidth <= 0) {
            Log.w(LOG_TAG, "Unable to create bitmap, height or width smaller than 0!");
            return;
        }

        Bitmap loadingBitmap = Bitmap.createBitmap(mPageContentWidth, mPageContentHeight,
                Bitmap.Config.ARGB_8888);
        loadingContent.draw(new Canvas(loadingBitmap));