diff options
author | 2014-10-03 11:39:21 +0900 | |
---|---|---|
committer | 2014-10-03 18:16:34 +0900 | |
commit | 4ef27c035892888df82d9c9f32ac12ed48c8308f (patch) | |
tree | b23ae4a98571f267c64783c0d5cefca960238981 /native/jni/src/suggest/core/session | |
parent | fb051c3957ae17061204b06258aec3b2e0f05034 (diff) | |
download | latinime-4ef27c035892888df82d9c9f32ac12ed48c8308f.tar.gz latinime-4ef27c035892888df82d9c9f32ac12ed48c8308f.tar.xz latinime-4ef27c035892888df82d9c9f32ac12ed48c8308f.zip |
[ML13] Fix the locale passing in ProximityInfo
The locale is used to determine additional proximity characters. This
is dependent on the dictionary language, but was passed as a function
of the layout, which is wrong and would have given bad suggestions in
multi-lingual mode.
Ideally, additional proximity characters should be inserted in the
dictionary header, but for now it's a rather simple change to get
it from the dictionary's locale instead of the proximity info locale.
Also, that allows us to remove completely the locale parameter from
proximity info, which is a much needed change.
This change has zero effect on unit tests and on regression tests.
Bug: 11230254
Change-Id: If95157155db7dccd1f00b8ba55ccb3600283f9e4
Diffstat (limited to 'native/jni/src/suggest/core/session')
-rw-r--r-- | native/jni/src/suggest/core/session/dic_traverse_session.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/native/jni/src/suggest/core/session/dic_traverse_session.cpp b/native/jni/src/suggest/core/session/dic_traverse_session.cpp index 4d7505a55..b4d01d0f0 100644 --- a/native/jni/src/suggest/core/session/dic_traverse_session.cpp +++ b/native/jni/src/suggest/core/session/dic_traverse_session.cpp @@ -69,8 +69,12 @@ void DicTraverseSession::initializeProximityInfoStates(const int *const inputCod for (int i = 0; i < maxPointerCount; ++i) { mProximityInfoStates[i].initInputParams(i, maxSpatialDistance, getProximityInfo(), inputCodePoints, inputSize, inputXs, inputYs, times, pointerIds, - maxPointerCount == MAX_POINTER_COUNT_G - /* TODO: this is a hack. fix proximity info state */); + // Right now the line below is trying to figure out whether this is a gesture by + // looking at the pointer count and assuming whatever is above the cutoff is + // a gesture and whatever is below is type. This is hacky and incorrect, we + // should pass the correct information instead. + maxPointerCount == MAX_POINTER_COUNT_G, + getDictionaryStructurePolicy()->getHeaderStructurePolicy()->getLocale()); mInputSize += mProximityInfoStates[i].size(); } } |