summaryrefslogtreecommitdiff
path: root/core/jni/LayoutlibLoader.cpp
diff options
context:
space:
mode:
authorJerome Gaillard <jgaillard@google.com>2019-07-02 19:32:39 +0100
committerJerome Gaillard <jgaillard@google.com>2019-07-02 19:40:56 +0100
commit482d7559d5cca84e3840b9cac7511c710342f7b3 (patch)
tree7e269809341eeb94e33965f9b61863fedc369914 /core/jni/LayoutlibLoader.cpp
parent087f6cfa158b97b3d24f7f4779d74610cf6d8111 (diff)
Some JNI classes can only be compiled for Linux
Those classes are not used for layoutlib, so cross-platform is not currently required. Bug: N/A Test: m libandroid_runtime on mac Change-Id: I0e37c7b110cdce35fcb1348ba036e331e64f474b
Diffstat (limited to 'core/jni/LayoutlibLoader.cpp')
-rw-r--r--core/jni/LayoutlibLoader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/jni/LayoutlibLoader.cpp b/core/jni/LayoutlibLoader.cpp
index eb700355ff0e..549fd4db8b76 100644
--- a/core/jni/LayoutlibLoader.cpp
+++ b/core/jni/LayoutlibLoader.cpp
@@ -91,10 +91,12 @@ struct RegJNIRec {
// The actual list of registered classes will be determined at runtime via the 'native_classes' System property
static const std::unordered_map<std::string, RegJNIRec> gRegJNIMap = {
{"android.animation.PropertyValuesHolder", REG_JNI(register_android_animation_PropertyValuesHolder)},
+#ifdef __linux__
{"android.content.AssetManager", REG_JNI(register_android_content_AssetManager)},
{"android.content.StringBlock", REG_JNI(register_android_content_StringBlock)},
{"android.content.XmlBlock", REG_JNI(register_android_content_XmlBlock)},
{"android.content.res.ApkAssets", REG_JNI(register_android_content_res_ApkAssets)},
+#endif
{"android.graphics.Bitmap", REG_JNI(register_android_graphics_Bitmap)},
{"android.graphics.BitmapFactory", REG_JNI(register_android_graphics_BitmapFactory)},
{"android.graphics.ByteBufferStreamAdaptor", REG_JNI(register_android_graphics_ByteBufferStreamAdaptor)},
@@ -125,10 +127,14 @@ static const std::unordered_map<std::string, RegJNIRec> gRegJNIMap = {
{"android.graphics.fonts.FontFamily", REG_JNI(register_android_graphics_fonts_FontFamily)},
{"android.graphics.text.LineBreaker", REG_JNI(register_android_graphics_text_LineBreaker)},
{"android.graphics.text.MeasuredText", REG_JNI(register_android_graphics_text_MeasuredText)},
+#ifdef __linux__
{"android.os.MessageQueue", REG_JNI(register_android_os_MessageQueue)},
+#endif
{"android.os.SystemClock", REG_JNI(register_android_os_SystemClock)},
{"android.os.SystemProperties", REG_JNI(register_android_os_SystemProperties)},
+#ifdef __linux__
{"android.os.Trace", REG_JNI(register_android_os_Trace)},
+#endif
{"android.util.EventLog", REG_JNI(register_android_util_EventLog)},
{"android.util.Log", REG_JNI(register_android_util_Log)},
{"android.util.PathParser", REG_JNI(register_android_util_PathParser)},