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 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
Modifier and Type Method Description 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 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
-