From b9e748648da3a98eedadd9742d3395d4082d3102 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 14 Feb 2023 01:04:33 +0000 Subject: [PATCH] Throw OOM exception with error status Bug: 260283480 Test: Manual Change-Id: I36e1befbf4fabd8f8204186f563ca8f4ecbaf993 --- core/jni/android_view_SurfaceControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp index b1610d7902225..8952f37b14693 100644 --- a/core/jni/android_view_SurfaceControl.cpp +++ b/core/jni/android_view_SurfaceControl.cpp @@ -428,7 +428,7 @@ static jlong nativeCreate(JNIEnv* env, jclass clazz, jobject sessionObj, jniThrowException(env, "java/lang/IllegalArgumentException", NULL); return 0; } else if (err != NO_ERROR) { - jniThrowException(env, OutOfResourcesException, NULL); + jniThrowException(env, OutOfResourcesException, statusToString(err).c_str()); return 0; }