Don't swallow UnsatisfiedLinkError
When loading the library fails, the user will be faced with this error: java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals() With no context, however. Bug: webrtc:13619 Change-Id: I88565f085773ad1e8c2f5742d7fdba96fb6043d8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253960 Reviewed-by: Christoffer Jansson <jansson@google.com> Reviewed-by: Xavier Lepaul <xalep@webrtc.org> Commit-Queue: Xavier Lepaul <xalep@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36150}
This commit is contained in:
parent
c7c5764eae
commit
775ce76b66
@ -17,12 +17,9 @@ class NativeLibrary {
|
||||
@Override
|
||||
public boolean load(String name) {
|
||||
Logging.d(TAG, "Loading library: " + name);
|
||||
try {
|
||||
System.loadLibrary(name);
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
Logging.e(TAG, "Failed to load native library: " + name, e);
|
||||
return false;
|
||||
}
|
||||
System.loadLibrary(name);
|
||||
|
||||
// Not relevant, but kept for API compatibility.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user