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_FORCE_REFRESH| Constructor and Description |
|---|
ApplicationSoSource(Context context,
int flags) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToLdLibraryPath(java.util.Collection<java.lang.String> paths)
Add an element to an LD_LIBRARY_PATH under construction.
|
boolean |
checkAndMaybeUpdate()
check to make sure there haven't been any changes to the nativeLibraryDir since the last check,
if there have been changes, update the context and soSource
|
java.lang.String[] |
getLibraryDependencies(java.lang.String soName)
Gets the dependencies of a library if it is found on this SoSource
|
java.lang.String |
getLibraryPath(java.lang.String soName)
Gets the full path of a library if it is found on this SoSource.
|
static java.io.File |
getNativeLibDirFromContext(Context context) |
Context |
getUpdatedContext() |
int |
loadLibrary(java.lang.String soName,
int loadFlags,
StrictMode.ThreadPolicy threadPolicy)
Load a shared library library into this process.
|
java.lang.String |
toString()
Return the class name of the actual instance.
|
java.io.File |
unpackLibrary(java.lang.String soName)
Ensure that a shared library exists on disk somewhere.
|
getSoSourceAbispublic boolean checkAndMaybeUpdate()
throws java.io.IOException
java.io.IOExceptionpublic Context getUpdatedContext()
public static java.io.File getNativeLibDirFromContext(Context context)
public int loadLibrary(java.lang.String soName,
int loadFlags,
StrictMode.ThreadPolicy threadPolicy)
throws java.io.IOException
SoSourceSoSource.loadLibrary(java.lang.String, int, StrictMode.ThreadPolicy).loadLibrary in class SoSourcesoName - Name of library to loadloadFlags - Zero or more of the LOAD_FLAG_XXX constants.java.io.IOExceptionpublic java.lang.String getLibraryPath(java.lang.String soName)
throws java.io.IOException
SoSourcegetLibraryPath in class SoSourcesoName - the full file name of the libraryjava.io.IOException - if there is an error calculating soFileName's canonical pathpublic java.lang.String[] getLibraryDependencies(java.lang.String soName)
throws java.io.IOException
SoSourcegetLibraryDependencies in class SoSourcesoName - Name of library to inspectsoName needs for linkingjava.io.IOException - if soName is found but there is an error reading itpublic java.io.File unpackLibrary(java.lang.String soName)
throws java.io.IOException
SoSourceSoSource.loadLibrary(java.lang.String, int, StrictMode.ThreadPolicy).unpackLibrary in class SoSourcesoName - Name of library to loadnull if not.java.io.IOExceptionpublic void addToLdLibraryPath(java.util.Collection<java.lang.String> paths)
SoSourceaddToLdLibraryPath in class SoSourcepaths - Collection of paths to which to add