summaryrefslogtreecommitdiff
path: root/libnativebridge/native_bridge_lazy.cc
diff options
context:
space:
mode:
author dimitry <dimitry@google.com> 2023-08-02 22:26:34 +0200
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-08-08 15:01:51 +0000
commit1aa5d121d7eb21a96f42cfd396e56bf2acdca162 (patch)
tree116a50933b659cade5816cc1a8ea237e76e4c3f2 /libnativebridge/native_bridge_lazy.cc
parent473c5a01699e82723c936bfd47ceac9abee70e09 (diff)
nativebridge: Add getTrampoline2 function to pass JNICallType
NativeBridge needs to know if JNI call is @CriticalNative, starting with v7 getTrampoline2 is used in place of getTrampoline. Bug: https://issuetracker.google.com/288392666 Test: art/libnativebridge/tests/runtests.sh --skip-target Change-Id: I60a2fd6ab2fb9d19dda7bbdcbe09144797bd1d49
Diffstat (limited to 'libnativebridge/native_bridge_lazy.cc')
-rw-r--r--libnativebridge/native_bridge_lazy.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libnativebridge/native_bridge_lazy.cc b/libnativebridge/native_bridge_lazy.cc
index dd8a8068b4..12dfb0ddb9 100644
--- a/libnativebridge/native_bridge_lazy.cc
+++ b/libnativebridge/native_bridge_lazy.cc
@@ -69,6 +69,12 @@ void* NativeBridgeGetTrampoline(void* handle, const char* name, const char* shor
return f(handle, name, shorty, len);
}
+void* NativeBridgeGetTrampoline2(
+ void* handle, const char* name, const char* shorty, uint32_t len, JNICallType jni_call_type) {
+ static auto f = GET_FUNC_PTR(NativeBridgeGetTrampoline2);
+ return f(handle, name, shorty, len, jni_call_type);
+}
+
const char* NativeBridgeGetError() {
static auto f = GET_FUNC_PTR(NativeBridgeGetError);
return f();