If the dictionary ID, as indicated in the metadata, is
less than three chars long, it crashes LatinIME.
Of course we don't have such dictionary IDs in the current
metadata, but it's still better to be able to handle
the case gracefully ^^;
Change-Id: I60cdf6f8ecce9f4d44b42ddd5d157aebff9a4163
This creates a new DictionaryInfoUtils class and moves a bunch
of static methods there for later usage.
Change-Id: Iecb0643e6029a7be36bd6cb36aa918c40e6d8c6a
When a dictionary changes locale, we need to remove the file
that corresponds to the old version. It has a different path
than the new one, so we have to search for it explicitly.
Bug: 6540631
Change-Id: Ie9d63ba636651fe90f8fbb9627b7265ac7b34ccd
Also, optimize quite a bit the code that decides whether we have
a default dict or not.
Bug: 5705834
Change-Id: Ied20fbcbbc42cbe8c01759d11b1804d1156c6960
We don't need to pass this down all the way from LatinIME any more.
It fetched be done exactly where it needs to be.
Change-Id: I9f277f9c4f9de70ae755a1334d86c67bbb24c988
Seems I didn't get how to iterate on a String correctly >.>
Talk about a big bug. Anyway, I think it's working now.
Bug: 5955228
Change-Id: I988c900cf2a16c44b9505cfd4f77c7cda7e592f0
This change refactors the dictionary selection code so that the
cached dictionary files list and the settings tests are more
cleanly separated.
This will also help with future refactorings that will test for
the presence of the main dictionary and insert the fall back if
it's not supplied by the dictionary pack.
Bug: 5095140
Change-Id: I8d7caad7c054031df71fe78b043801a774d50f65
Now that the dictionary pack can return several files, it's better
to handle IO exceptions for each file rather than globally. This
also will help with next implementation steps.
Bug: 5095140
Change-Id: I5ed135ad2ad4f55f61f9b3f92c48a35d5c24bdb2
Dictionaries are now copied over from the dictionary pack to Latin IME.
This change enables Latin IME to use all dictionaries that have been
cached until now.
Bug: 5095140
Change-Id: Id9a2bacf9dc1c693189b0ac8aa3f75756dc1e3e6
The dictionary filename used to be passed directly to Latin IME.
This change implements, on the part of Latin IME, the passing of
them as an id that should then be passed through
openAssetFileDescriptor.
Bug: 5095140
Change-Id: I7d1e9d57c19f0645045368f68681680f238189fc
This is necessary because we don't know any more whether the
locale of the process is the expected one when the dictionary
is loaded asynchronously.
Bug: 5023141
Change-Id: Ia9e4741f3b4a04a9f085f5b65ec122471b0c2dff
None of these are expected to actually be null, but those are
included for peace of mind and foolproofing against future
code changes.
Bug: 4580040
Change-Id: Ib112b3e5db5f177aaf61767164b7e78d711f90a0
One of the two methods for getting a dictionary from the dictionary
pack had a bug and would not tolerate not getting an actual dictionary.
This change fixes that.
Change-Id: Id58bb27258494fb3aa60ec07a4eb27cfb5cc7279