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 forApkAssetsfor Android P+
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceShadowArscApkAssets9.ApkAssetMakerprotected static classShadowArscApkAssets9.KeyCaching key forApkAssets.-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowApkAssets
ShadowApkAssets.Picker
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringFRAMEWORK_APK_PATH
-
Constructor Summary
Constructors Constructor Description ShadowArscApkAssets9()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose()protected static ApkAssetsgetFromCacheOrLoad(ShadowArscApkAssets9.Key key, ShadowArscApkAssets9.ApkAssetMaker callable)protected static ApkAssetsloadFromFd(FileDescriptor fd, String friendlyName, boolean system, boolean forceSharedLibrary)protected static ApkAssetsloadFromPath(String path)protected static ApkAssetsloadFromPath(String path, boolean system)Necessary to shadow this method because the framework path is hard-coded.protected static ApkAssetsloadFromPath(String path, boolean system, boolean forceSharedLibrary)protected static ApkAssetsloadFromPath(String path, int flags)protected static StringnativeGetAssetPath(long ptr)protected static longnativeGetStringBlock(long ptr)protected static booleannativeIsUpToDate(long ptr)protected static ObjectnativeLoad(Object format, Object javaPath, Object flags, Object assetsProvider)protected static longnativeLoad(String path, boolean system, boolean forceSharedLib, boolean overlay)protected static longnativeLoadFromFd(FileDescriptor file_descriptor, String friendly_name, boolean system, boolean force_shared_lib)protected static longnativeOpenXml(long ptr, String file_name)
-
-
-
Field Detail
-
FRAMEWORK_APK_PATH
protected static final String FRAMEWORK_APK_PATH
-
-
Method Detail
-
getFromCacheOrLoad
protected static ApkAssets getFromCacheOrLoad(ShadowArscApkAssets9.Key key, ShadowArscApkAssets9.ApkAssetMaker callable)
-
loadFromPath
@Implementation protected static ApkAssets loadFromPath(String path) throws IOException
- Throws:
IOException
-
loadFromPath
@Implementation(maxSdk=29) protected static ApkAssets loadFromPath(String path, boolean system) throws IOException
Necessary 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
@Implementation protected static String nativeGetAssetPath(long ptr)
-
nativeGetStringBlock
@Implementation protected static long nativeGetStringBlock(long ptr)
-
nativeIsUpToDate
@Implementation protected static boolean nativeIsUpToDate(long ptr)
-
nativeOpenXml
@Implementation protected static long nativeOpenXml(long ptr, String file_name) throws FileNotFoundException
- Throws:
FileNotFoundException
-
close
@Implementation(minSdk=31) protected void close()
-
-