shadows/framework/src/main/java/org/robolectric/shadows/ShadowArscAssetManager9.java
@Implementation(minSdk = P)
  protected static void nativeApplyStyle(long ptr, long theme_ptr, @AttrRes int def_style_attr,
      @StyleRes int def_style_resid, long xml_parser_ptr, @NonNull int[] java_attrs,
      long out_values_ptr, long out_indices_ptr) {
    CppAssetManager2 assetmanager = AssetManagerFromLong(ptr);
    Theme theme = Registries.NATIVE_THEME9_REGISTRY.getNativeObject(theme_ptr);
    CHECK(theme.GetAssetManager() == assetmanager);
    // (void) assetmanager;

    ResXMLParser xml_parser =
        xml_parser_ptr == 0 ? null : NATIVE_RES_XML_PARSERS.getNativeObject(xml_parser_ptr);
    // int[] out_values = reinterpret_cast<int*>(out_values_ptr);
    // int[] out_indices = reinterpret_cast<int*>(out_indices_ptr);
    ShadowVMRuntime shadowVMRuntime = Shadow.extract(VMRuntime.getRuntime());
    int[] out_values = (int[])shadowVMRuntime.getObjectForAddress(out_values_ptr);
    int[] out_indices = (int[])shadowVMRuntime.getObjectForAddress(out_indices_ptr);

    int attrs_len = java_attrs.length;
    int[] attrs = java_attrs; // reinterpret_cast<int*>(env.GetPrimitiveArrayCritical(java_attrs, null));
    // if (attrs == null) {
    //   return;
    // }

    ApplyStyle(theme, xml_parser, (int) (def_style_attr),
        (int) (def_style_resid), attrs, attrs_len,
        out_values, out_indices);
    // env.ReleasePrimitiveArrayCritical(java_attrs, attrs, JNI_ABORT);
  }
@Implementation(minSdk = P)
  protected static void nativeApplyStyle(long ptr, long theme_ptr, @AttrRes int def_style_attr,
      @StyleRes int def_style_resid, long xml_parser_ptr, @NonNull int[] java_attrs,
      long out_values_ptr, long out_indices_ptr) {
    CppAssetManager2 assetmanager = AssetManagerFromLong(ptr);
    Theme theme = Registries.NATIVE_THEME9_REGISTRY.getNativeObject(theme_ptr);
    CHECK(theme.GetAssetManager() == assetmanager);
    // (void) assetmanager;

    ResXMLParser xml_parser =
        xml_parser_ptr == 0 ? null : NATIVE_RES_XML_PARSERS.getNativeObject(xml_parser_ptr);
    // int[] out_values = reinterpret_cast<int*>(out_values_ptr);
    // int[] out_indices = reinterpret_cast<int*>(out_indices_ptr);
    ShadowVMRuntime shadowVMRuntime = Shadow.extract(VMRuntime.getRuntime());
    int[] out_values = (int[])shadowVMRuntime.getObjectForAddress(out_values_ptr);
    int[] out_indices = (int[])shadowVMRuntime.getObjectForAddress(out_indices_ptr);

    int attrs_len = java_attrs.length;
    int[] attrs = java_attrs; // reinterpret_cast<int*>(env.GetPrimitiveArrayCritical(java_attrs, null));
    // if (attrs == null) {
    //   return;
    // }

    ApplyStyle(theme, xml_parser, (int) (def_style_attr),
        (int) (def_style_resid), attrs, attrs_len,
        out_values, out_indices);
    // env.ReleasePrimitiveArrayCritical(java_attrs, attrs, JNI_ABORT);
  }
@ Implementation ( minSdk = P ) protected static void nativeApplyStyle ( long ptr , long theme_ptr , @ AttrRes int def_style_attr , @ StyleRes int def_style_resid , long xml_parser_ptr , @ NonNull int [ ] java_attrs , long out_values_ptr , long out_indices_ptr ) { CppAssetManager2 assetmanager = AssetManagerFromLong ( ptr ) ; Theme theme = Registries . NATIVE_THEME9_REGISTRY . getNativeObject ( theme_ptr ) ; CHECK ( theme . GetAssetManager ( ) == assetmanager ) ; // (void) assetmanager; ResXMLParser xml_parser = xml_parser_ptr == 0 ? null : NATIVE_RES_XML_PARSERS . getNativeObject ( xml_parser_ptr ) ; // int[] out_values = reinterpret_cast<int*>(out_values_ptr); // int[] out_indices = reinterpret_cast<int*>(out_indices_ptr); ShadowVMRuntime shadowVMRuntime = Shadow . extract ( VMRuntime . getRuntime ( ) ) ; int [ ] out_values = ( int [ ] ) shadowVMRuntime . getObjectForAddress ( out_values_ptr ) ; int [ ] out_indices = ( int [ ] ) shadowVMRuntime . getObjectForAddress ( out_indices_ptr ) ; int attrs_len = java_attrs . length ; int [ ] attrs = java_attrs ; // reinterpret_cast<int*>(env.GetPrimitiveArrayCritical(java_attrs, null)); // if (attrs == null) { //   return; // } ApplyStyle ( theme , xml_parser , ( int ) ( def_style_attr ) , ( int ) ( def_style_resid ) , attrs , attrs_len , out_values , out_indices ) ; // env.ReleasePrimitiveArrayCritical(java_attrs, attrs, JNI_ABORT); }
jintArray java_attrs, jlong out_values_ptr, jlong out_indices_ptr) {
jintArray java_attrs jlong out_values_ptr jlong out_indices_ptr ) {