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

This commit is contained in:
TreeHugger Robot
2017-10-31 20:16:27 +00:00
committed by Android (Google) Code Review

View File

@@ -743,6 +743,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;
}