Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 126d89bb authored by Elliott Hughes's avatar Elliott Hughes Committed by Android (Google) Code Review
Browse files

Merge "resolved conflicts for merge of 7545accf to master"

parents edacf22c c0b8f647
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,8 @@ endif


LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES


LOCAL_CFLAGS += -DU_USING_ICU_NAMESPACE=0

LOCAL_SRC_FILES:= \
LOCAL_SRC_FILES:= \
    AndroidRuntime.cpp \
    AndroidRuntime.cpp \
    com_android_internal_content_NativeLibraryHelper.cpp \
    com_android_internal_content_NativeLibraryHelper.cpp \
+6 −6
Original line number Original line Diff line number Diff line
@@ -48,10 +48,10 @@ class Builder {
            delete mBreakIterator;
            delete mBreakIterator;
        }
        }


        void setLocale(const Locale& locale) {
        void setLocale(const icu::Locale& locale) {
            delete mBreakIterator;
            delete mBreakIterator;
            UErrorCode status = U_ZERO_ERROR;
            UErrorCode status = U_ZERO_ERROR;
            mBreakIterator = BreakIterator::createLineInstance(locale, status);
            mBreakIterator = icu::BreakIterator::createLineInstance(locale, status);
            // TODO: check status
            // TODO: check status
        }
        }


@@ -77,13 +77,13 @@ class Builder {
            }
            }
        }
        }


        BreakIterator* breakIterator() const {
        icu::BreakIterator* breakIterator() const {
            return mBreakIterator;
            return mBreakIterator;
        }
        }


    private:
    private:
        const size_t MAX_TEXT_BUF_RETAIN = 32678;
        const size_t MAX_TEXT_BUF_RETAIN = 32678;
        BreakIterator* mBreakIterator = nullptr;
        icu::BreakIterator* mBreakIterator = nullptr;
        UText mUText = UTEXT_INITIALIZER;
        UText mUText = UTEXT_INITIALIZER;
        std::vector<uint16_t>mTextBuf;
        std::vector<uint16_t>mTextBuf;
};
};
@@ -560,9 +560,9 @@ static jint nComputeLineBreaks(JNIEnv* env, jclass, jlong nativePtr,
    // TODO: this array access is pretty inefficient, but we'll replace it anyway
    // TODO: this array access is pretty inefficient, but we'll replace it anyway
    ScopedFloatArrayRO widthsScopedArr(env, widths);
    ScopedFloatArrayRO widthsScopedArr(env, widths);


    BreakIterator* breakIterator = b->breakIterator();
    icu::BreakIterator* breakIterator = b->breakIterator();
    int loc = breakIterator->first();
    int loc = breakIterator->first();
    while ((loc = breakIterator->next()) != BreakIterator::DONE) {
    while ((loc = breakIterator->next()) != icu::BreakIterator::DONE) {
        breaks.push_back(loc);
        breaks.push_back(loc);
    }
    }