1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmz007 6d24f2138b
Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56)
2 years ago
..
header_only_include/nativehelper Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
include Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
include_jni Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
include_platform/nativehelper Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
include_platform_header_only/nativehelper Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
tests Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
tests_mts Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
ALog-priv.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
Android.bp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
DlHelp.c Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
DlHelp.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
ExpandableString.c Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
ExpandableString.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
JNIHelp.c Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
JNIPlatformHelp.c Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
JniConstants.c Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
JniConstants.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
JniInvocation-priv.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
JniInvocation.c Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
NOTICE Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
OWNERS Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
PREUPLOAD.cfg Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
README.md Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
TEST_MAPPING Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
file_descriptor_jni.c Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
libnativehelper.map.txt Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
libnativehelper_lazy.c Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago
libnativehelper_lazy.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 2 years ago

README.md

libnativehelper

libnativehelper is a collection of JNI related utilities used in Android.

There are several header and binary libraries here and not all of the functionality fits together well. The header libraries are mostly C++ based. The binary libraries are entirely written in C with no C++ dependencies. This is by design as the code here can be distributed in multiple ways, including mainline modules, so keeping the size down benefits everyone with smaller downloads and a stable ABI.

Header Libraries

jni_headers

This is a header library that contains provides the API represented in the JNI Specification 1.6. Any project in Android that depends on jni.h should depend on this.

See:

libnativehelper_header_only

These headers provide utilities that defined entirely within the headers. There are scoped resource classes that make common JNI patterns of acquiring and releasing resources safer to use than the JNI specification equivalents. Examples being ScopedLocalRef to manage the lifetime of local references and ScopedUtfChars to manage the lifetime of Java strings in native code and provide access to utf8 characters.

See:

jni_platform_headers

The jni_macros.h header provide compile time checking of JNI methods implemented in C++. They ensure the C++ method declaration match the Java signature they are associated with.

See:

Libraries

libnativehelper

A shared library distributed in the ART module that provides helper routines built on Java APIs. This library depends on details that are private to libcore and use should be restricted to platform code and within the ART module.

This library also contains the JNI invocation API from the JNI Specification and the glue that connects the ART runtime to the API implementation. The glue logic is platform only as it is used with the Zygote and the standalone dalvikvm.

See:

libnativehelper_compat_libc++

This shared and static library contains a subset of the helper routines in libnativehelper based on public Java API. This code can be statically linked as the Java APIs it depends on are considered stable. The name of this library is a misnomer since it contains no C++ code.

See: