Merge pull request #219 from brarcher/barcode-oom

Catch case where barcode rendering runs into an OOM
This commit is contained in:
Branden Archer
2018-03-04 14:17:53 -05:00
committed by GitHub

View File

@@ -149,6 +149,12 @@ class BarcodeImageWriterTask extends AsyncTask<Void, Void, Bitmap>
{
Log.e(TAG, "Failed to generate barcode of type " + format + ": " + cardId, e);
}
catch(OutOfMemoryError e)
{
Log.w(TAG, "Insufficient memory to render barcode, "
+ imageWidth + "x" + imageHeight + ", " + format.name()
+ ", length=" + cardId.length(), e);
}
return null;
}