MCPcopy Create free account
hub / github.com/Snapchat/Valdi / nativeGetByteArray

Function nativeGetByteArray

valdi/src/valdi/android/MarshallerJNI.cpp:604–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602 return 0;
603 }
604
605 auto getResult = marshaller->getString(static_cast<int>(index));
606
607 if (!checkMarshaller(env, marshaller)) {
608 return 0;
609 }
610
611 return reinterpret_cast<jlong>(getResult.getInternedString().get());
612}
613
614jbyteArray nativeGetByteArray(JNIEnv* env,
615
616 jclass /*cls*/,
617 jlong ptr,
618 jint index) {
619 auto* marshaller = unwrap(env, ptr);
620 if (marshaller == nullptr) {
621 return nullptr;
622 }
623
624 auto typedArray = marshaller->getTypedArray(static_cast<int>(index));
625

Callers 1

getByteArrayMethod · 0.85

Calls 6

unwrapFunction · 0.85
checkMarshallerFunction · 0.85
toJavaObjectFunction · 0.85
releaseObjectMethod · 0.65
JavaEnvClass · 0.50
getTypedArrayMethod · 0.45

Tested by

no test coverage detected