Package com.facebook.soloader
Class DirectApkSoSource
- java.lang.Object
-
- com.facebook.soloader.SoSource
-
- com.facebook.soloader.DirectApkSoSource
-
@ThreadSafe public class DirectApkSoSource extends SoSource
SoSourcethat directly finds shared libraries in a APK. The native libraries must be page aligned and stored uncompressed in the APK.- See Also:
- android:extractNativeLibs
-
-
Field Summary
-
Fields inherited from class com.facebook.soloader.SoSource
LOAD_FLAG_ALLOW_IMPLICIT_PROVISION, LOAD_FLAG_ALLOW_SOURCE_CHANGE, LOAD_FLAG_MIN_CUSTOM_FLAG, LOAD_RESULT_CORRUPTED_LIB_FILE, LOAD_RESULT_IMPLICITLY_PROVIDED, LOAD_RESULT_LOADED, LOAD_RESULT_NOT_FOUND, PREPARE_FLAG_ALLOW_ASYNC_INIT, PREPARE_FLAG_DISABLE_FS_SYNC_JOB, PREPARE_FLAG_FORCE_REFRESH
-
-
Constructor Summary
Constructors Constructor Description DirectApkSoSource(android.content.Context context)DirectApkSoSource(java.io.File apkFile)DirectApkSoSource(java.io.File apkFile, java.util.Set<java.lang.String> directApkLdPaths)
-
Method Summary
Modifier and Type Method Description booleanisValid()intloadLibrary(java.lang.String soName, int loadFlags, android.os.StrictMode.ThreadPolicy threadPolicy)Load a shared library library into this process.java.lang.StringtoString()Return the class name of the actual instance.java.io.FileunpackLibrary(java.lang.String soName)Ensure that a shared library exists on disk somewhere.-
Methods inherited from class com.facebook.soloader.SoSource
addToLdLibraryPath, getLibraryDependencies, getLibraryPath, getSoSourceAbis
-
-
-
-
Method Detail
-
loadLibrary
public int loadLibrary(java.lang.String soName, int loadFlags, android.os.StrictMode.ThreadPolicy threadPolicy) throws java.io.IOExceptionDescription copied from class:SoSourceLoad a shared library library into this process. This routine is independent ofSoSource.loadLibrary(java.lang.String, int, android.os.StrictMode.ThreadPolicy).- Specified by:
loadLibraryin classSoSource- Parameters:
soName- Name of library to loadloadFlags- Zero or more of the LOAD_FLAG_XXX constants.threadPolicy- Strict Mode policy- Returns:
- One of the LOAD_RESULT_XXX constants.
- Throws:
java.io.IOException- IOException
-
unpackLibrary
public java.io.File unpackLibrary(java.lang.String soName) throws java.io.IOExceptionDescription copied from class:SoSourceEnsure that a shared library exists on disk somewhere. This routine is independent ofSoSource.loadLibrary(java.lang.String, int, android.os.StrictMode.ThreadPolicy).- Specified by:
unpackLibraryin classSoSource- Parameters:
soName- Name of library to load- Returns:
- File if library found;
nullif not. - Throws:
java.io.IOException- IOException
-
isValid
public boolean isValid()
-
-