public static void prependSoSource ( SoSource extraSoSource ) throws IOException { sSoSourcesLock . writeLock ( ) . lock ( ) ; try { Log . d ( TAG , "Prepending to SO sources: " + extraSoSource ) ; assertInitialized ( ) ; extraSoSource . prepare ( makePrepareFlags ( ) ) ; SoSource [ ] newSoSources = new SoSource [ sSoSources . length + 1 ] ; newSoSources [ 0 ] = extraSoSource ; System . arraycopy ( sSoSources , 0 , newSoSources , 1 , sSoSources . length ) ; sSoSources = newSoSources ; sSoSourcesVersion ++ ; Log . d ( TAG , "Prepended to SO sources: " + extraSoSource ) ; } finally { sSoSourcesLock . writeLock ( ) . unlock ( ) ; } }
Add a new source of native libraries . SoLoader consults the new source before any currently - installed source .