Confusingly, specifying a null Locale object to the constructor
of SuggestionSpan does not necessarily mean that
SuggestionSpan#getLocale() returns null. The constructor in
question also receives Context object, and Context's locale can
be used as a fallback locale to initialize locale of
SuggestionSpan.
With this CL, LatinIME always specify non-null Locale object
when instantiating SuggestionSpan object. It basically
corresponds to the active main dictionary, but can be
Locale#ROOT when one locale is not determined for some reasons.
BUG: 20435013
Change-Id: I2c152466410327300e7dba4d7ed9a22f57c17c4f
This allows us to:
1. Rank contacts and only add the top N names to the keyboard LM.
2. Avoid adding duplicate names.
Note: The affinity calcualuation is limited by the fact that some apps
currently do not update the TIMES_CONTACTED counter. To better handle
this case, the new measure also takes into account whether or not a
name is in the visible contacts group.
Bug: 20053274
Change-Id: I2741cb8958667d4a294aba8c437a45cec4b42dc7
The raw strings would be sent to personal LM for decoding.
Earlier lowercased strings were being used with the purpose
of isValid checks (spelling does not consider casing for spell
checking calls). But for showing these in suggestion, we need the
raw strings.
Note: PersonalDictionaryLookup#getWordsForLocale is used to feed
the personal LM in PersonalLanguageModelHelper.
Bug:20152986
Change-Id: I9d796fa57bf2073036bf11d86b143ff205a6199c
This declares to the platform and tools that this app does not use
cleartext network traffic. The platform and tools will be blocking
(on best effort basis) attempts to use such traffic by this app.
For example, attempts to use HTTP (rather than HTTPS) will be blocked.
Bug: 19215516
Change-Id: I4c933a214457025797e077b72d8daf8a0c876923
Also move the class to the parent package, since it's no longer tied to the
spell checking service.
Bug 19966848.
Bug 20036810.
Change-Id: I35014d212fd87281eb90def03ee92e6872dcd63e
We're waiting 10 minutes for tests to run, and half of that time is spent in
depreacted code related to migration of Delight2 dictionary files.
LatinIME will never migrate another Delight2 dictionary file again, so we can
delete this code.
Change-Id: I05c7d8429e8d9a26139456763c77997340fea8c2
BinaryDictionaryTests runs all tests 3 times for 3 format verisons.
Cut that number down by 33% to speed things up.
Change-Id: I8a2f78017fa30f46b5873dcf6a5f478f57af2ebd
Fixes bug where empty previous ngram context not at the
beginning of a sentence incorrectly returned the
beginning-of-sentence marker.
Bug: 19612336
Change-Id: I5ddf3408e20dcedf70487b85c983cd3fc12550e7