@Implementation
  protected static long nativeLoad(String java_path, boolean system,
      boolean force_shared_lib, boolean overlay) throws IOException {
    String path = java_path;
    if (path == null) {
      return 0;
    }

    ATRACE_NAME(String.format("LoadApkAssets(%s)", path));

    CppApkAssets apk_assets;
    try {
      if (overlay) {
        apk_assets = CppApkAssets.LoadOverlay(path, system);
      } else if (force_shared_lib) {
        apk_assets =
            CppApkAssets.LoadAsSharedLibrary(path, system);
      } else {
        apk_assets = CppApkAssets.Load(path, system);
      }
    } catch (OutOfMemoryError e) {
      OutOfMemoryError outOfMemoryError = new OutOfMemoryError("Failed to load " + path);
      outOfMemoryError.initCause(e);
      throw outOfMemoryError;
    }

    if (apk_assets == null) {
      String error_msg = String.format("Failed to load asset path %s", path);
      throw new IOException(error_msg);
    }
    return Registries.NATIVE_APK_ASSETS_REGISTRY.register(apk_assets);
  }
@Implementation
  protected static long nativeLoad(String java_path, boolean system,
      boolean force_shared_lib, boolean overlay) throws IOException {
    String path = java_path;
    if (path == null) {
      return 0;
    }

    ATRACE_NAME(String.format("LoadApkAssets(%s)", path));

    CppApkAssets apk_assets;
    try {
      if (overlay) {
        apk_assets = CppApkAssets.LoadOverlay(path, system);
      } else if (force_shared_lib) {
        apk_assets =
            CppApkAssets.LoadAsSharedLibrary(path, system);
      } else {
        apk_assets = CppApkAssets.Load(path, system);
      }
    } catch (OutOfMemoryError e) {
      OutOfMemoryError outOfMemoryError = new OutOfMemoryError("Failed to load " + path);
      outOfMemoryError.initCause(e);
      throw outOfMemoryError;
    }

    if (apk_assets == null) {
      String error_msg = String.format("Failed to load asset path %s", path);
      throw new IOException(error_msg);
    }
    return Registries.NATIVE_APK_ASSETS_REGISTRY.register(apk_assets);
  }
@ Implementation protected static long nativeLoad ( String java_path , boolean system , boolean force_shared_lib , boolean overlay ) throws IOException { String path = java_path ; if ( path == null ) { return 0 ; } ATRACE_NAME ( String . format ( "LoadApkAssets(%s)" , path ) ) ; CppApkAssets apk_assets ; try { if ( overlay ) { apk_assets = CppApkAssets . LoadOverlay ( path , system ) ; } else if ( force_shared_lib ) { apk_assets = CppApkAssets . LoadAsSharedLibrary ( path , system ) ; } else { apk_assets = CppApkAssets . Load ( path , system ) ; } } catch ( OutOfMemoryError e ) { OutOfMemoryError outOfMemoryError = new OutOfMemoryError ( "Failed to load " + path ) ; outOfMemoryError . initCause ( e ) ; throw outOfMemoryError ; } if ( apk_assets == null ) { String error_msg = String . format ( "Failed to load asset path %s" , path ) ; throw new IOException ( error_msg ) ; } return Registries . NATIVE_APK_ASSETS_REGISTRY . register ( apk_assets ) ; }
jboolean force_shared_lib, jboolean overlay) {
jboolean force_shared_lib jboolean overlay ) {