show app failure instead of crashing when egl fails to init. fixes #3795
This commit is contained in:
parent
169ee99afa
commit
dddb7ece25
|
@ -214,9 +214,13 @@ public class WebRTCWrapper {
|
||||||
PeerConnectionFactory.InitializationOptions.builder(service).createInitializationOptions()
|
PeerConnectionFactory.InitializationOptions.builder(service).createInitializationOptions()
|
||||||
);
|
);
|
||||||
} catch (final UnsatisfiedLinkError e) {
|
} catch (final UnsatisfiedLinkError e) {
|
||||||
throw new InitializationException(e);
|
throw new InitializationException("Unable to initialize PeerConnectionFactory", e);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
this.eglBase = EglBase.create();
|
this.eglBase = EglBase.create();
|
||||||
|
} catch (final RuntimeException e) {
|
||||||
|
throw new InitializationException("Unable to create EGL base", e);
|
||||||
|
}
|
||||||
this.context = service;
|
this.context = service;
|
||||||
this.toneManager = service.getJingleConnectionManager().toneManager;
|
this.toneManager = service.getJingleConnectionManager().toneManager;
|
||||||
mainHandler.post(() -> {
|
mainHandler.post(() -> {
|
||||||
|
@ -589,8 +593,8 @@ public class WebRTCWrapper {
|
||||||
|
|
||||||
static class InitializationException extends Exception {
|
static class InitializationException extends Exception {
|
||||||
|
|
||||||
private InitializationException(final Throwable throwable) {
|
private InitializationException(final String message, final Throwable throwable) {
|
||||||
super(throwable);
|
super(message, throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private InitializationException(final String message) {
|
private InitializationException(final String message) {
|
||||||
|
|
Loading…
Reference in a new issue