Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6904819 authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "Throw an exception instead of crash when a surface does not have a...

Merge "Throw an exception instead of crash when a surface does not have a binding surface texture" into jb-mr1-dev
parents b2eb0282 097922b9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -274,6 +274,11 @@ setVideoSurface(JNIEnv *env, jobject thiz, jobject jsurface, jboolean mediaPlaye
        sp<Surface> surface(android_view_Surface_getSurface(env, jsurface));
        if (surface != NULL) {
            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);
        } else {
            jniThrowException(env, "java/lang/IllegalArgumentException",