am d6904819: Merge "Throw an exception instead of crash when a surface does not have a binding surface texture" into jb-mr1-dev
* commit 'd6904819ab0d0ef896cdc129ca23e676dfcee57e': 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