diff options
author | Brett Chabot <brettchabot@google.com> | 2019-06-19 10:19:00 -0700 |
---|---|---|
committer | Jerome Gaillard <jgaillard@google.com> | 2019-06-27 18:02:03 +0100 |
commit | 15c7bcd01089043882f9b53b71724bc294615bd7 (patch) | |
tree | 733b49f73ef8416bce06d53679fe181a4f9eba5a /core/jni/LayoutlibLoader.cpp | |
parent | 5ee1d66486ca638460c5edbd1fa0293b956c73e9 (diff) |
Build native AssetManager and friends for host linux.
Test: tools/test/simulated_device/ctesque/run_tests_host.sh
Change-Id: I4298502eea67a1676d97f84bf879c363fa926678
Diffstat (limited to 'core/jni/LayoutlibLoader.cpp')
-rw-r--r-- | core/jni/LayoutlibLoader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/jni/LayoutlibLoader.cpp b/core/jni/LayoutlibLoader.cpp index 3316f2da6f3b..f451f4eb5389 100644 --- a/core/jni/LayoutlibLoader.cpp +++ b/core/jni/LayoutlibLoader.cpp @@ -49,6 +49,9 @@ extern int register_android_graphics_Typeface(JNIEnv* env); namespace android { extern int register_android_animation_PropertyValuesHolder(JNIEnv *env); +extern int register_android_content_AssetManager(JNIEnv* env); +extern int register_android_content_StringBlock(JNIEnv* env); +extern int register_android_content_res_ApkAssets(JNIEnv* env); extern int register_android_graphics_Canvas(JNIEnv* env); extern int register_android_graphics_ColorFilter(JNIEnv* env); extern int register_android_graphics_ColorSpace(JNIEnv* env); @@ -86,6 +89,9 @@ 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)}, + {"android.content.AssetManager", REG_JNI(register_android_content_AssetManager)}, + {"android.content.StringBlock", REG_JNI(register_android_content_StringBlock)}, + {"android.content.res.ApkAssets", REG_JNI(register_android_content_res_ApkAssets)}, {"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)}, @@ -241,6 +247,8 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) { const char* path = env->GetStringUTFChars(stringPath, 0); u_setDataDirectory(path); env->ReleaseStringUTFChars(stringPath, path); + + return JNI_VERSION_1_6; } |