summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-03-09 18:20:42 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-09 18:20:42 +0000
commit6291beddfcdf843f07f12a6d4551301e5fcff73c (patch)
treef390a12a57cf040d1e04bdea9c69a5b45eb79dd6 /core
parentedc3c8939f3cde4ab9343e7654f5dac1122fb470 (diff)
parent63d43949047eaed1cddf10bb4f666df6807618ce (diff)
downloadframeworks_base-6291beddfcdf843f07f12a6d4551301e5fcff73c.zip
frameworks_base-6291beddfcdf843f07f12a6d4551301e5fcff73c.tar.gz
frameworks_base-6291beddfcdf843f07f12a6d4551301e5fcff73c.tar.bz2
am 63d43949: Merge "Use the icu:: namespace for icu4c API."
* commit '63d43949047eaed1cddf10bb4f666df6807618ce': Use the icu:: namespace for icu4c API.
Diffstat (limited to 'core')
-rw-r--r--core/jni/Android.mk2
-rw-r--r--core/jni/android_text_StaticLayout.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 20ece24..45dce2c 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -22,6 +22,8 @@ endif
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
+LOCAL_CFLAGS += -DU_USING_ICU_NAMESPACE=0
+
LOCAL_SRC_FILES:= \
AndroidRuntime.cpp \
com_android_internal_content_NativeLibraryHelper.cpp \
diff --git a/core/jni/android_text_StaticLayout.cpp b/core/jni/android_text_StaticLayout.cpp
index 0c2ebf4..fceb980 100644
--- a/core/jni/android_text_StaticLayout.cpp
+++ b/core/jni/android_text_StaticLayout.cpp
@@ -30,7 +30,7 @@ namespace android {
class ScopedBreakIterator {
public:
- ScopedBreakIterator(JNIEnv* env, BreakIterator* breakIterator, jcharArray inputText,
+ ScopedBreakIterator(JNIEnv* env, icu::BreakIterator* breakIterator, jcharArray inputText,
jint length) : mBreakIterator(breakIterator), mChars(env, inputText) {
UErrorCode status = U_ZERO_ERROR;
mUText = utext_openUChars(NULL, mChars.get(), length, &status);
@@ -41,7 +41,7 @@ class ScopedBreakIterator {
mBreakIterator->setText(mUText, status);
}
- inline BreakIterator* operator->() {
+ inline icu::BreakIterator* operator->() {
return mBreakIterator;
}
@@ -50,7 +50,7 @@ class ScopedBreakIterator {
delete mBreakIterator;
}
private:
- BreakIterator* mBreakIterator;
+ icu::BreakIterator* mBreakIterator;
ScopedCharArrayRO mChars;
UText* mUText;
@@ -68,14 +68,14 @@ static jintArray nLineBreakOpportunities(JNIEnv* env, jclass, jstring javaLocale
ScopedIcuLocale icuLocale(env, javaLocaleName);
if (icuLocale.valid()) {
UErrorCode status = U_ZERO_ERROR;
- BreakIterator* it = BreakIterator::createLineInstance(icuLocale.locale(), status);
+ icu::BreakIterator* it = icu::BreakIterator::createLineInstance(icuLocale.locale(), status);
if (!U_SUCCESS(status) || it == NULL) {
if (it) {
delete it;
}
} else {
ScopedBreakIterator breakIterator(env, it, inputText, length);
- for (int loc = breakIterator->first(); loc != BreakIterator::DONE;
+ for (int loc = breakIterator->first(); loc != icu::BreakIterator::DONE;
loc = breakIterator->next()) {
breaks.push_back(loc);
}