Loading native/jni/Android.mk +6 −2 Original line number Diff line number Diff line Loading @@ -66,11 +66,15 @@ LOCAL_SRC_FILES := \ ifeq ($(FLAG_DO_PROFILE), true) $(warning Making profiling version of native library) LOCAL_CFLAGS += -DFLAG_DO_PROFILE LOCAL_CFLAGS += -DFLAG_DO_PROFILE -funwind-tables else # FLAG_DO_PROFILE ifeq ($(FLAG_DBG), true) $(warning Making debug version of native library) LOCAL_CFLAGS += -DFLAG_DBG LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables ifeq ($(FLAG_FULL_DBG), true) $(warning Making full debug version of native library) LOCAL_CFLAGS += -DFLAG_FULL_DBG endif # FLAG_FULL_DBG endif # FLAG_DBG endif # FLAG_DO_PROFILE Loading native/jni/jni_common.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ #define LOG_TAG "LatinIME: jni" #include <cassert> #include "com_android_inputmethod_keyboard_ProximityInfo.h" #include "com_android_inputmethod_latin_BinaryDictionary.h" #include "com_android_inputmethod_latin_DicTraverseSession.h" Loading @@ -35,7 +33,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) { AKLOGE("ERROR: GetEnv failed"); return -1; } assert(env); ASSERT(env); if (!env) { AKLOGE("ERROR: JNIEnv is invalid"); return -1; Loading native/jni/src/correction.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ Correction::CorrectionType Correction::processCharAndCalcState(const int c, cons if (mSkippedCount == 0 && mSkipPos < mOutputIndex) { if (DEBUG_DICT) { // TODO: Enable this assertion. //assert(mSkipPos == mOutputIndex - 1); //ASSERT(mSkipPos == mOutputIndex - 1); } mSkipPos = mOutputIndex; } Loading native/jni/src/correction.h +1 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #ifndef LATINIME_CORRECTION_H #define LATINIME_CORRECTION_H #include <cassert> #include <cstring> // for memset() #include "correction_state.h" Loading Loading @@ -150,7 +149,7 @@ class Correction { // Branch if multiplier == 2 for the optimization if (multiplier < 0) { if (DEBUG_DICT) { assert(false); ASSERT(false); } AKLOGI("--- Invalid multiplier: %d", multiplier); } else if (multiplier == 0) { Loading native/jni/src/proximity_info.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ * limitations under the License. */ #include <cassert> #include <cstring> #define LOG_TAG "LatinIME: proximity_info.cpp" Loading Loading @@ -75,7 +74,7 @@ ProximityInfo::ProximityInfo(JNIEnv *env, const jstring localeJStr, const int ma const jsize localeCStrUtf8Length = env->GetStringUTFLength(localeJStr); if (localeCStrUtf8Length >= MAX_LOCALE_STRING_LENGTH) { AKLOGI("Locale string length too long: length=%d", localeCStrUtf8Length); assert(false); ASSERT(false); } memset(mLocaleStr, 0, sizeof(mLocaleStr)); env->GetStringUTFRegion(localeJStr, 0, env->GetStringLength(localeJStr), mLocaleStr); Loading Loading @@ -105,7 +104,7 @@ bool ProximityInfo::hasSpaceProximity(const int x, const int y) const { if (DEBUG_DICT) { AKLOGI("HasSpaceProximity: Illegal coordinates (%d, %d)", x, y); // TODO: Enable this assertion. //assert(false); //ASSERT(false); } return false; } Loading Loading @@ -180,7 +179,7 @@ void ProximityInfo::calculateNearbyKeyCodes( inputCodes[insertPos++] = c; if (insertPos >= MAX_PROXIMITY_CHARS_SIZE) { if (DEBUG_DICT) { assert(false); ASSERT(false); } return; } Loading @@ -192,7 +191,7 @@ void ProximityInfo::calculateNearbyKeyCodes( inputCodes[insertPos++] = ADDITIONAL_PROXIMITY_CHAR_DELIMITER_CODE; if (insertPos >= MAX_PROXIMITY_CHARS_SIZE) { if (DEBUG_DICT) { assert(false); ASSERT(false); } return; } Loading @@ -213,7 +212,7 @@ void ProximityInfo::calculateNearbyKeyCodes( inputCodes[insertPos++] = ac; if (insertPos >= MAX_PROXIMITY_CHARS_SIZE) { if (DEBUG_DICT) { assert(false); ASSERT(false); } return; } Loading Loading
native/jni/Android.mk +6 −2 Original line number Diff line number Diff line Loading @@ -66,11 +66,15 @@ LOCAL_SRC_FILES := \ ifeq ($(FLAG_DO_PROFILE), true) $(warning Making profiling version of native library) LOCAL_CFLAGS += -DFLAG_DO_PROFILE LOCAL_CFLAGS += -DFLAG_DO_PROFILE -funwind-tables else # FLAG_DO_PROFILE ifeq ($(FLAG_DBG), true) $(warning Making debug version of native library) LOCAL_CFLAGS += -DFLAG_DBG LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables ifeq ($(FLAG_FULL_DBG), true) $(warning Making full debug version of native library) LOCAL_CFLAGS += -DFLAG_FULL_DBG endif # FLAG_FULL_DBG endif # FLAG_DBG endif # FLAG_DO_PROFILE Loading
native/jni/jni_common.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ #define LOG_TAG "LatinIME: jni" #include <cassert> #include "com_android_inputmethod_keyboard_ProximityInfo.h" #include "com_android_inputmethod_latin_BinaryDictionary.h" #include "com_android_inputmethod_latin_DicTraverseSession.h" Loading @@ -35,7 +33,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) { AKLOGE("ERROR: GetEnv failed"); return -1; } assert(env); ASSERT(env); if (!env) { AKLOGE("ERROR: JNIEnv is invalid"); return -1; Loading
native/jni/src/correction.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ Correction::CorrectionType Correction::processCharAndCalcState(const int c, cons if (mSkippedCount == 0 && mSkipPos < mOutputIndex) { if (DEBUG_DICT) { // TODO: Enable this assertion. //assert(mSkipPos == mOutputIndex - 1); //ASSERT(mSkipPos == mOutputIndex - 1); } mSkipPos = mOutputIndex; } Loading
native/jni/src/correction.h +1 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #ifndef LATINIME_CORRECTION_H #define LATINIME_CORRECTION_H #include <cassert> #include <cstring> // for memset() #include "correction_state.h" Loading Loading @@ -150,7 +149,7 @@ class Correction { // Branch if multiplier == 2 for the optimization if (multiplier < 0) { if (DEBUG_DICT) { assert(false); ASSERT(false); } AKLOGI("--- Invalid multiplier: %d", multiplier); } else if (multiplier == 0) { Loading
native/jni/src/proximity_info.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ * limitations under the License. */ #include <cassert> #include <cstring> #define LOG_TAG "LatinIME: proximity_info.cpp" Loading Loading @@ -75,7 +74,7 @@ ProximityInfo::ProximityInfo(JNIEnv *env, const jstring localeJStr, const int ma const jsize localeCStrUtf8Length = env->GetStringUTFLength(localeJStr); if (localeCStrUtf8Length >= MAX_LOCALE_STRING_LENGTH) { AKLOGI("Locale string length too long: length=%d", localeCStrUtf8Length); assert(false); ASSERT(false); } memset(mLocaleStr, 0, sizeof(mLocaleStr)); env->GetStringUTFRegion(localeJStr, 0, env->GetStringLength(localeJStr), mLocaleStr); Loading Loading @@ -105,7 +104,7 @@ bool ProximityInfo::hasSpaceProximity(const int x, const int y) const { if (DEBUG_DICT) { AKLOGI("HasSpaceProximity: Illegal coordinates (%d, %d)", x, y); // TODO: Enable this assertion. //assert(false); //ASSERT(false); } return false; } Loading Loading @@ -180,7 +179,7 @@ void ProximityInfo::calculateNearbyKeyCodes( inputCodes[insertPos++] = c; if (insertPos >= MAX_PROXIMITY_CHARS_SIZE) { if (DEBUG_DICT) { assert(false); ASSERT(false); } return; } Loading @@ -192,7 +191,7 @@ void ProximityInfo::calculateNearbyKeyCodes( inputCodes[insertPos++] = ADDITIONAL_PROXIMITY_CHAR_DELIMITER_CODE; if (insertPos >= MAX_PROXIMITY_CHARS_SIZE) { if (DEBUG_DICT) { assert(false); ASSERT(false); } return; } Loading @@ -213,7 +212,7 @@ void ProximityInfo::calculateNearbyKeyCodes( inputCodes[insertPos++] = ac; if (insertPos >= MAX_PROXIMITY_CHARS_SIZE) { if (DEBUG_DICT) { assert(false); ASSERT(false); } return; } Loading