Package org.robolectric.shadows
Class ShadowArscApkAssets9
java.lang.Object
org.robolectric.shadows.ShadowApkAssets
org.robolectric.shadows.ShadowArscApkAssets9
@Implements(value=android.content.res.ApkAssets.class, minSdk=28, shadowPicker=Picker.class, isInAndroidSdk=false, looseSignatures=true) public class ShadowArscApkAssets9 extends ShadowApkAssets
Shadow for
ApkAssets
for Android P+-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
ShadowArscApkAssets9.ApkAssetMaker
protected static class
ShadowArscApkAssets9.Key
Caching key forApkAssets
.Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowApkAssets
ShadowApkAssets.Picker
-
Field Summary
Fields Modifier and Type Field Description protected static String
FRAMEWORK_APK_PATH
-
Constructor Summary
Constructors Constructor Description ShadowArscApkAssets9()
-
Method Summary
Modifier and Type Method Description protected static ApkAssets
getFromCacheOrLoad(ShadowArscApkAssets9.Key key, ShadowArscApkAssets9.ApkAssetMaker callable)
protected static ApkAssets
loadFromFd(FileDescriptor fd, String friendlyName, boolean system, boolean forceSharedLibrary)
protected static ApkAssets
loadFromPath(String path)
protected static ApkAssets
loadFromPath(String path, boolean system)
Necessary to shadow this method because the framework path is hard-coded.protected static ApkAssets
loadFromPath(String path, boolean system, boolean forceSharedLibrary)
protected static ApkAssets
loadFromPath(String path, int flags)
protected static String
nativeGetAssetPath(long ptr)
protected static long
nativeGetStringBlock(long ptr)
protected static boolean
nativeIsUpToDate(long ptr)
protected static Object
nativeLoad(Object format, Object javaPath, Object flags, Object assetsProvider)
protected static long
nativeLoad(String path, boolean system, boolean forceSharedLib, boolean overlay)
protected static long
nativeLoadFromFd(FileDescriptor file_descriptor, String friendly_name, boolean system, boolean force_shared_lib)
protected static long
nativeOpenXml(long ptr, String file_name)
-
Field Details
-
Constructor Details
-
ShadowArscApkAssets9
public ShadowArscApkAssets9()
-
-
Method Details
-
getFromCacheOrLoad
protected static ApkAssets getFromCacheOrLoad(ShadowArscApkAssets9.Key key, ShadowArscApkAssets9.ApkAssetMaker callable) -
loadFromPath
- Throws:
IOException
-
loadFromPath
@Implementation(maxSdk=29) protected static ApkAssets loadFromPath(String path, boolean system) throws IOExceptionNecessary to shadow this method because the framework path is hard-coded. Called from AssetManager.createSystemAssetsInZygoteLocked() in P+.- Throws:
IOException
-
loadFromPath
@Implementation(maxSdk=29) protected static ApkAssets loadFromPath(String path, boolean system, boolean forceSharedLibrary) throws IOException- Throws:
IOException
-
loadFromPath
@Implementation(minSdk=30) protected static ApkAssets loadFromPath(String path, int flags) throws IOException- Throws:
IOException
-
loadFromFd
@Implementation(maxSdk=29) protected static ApkAssets loadFromFd(FileDescriptor fd, String friendlyName, boolean system, boolean forceSharedLibrary) throws IOException- Throws:
IOException
-
nativeLoad
@Implementation protected static long nativeLoad(String path, boolean system, boolean forceSharedLib, boolean overlay) throws IOException- Throws:
IOException
-
nativeLoad
@Implementation(minSdk=30) protected static Object nativeLoad(Object format, Object javaPath, Object flags, Object assetsProvider) throws IOException- Throws:
IOException
-
nativeLoadFromFd
@Implementation(maxSdk=29) protected static long nativeLoadFromFd(FileDescriptor file_descriptor, String friendly_name, boolean system, boolean force_shared_lib) -
nativeGetAssetPath
-
nativeGetStringBlock
-
nativeIsUpToDate
-
nativeOpenXml
@Implementation protected static long nativeOpenXml(long ptr, String file_name) throws FileNotFoundException- Throws:
FileNotFoundException
-