Add separate native library for instrumentationtests

Also adds api in PCF for specifying which library to load.

This is in preparation for a CL adding a native function
to be used only in tests.

Bug: webrtc:9225
Change-Id: I72eff272350404729424176758bfa81f7da81836
Reviewed-on: https://webrtc-review.googlesource.com/84125
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23663}
This commit is contained in:
Paulina Hensman
2018-06-19 16:14:50 +02:00
committed by Commit Bot
parent faf282700c
commit fa2b8d7456
17 changed files with 68 additions and 15 deletions

View File

@ -34,14 +34,14 @@ class NativeLibrary {
* Loads the native library. Clients should call PeerConnectionFactory.initialize. It will call
* this method for them.
*/
static void initialize(NativeLibraryLoader loader) {
static void initialize(NativeLibraryLoader loader, String libraryName) {
synchronized (lock) {
if (libraryLoaded) {
Logging.d(TAG, "Native library has already been loaded.");
return;
}
Logging.d(TAG, "Loading native library.");
libraryLoaded = loader.load("jingle_peerconnection_so");
Logging.d(TAG, "Loading native library: " + libraryName);
libraryLoaded = loader.load(libraryName);
}
}