public static void prependSoSource()

in java/com/facebook/soloader/SoLoader.java [1179:1195]


  public static void prependSoSource(SoSource extraSoSource) throws IOException {
    sSoSourcesLock.writeLock().lock();
    try {
      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.getAndIncrement();
      if (Log.isLoggable(TAG, Log.DEBUG)) {
        Log.d(TAG, "Prepended to SO sources: " + extraSoSource);
      }
    } finally {
      sSoSourcesLock.writeLock().unlock();
    }
  }