Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a19127a1 authored by Jerome Gaillard's avatar Jerome Gaillard
Browse files

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
parent cc5bebfe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment