MCPcopy Create free account
hub / github.com/facebook/SoLoader / prependSoSource

Method prependSoSource

java/com/facebook/soloader/SoLoader.java:1300–1314  ·  view source on GitHub ↗

Add a new source of native libraries. SoLoader consults the new source before any currently-installed source. @param extraSoSource The SoSource to install @throws IOException IOException

(SoSource extraSoSource)

Source from the content-addressed store, hash-verified

1298 * @throws IOException IOException
1299 */
1300 public static void prependSoSource(SoSource extraSoSource) throws IOException {
1301 sSoSourcesLock.writeLock().lock();
1302 try {
1303 assertInitialized();
1304 extraSoSource.prepare(makePrepareFlags());
1305 SoSource[] newSoSources = new SoSource[sSoSources.length + 1];
1306 newSoSources[0] = extraSoSource;
1307 System.arraycopy(sSoSources, 0, newSoSources, 1, sSoSources.length);
1308 sSoSources = newSoSources;
1309 sSoSourcesVersion.getAndIncrement();
1310 LogUtil.d(TAG, "Prepended to SO sources: " + extraSoSource);
1311 } finally {
1312 sSoSourcesLock.writeLock().unlock();
1313 }
1314 }
1315
1316 /**
1317 * Retrieve an LD_LIBRARY_PATH value suitable for using the native linker to resolve our shared

Callers

nothing calls this directly

Calls 5

assertInitializedMethod · 0.95
makePrepareFlagsMethod · 0.95
dMethod · 0.95
lockMethod · 0.80
prepareMethod · 0.45

Tested by

no test coverage detected