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+
  • Field Details

    • FRAMEWORK_APK_PATH

      protected static final String 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 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)
    • nativeLoadFd

      @Implementation(minSdk=30) protected static Object nativeLoadFd(Object format, Object fileDescriptor, Object friendlyName, Object propertyFlags, Object assetsProvider) throws IOException
      Throws:
      IOException
    • 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