Skip to content
Snippets Groups Projects
Commit 707505ec authored by Ken Wakasa's avatar Ken Wakasa
Browse files

A part of efforts of unbundling LatinIME: Get rid of ICU dependency in the native code.

This is actually a back merge from the LatinIME sandbox.  Please refer to
http://arvarest.i.corp.google.com:8080/#change,77

Change-Id: I3ff3781903d5c642c662c2d744f808be7e4d8997
parent 857cde90
No related branches found
No related tags found
No related merge requests found
......@@ -5,10 +5,10 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/src
LOCAL_SRC_FILES := \
jni/com_android_inputmethod_latin_BinaryDictionary.cpp \
src/dictionary.cpp
src/dictionary.cpp \
src/char_utils.cpp
LOCAL_C_INCLUDES += \
external/icu4c/common \
$(JNI_H_INCLUDE)
LOCAL_LDLIBS := -lm
......@@ -18,8 +18,7 @@ LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := \
libandroid_runtime \
libcutils \
libutils \
libicuuc
libutils
LOCAL_MODULE := libjni_latinime
......
This diff is collapsed.
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef LATINIME_CHAR_UTILS_H
#define LATINIME_CHAR_UTILS_H
namespace latinime {
unsigned short latin_tolower(unsigned short c);
}; // namespace latinime
#endif // LATINIME_CHAR_UTILS_H
......@@ -21,8 +21,6 @@
#include <string.h>
#include <cutils/log.h>
#include <unicode/uchar.h>
//#define USE_ASSET_MANAGER
#ifdef USE_ASSET_MANAGER
......@@ -32,6 +30,7 @@
#include "dictionary.h"
#include "basechars.h"
#include "char_utils.h"
#define DEBUG_DICT 0
......@@ -176,7 +175,7 @@ Dictionary::toLowerCase(unsigned short c) {
if (c >='A' && c <= 'Z') {
c |= 32;
} else if (c > 127) {
c = u_tolower(c);
c = latin_tolower(c);
}
return c;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment