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)
public class ShadowArscApkAssets9
extends ShadowApkAssets
Shadow for
ApkAssets
for Android P+-
Nested Class Summary
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowApkAssets
ShadowApkAssets.Picker
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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, int flags) protected static String
nativeGetAssetPath
(long ptr) protected static long
nativeGetStringBlock
(long ptr) protected static boolean
nativeIsUpToDate
(long ptr) protected static long
nativeLoad
(int format, String javaPath, int flags, Object assetsProvider) protected static long
nativeLoad
(String path, boolean system, boolean forceSharedLib, boolean overlay) protected static long
nativeLoadFd
(int format, FileDescriptor fileDescriptor, String friendlyName, int propertyFlags, Object assetsProvider) 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
-
FRAMEWORK_APK_PATH
-
-
Constructor Details
-
ShadowArscApkAssets9
public ShadowArscApkAssets9()
-
-
Method Details
-
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(minSdk=30) protected static ApkAssets loadFromPath(String path, int flags) throws IOException - Throws:
IOException
-
nativeLoad
@Implementation(maxSdk=29) protected static long nativeLoad(String path, boolean system, boolean forceSharedLib, boolean overlay) throws IOException - Throws:
IOException
-
nativeLoad
@Implementation(minSdk=30) protected static long nativeLoad(int format, String javaPath, int 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) -
nativeLoadFd
@Implementation(minSdk=30) protected static long nativeLoadFd(int format, FileDescriptor fileDescriptor, String friendlyName, int propertyFlags, Object assetsProvider) throws IOException - Throws:
IOException
-
nativeGetAssetPath
-
nativeGetStringBlock
-
nativeIsUpToDate
-
nativeOpenXml
@Implementation protected static long nativeOpenXml(long ptr, String file_name) throws FileNotFoundException - Throws:
FileNotFoundException
-