Skip to content

Commit

Permalink
Merge "Use libandroidicu for host libjavacore"
Browse files Browse the repository at this point in the history
  • Loading branch information
gvictor authored and Gerrit Code Review committed Apr 7, 2020
2 parents 8eea1c1 + 29c5385 commit c74b63f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
15 changes: 1 addition & 14 deletions NativeCode.bp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ cc_library_shared {
"dalvik/src/main/native/org_apache_harmony_dalvik_NativeTestTarget.cpp",
],
shared_libs: [
"libandroidicu",
"libandroidio",
"libbase",
"libcrypto",
Expand All @@ -73,20 +74,6 @@ cc_library_shared {
static_libs: [
"libziparchive",
],
target: {
android: {
shared_libs: ["libandroidicu"],
},
host: {
shared_libs: [
"libicuuc",
"libicui18n",
],
static_libs: [
"libandroidicuinit",
],
},
},
}

cc_library_shared {
Expand Down
16 changes: 1 addition & 15 deletions luni/src/main/native/libcore_icu_ICU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@
#include <memory>
#include <vector>



#ifdef __ANDROID__
#include <aicu/AIcu.h>
#else
#include <androidicuinit/android_icu_reg.h>
#endif
#include <aicu/AIcu.h>

#include <log/log.h>
#include <nativehelper/JNIHelp.h>
Expand Down Expand Up @@ -244,11 +238,7 @@ static JNINativeMethod gMethods[] = {

// Init ICU, configuring it and loading the data files.
void register_libcore_icu_ICU(JNIEnv* env) {
#ifdef __ANDROID__
AIcu_register();
#else
android_icu_register();
#endif

jniRegisterNativeMethods(env, "libcore/icu/ICU", gMethods, NELEM(gMethods));
}
Expand All @@ -257,9 +247,5 @@ void register_libcore_icu_ICU(JNIEnv* env) {
void unregister_libcore_icu_ICU() {
// Skip unregistering JNI methods explicitly, class unloading takes care of
// it.
#ifdef __ANDROID__
AIcu_deregister();
#else
android_icu_deregister();
#endif
}

0 comments on commit c74b63f

Please sign in to comment.