Initialize ICU explicitly using the icuandroid_utils lib
Bug: 21730722
(cherry-picked from commit 55536230a14a7c199bbe41a83893c7d82e0c0a24)
Change-Id: I25f76ce4794c4ee4caf4c85d35c318dac3b7bac8
diff --git a/dist/Android.mk b/dist/Android.mk
index 7cf6e75..20b3a0a 100644
--- a/dist/Android.mk
+++ b/dist/Android.mk
@@ -95,8 +95,11 @@
LOCAL_SHARED_LIBRARIES := libsqlite \
libicuuc \
libicui18n \
+ liblog \
libutils
+LOCAL_STATIC_LIBRARIES := libicuandroid_utils
+
LOCAL_CFLAGS += $(device_sqlite_flags)
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
diff --git a/dist/shell.c b/dist/shell.c
index 42f03fa..d3acc19 100644
--- a/dist/shell.c
+++ b/dist/shell.c
@@ -54,6 +54,7 @@
#include <stdarg.h>
// Begin Android Add
#ifndef NO_ANDROID_FUNCS
+#include "IcuUtils.h"
#include <sqlite3_android.h>
#endif
// End Android Add
@@ -1946,6 +1947,7 @@
// Begin Android Add
#ifndef NO_ANDROID_FUNCS
+ InitializeIcuOrDie();
int err = register_localized_collators(p->db, "en_US", 0);
if (err != SQLITE_OK) {
fprintf(stderr, "register_localized_collators() failed\n");