am 68bf6eb4: am d6904819: Merge "Throw an exception instead of crash when a surface does not have a binding surface texture" into jb-mr1-dev
* commit '68bf6eb411afff2f3233ce7447914b34af6b1b96': Throw an exception instead of crash when a surface does not have a binding surface texture
This commit is contained in:
@@ -274,6 +274,11 @@ setVideoSurface(JNIEnv *env, jobject thiz, jobject jsurface, jboolean mediaPlaye
|
|||||||
sp<Surface> surface(android_view_Surface_getSurface(env, jsurface));
|
sp<Surface> surface(android_view_Surface_getSurface(env, jsurface));
|
||||||
if (surface != NULL) {
|
if (surface != NULL) {
|
||||||
new_st = surface->getSurfaceTexture();
|
new_st = surface->getSurfaceTexture();
|
||||||
|
if (new_st == NULL) {
|
||||||
|
jniThrowException(env, "java/lang/IllegalArgumentException",
|
||||||
|
"The surface does not have a binding SurfaceTexture!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
new_st->incStrong(thiz);
|
new_st->incStrong(thiz);
|
||||||
} else {
|
} else {
|
||||||
jniThrowException(env, "java/lang/IllegalArgumentException",
|
jniThrowException(env, "java/lang/IllegalArgumentException",
|
||||||
|
|||||||
Reference in New Issue
Block a user