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)
| 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 |
nothing calls this directly
no test coverage detected