From ef36375582d8e82d2cb675a83a9d7607e8acdae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Kalliom=C3=A4ki?= Date: Mon, 25 Sep 2017 16:54:42 +0200 Subject: [PATCH] Return EGL_NO_CONTEXT instead of throwing an exception. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes EglBase10.Context.getNativeEglContext to return EGL_NO_CONTEXT instead of throwing a runtime exception. Bug: webrtc:8257 Change-Id: I89fe630ada35d247f3a6c00b0cd2d7f0b445afa3 Reviewed-on: https://webrtc-review.googlesource.com/3260 Commit-Queue: Sami Kalliomäki Reviewed-by: Magnus Jedvert Cr-Commit-Position: refs/heads/master@{#19953} --- sdk/android/src/java/org/webrtc/EglBase10.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/android/src/java/org/webrtc/EglBase10.java b/sdk/android/src/java/org/webrtc/EglBase10.java index d1d543973b..8cbe0c0225 100644 --- a/sdk/android/src/java/org/webrtc/EglBase10.java +++ b/sdk/android/src/java/org/webrtc/EglBase10.java @@ -15,7 +15,6 @@ import android.graphics.Rect; import android.graphics.SurfaceTexture; import android.view.Surface; import android.view.SurfaceHolder; - import javax.microedition.khronos.egl.EGL10; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.egl.EGLContext; @@ -46,7 +45,7 @@ class EglBase10 extends EglBase { // need to make sure to have an EglSurface, then make the context current using that surface, // and then call into JNI and call the native version of eglGetCurrentContext. Then we need to // restore the state and return the native context. - throw new RuntimeException("getNativeEglContext is not implemented for EGL 1.0"); + return 0 /* EGL_NO_CONTEXT */; } public Context(EGLContext eglContext) {