Merge "Throw OOME if Bitmap.nativeCreate fails" into oc-dev

am: c4049e247f

Change-Id: I7636d9eaf3983fc7ed0c1dc59ec2671ff762206e
This commit is contained in:
Leon Scroggins III
2017-10-31 20:29:00 +00:00
committed by android-build-merger

View File

@@ -740,6 +740,8 @@ static jobject Bitmap_creator(JNIEnv* env, jobject, jintArray jColors,
sk_sp<Bitmap> nativeBitmap = Bitmap::allocateHeapBitmap(&bitmap, NULL);
if (!nativeBitmap) {
ALOGE("OOM allocating Bitmap with dimensions %i x %i", width, height);
doThrowOOME(env);
return NULL;
}