| 440 | } |
| 441 | |
| 442 | void ValdiAndroid::NativeBridge::updateResource( // NOLINT |
| 443 | fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT |
| 444 | jlong runtimeHandle, |
| 445 | jbyteArray resource, |
| 446 | jstring bundleName, |
| 447 | jstring filePathWithinBundle) { |
| 448 | auto* runtime = getRuntime(runtimeHandle); |
| 449 | if (runtime == nullptr) { |
| 450 | return; |
| 451 | } |
| 452 | |
| 453 | auto javaEnv = ValdiAndroid::JavaEnv(); |
| 454 | auto bytes = ValdiAndroid::toByteArray(javaEnv, resource); |
| 455 | auto cppBundleName = ValdiAndroid::toInternedString(javaEnv, bundleName); |
| 456 | auto cppFilePathWithinBundle = ValdiAndroid::toInternedString(javaEnv, filePathWithinBundle); |
| 457 | |
| 458 | runtime->updateResource(bytes, cppBundleName, cppFilePathWithinBundle); |
| 459 | } |
| 460 | |
| 461 | /* |
| 462 | * Class: snapchat_valdi_nativebridge_ValdiNativeBridge |
nothing calls this directly
no test coverage detected