This will allow to greatly improve the performance of the
metadata-generating files, as they won't have to wait for
the info command to read the entire dictionary when the
header is all we need.
Also add tests, and while we're at it, use the seed as
intended to enable reproducible tests.
Change-Id: I0ba79ef62f0292b23e63aed57ff565bb102281a2
It's still unused as of this change but the next change will use it
As a reference point, generating the metadata for Bayo takes
3'02" on my machine with the info command; it's down to 16" if
made to use this instead. The gains increases with the number
of dictionaries obviously.
Change-Id: I0eeea2d8f81bb74b0d1570af658e91b56f7c2b79
Without personalization:
Total words: 1134774, Success Num: 899230, Success Percentage: 79.243%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1871, Bad Failure Percentage: 0.165%
Failures, with auto-correction (F-C): 29084, F-C Percentage: 2.563%
Max Keystrokes: 6072959, Min Keystrokes: 4436090, Keystroke Saving Percentage:26.953%
Before:
Total words: 1134646, Success Num: 925194, Success Percentage: 81.540%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1316, Bad Failure Percentage: 0.116%
Failures, with auto-correction (F-C): 28288, F-C Percentage: 2.493%
Max Keystrokes: 6072831, Min Keystrokes: 3946188, Keystroke Saving Percentage:35.019%
After
Total words: 1134659, Success Num: 944746, Success Percentage: 83.263%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1258, Bad Failure Percentage: 0.111%
Failures, with auto-correction (F-C): 28016, F-C Percentage: 2.469%
Max Keystrokes: 6072844, Min Keystrokes: 3387333, Keystroke Saving Percentage:44.222%
Change-Id: I3af42ec37a11847c0429c28616e726f6a339247f
(This is a cherrypick of http://ag/576739)
Also, modify the IllegalArgumentException to capture the
values passed for start, end, and array.length to make
debugging easier in the unlikely event that it is thrown.
Add corresponding tests for the exceptions.
Tested:
tapas LatinImeGoogle LatinImeGoogleTests userdebug
make -j30 && \
adb install -r \
out/target/product/generic/data/app/LatinImeGoogleTests/LatinImeGoogleTests.apk && \
adb install -r \
out/target/product/generic/system/app/LatinImeGoogle/LatinImeGoogle.apk && \
adb shell am instrument -w -e class \
com.android.inputmethod.latin.utils.CollectionUtilsTests \
com.google.android.inputmethod.latin.tests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I0c579ca4f4f2a9b2575aa6f8fa75e3ee4a21cf8a
If a word is once deleted, the word never gets into the
personalized dictionaries due to this bug.
Change-Id: Ife4e3fe1ba0615b4135e6291d2151b0db7d3f940
This CL fixes the following compiler warnings.
- Indirect access to static member
- Access to a non-accessible member of an enclosing type
- Parameter assignment
- Method can be static
- Local variable declaration hides another field or variable
- Value of local variable is not used
- Unused import
- Unused private member
- Unnecessary 'else' statement
- Unnecessary declaration of throw exception
- Redundant type arguments
- Missing '@Override' annotation
- Unused '@SuppressWarning' annotations
Bug: 18003991
Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
No behaviour changes.
Unified the overloaded FusionDictionary::add method to always take an
isPossiblyOffensive argument.
Bug: 11031090
Change-Id: I5741a023ca1ce842d2cf10d4f6c926b0efabaa78
This CL adds missing the following Telugu letters
- U+0C4A: TELUGU VOWEL SIGN O
- U+0C1E: TELUGU LETTER NYA
And also reorganizes some letter reasonably.
Bug: 10028759
Change-Id: If7fd3854ffab8484dbe6ced0ff2ed52be838e44d
- Adds a preference for enabling sync, which controls the sync behavior
- Make the ProductionFlags depend on appropriate flags to guarantee that
we don't mess things when flipping some flags
- Preferences now control the "syncable" property of the provider
thereby controlling the policy and when this entry shows up in
system settings.
Bug: 17464069
Change-Id: I1d58351188518c1ae9f1f9e147b5ea15d32a3427
There are two categories of preferences:
1. That are part of the default shared preference
They were all getting backed up and restored.
Added a blacklist to not restore some of these.
e.g. current account
2. That are in a non-default shared preference file.
These are not getting backed up currently, but added a specific
local preference file for all such preferences.
Bug: 17288591
Change-Id: I2f748be971a2337543e5014434aa39313fd1e1d8
This change updates some of the code that the library uses
to communicate with the cloud server
Specifically :
- Update BlockingHttpClient to use template ResponseProcessor
- Update HttpUrlConnectionBuilder to setAuthToken for HttpUrlConnection
Bug: 17464069
Bug: 17464805
Change-Id: I7d7b58dff594b920162f799d102e8582ff9fe6a4
That is, when auto-correcting or when manually picking.
This is not great, but it's a good starting point.
Bug: 11230254
Change-Id: I07627f48e2de1c28053d6572c7c72625808ec79c
Note that unit test for Sinhala (Sri Lanka) and Tamil (Sri Lanka) have
been unexpectedly @suppressed.
Bug: 17743363
Change-Id: I4076a61adbf2d4aee58417d0c354b8ef4a938668
Note that unit test for Sinhala (Sri Lanka) and Tamil (Sri Lanka) have
been unexpectedly @suppressed.
Bug: 17743363
Change-Id: I5f4b6fd8cbb8fa4e31df9ac602847c681655fd02
This adds unittest for SuggestionSpanUtils for subsequent CLs.
No behavior change is intended in this CL.
BUG: 16995261
Change-Id: I90d1591cab893a1421ca633963b7c8f00a5fe4b4
The behavior change was introduced by I8b3458ad. Concretely,
empty bigram lists would end up as empty lists instead of null.
Change-Id: Ibcdf7e6aabc6aba3f5db0477335882394e050ce5
- Move predfined keys definitions to AbstractLayerBase and make it a
top-level class.
- LayoutCustomizer extends AbstractLayoutBase that provides unit tests
to access helper method and predefined key easily.
- Move shared layout custmizers to new layout.customizer package.
- Move private layout customizers to layout classes.
Change-Id: I9421cef1bedf5759fb0434842ac13a3fe3320b69