diff options
| author | 2024-09-03 16:50:32 +0100 | |
|---|---|---|
| committer | 2024-09-03 16:29:42 +0000 | |
| commit | a19127a199d5243e628d4124112f5f84423587a5 (patch) | |
| tree | e8c0652bc1444af71dd75689dd7dd8bc909b84c3 /libs/androidfw/ApkParsing.cpp | |
| parent | cc5bebfe9ee463c3d1da74703689b5f0f52d602f (diff) | |
Do not define JNI_OnLoad for Windows
HostRuntime should only be used when libandroid_runtime is the entry
point for JNI. Windows is only supported for Layoutlib, which uses
layoutlib_jni as its JNI entry point. That is not an issue for Linux or
macOS, as for those platforms we load layoutlib_jni from the JVM, and
the system takes care of loading its native dependencies (like
libandroid_runtime). However, this does not work on Windows, and we need
to load each dependency explicitly. Loading libandroid_runtime
explicitly triggers its JNI_OnLoad method, which we do not want as it
conflicts with the one then run when loading layoutlib_jni.
Thus we ignore the definition of JNI_OnLoad when compiling
libandroid_runtime on Windows.
Flag: NONE host-only change
Bug: 74062470
Test: run layoutlib on Windows
Change-Id: Icfb75aeb349bbb5ed93495bfea36217a8a44393c
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions