Interface NativeLoaderDelegate
-
- All Known Implementing Classes:
NativeLoaderToSoLoaderDelegate,SystemDelegate
public interface NativeLoaderDelegateInterface used to connect chosen loader of native libraries to NativeLoader
-
-
Field Summary
Fields Modifier and Type Field Description static intSKIP_MERGED_JNI_ONLOADSkip calling JNI_OnLoad if the library is merged.
-
Method Summary
Modifier and Type Method Description java.lang.StringgetLibraryPath(java.lang.String libName)intgetSoSourcesVersion()booleanloadLibrary(java.lang.String shortName, int flags)
-
-
-
Field Detail
-
SKIP_MERGED_JNI_ONLOAD
static final int SKIP_MERGED_JNI_ONLOAD
Skip calling JNI_OnLoad if the library is merged. This is necessary for libraries that don't define JNI_OnLoad and are only loaded for their side effects (like static constructors registering callbacks). DO NOT use this to allow implicit JNI registration (by naming your methods Java_com_facebook_whatever) because that is buggy on Android.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadLibrary
boolean loadLibrary(java.lang.String shortName, int flags)- Parameters:
shortName- Name of library to find, without "lib" prefix or ".so" suffixflags- 0 for default behavior, otherwise NativeLoaderDelegate defines other behaviors.- Returns:
- whether load successfully
- See Also:
NativeLoader.loadLibrary(String, int)
-
getLibraryPath
java.lang.String getLibraryPath(java.lang.String libName) throws java.io.IOException- Parameters:
libName- Name of library to find, without "lib" prefix or ".so" suffix- Returns:
- the so file path
- Throws:
java.io.IOException- IOException- See Also:
NativeLoader.getLibraryPath(String)
-
getSoSourcesVersion
int getSoSourcesVersion()
- Returns:
- The version number for the loader.
- See Also:
NativeLoader.getSoSourcesVersion()
-
-