summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2017-08-10 13:48:35 +0900
committerJae Shin <jaeshin@google.com>2017-09-07 15:46:20 +0900
commit19232dff2cea470fb4c2ca0fa75c05aff8f202c5 (patch)
tree50008b8a79201642a5ea646cd4d93ed352c0caa3 /android
parent9247c1167eb1055961c1202199acbe57479922fb (diff)
ICU is disabled by Android.bp
By using vendor.cflags, SQLITE_ENABLE_ICU is on/off from Android.bp. No need to def/undef it inside the source code. Bug: 64514237 Test: BOARD_VNDK_VERSION=current m -j libsqlite libsqlite.vendor Merged-In: If9771fa020e528445275281017e424a5bbc2ae99 Change-Id: If9771fa020e528445275281017e424a5bbc2ae99 (cherry picked from commit 633397eeef296584d3242d8a72790dcf11bb36fd)
Diffstat (limited to 'android')
-rw-r--r--android/Android.bp2
-rw-r--r--android/sqlite3_android.cpp7
2 files changed, 2 insertions, 7 deletions
diff --git a/android/Android.bp b/android/Android.bp
index bbe6fed..d5a1312 100644
--- a/android/Android.bp
+++ b/android/Android.bp
@@ -2,6 +2,7 @@ cc_library_static {
name: "libsqlite3_android",
vendor_available: true,
host_supported: true,
+ cflags: ["-DSQLITE_ENABLE_ICU"],
srcs: [
"PhoneNumberUtils.cpp",
"OldPhoneNumberUtils.cpp",
@@ -15,6 +16,7 @@ cc_library_static {
],
target: {
vendor: {
+ cflags: ["-USQLITE_ENABLE_ICU"],
exclude_shared_libs: ["libicuuc", "libicui18n"],
},
},
diff --git a/android/sqlite3_android.cpp b/android/sqlite3_android.cpp
index da40647..659ee6c 100644
--- a/android/sqlite3_android.cpp
+++ b/android/sqlite3_android.cpp
@@ -21,13 +21,6 @@
#include <string.h>
#include <unistd.h>
-// ICU is turned off when sqlite is built for VNDK
-#ifndef __ANDROID_VNDK__
-#define SQLITE_ENABLE_ICU
-#else
-#undef SQLITE_ENABLE_ICU
-#endif
-
#ifdef SQLITE_ENABLE_ICU
#include <unicode/ucol.h>
#include <unicode/uiter.h>