| Commit message (Expand) | Author | Age | Files | Lines |
* | [AD4] Actually copy the file in place.•••This finally makes it work.
Bug: 7702011
Change-Id: I3508c88567f79598e4d1dff561b6ba7dc5c3808f
|  Jean Chalard | 2013-01-21 | 1 | -12/+12 |
* | am 18ff5612: am f592270a: am 7648b37d: Merge "Make sure all FDs are correctly...•••* commit '18ff56125345746e288118d177fcabf3c079ead3':
Make sure all FDs are correctly closed.
|  Jean Chalard | 2012-11-13 | 1 | -11/+19 |
|\ |
|
| * | Make sure all FDs are correctly closed.•••In this kind of series of calls, it's possible that an outer call to a
constructor fails, but the inner succeeded.
Example:
try {
is = new A(new B());
} finally {
if (null != is) is.close();
}
In this case, if new B() succeeds but new A() throws an
exception, is stays null and the intermediate object is never
closed. This is what was happening in this instance.
Bug: 7377336
Change-Id: I3fae9fec1135244982fcf5098c76d93f3e0f2add
|  Jean Chalard | 2012-11-13 | 1 | -11/+19 |
* | | Fix the build.•••It seems this change snuck out from a previous version.
Change-Id: I9c33d51273732b1d55bfd60f0957184c86fa88ab
|  Jean Chalard | 2012-10-23 | 1 | -1/+7 |
* | | Add reader and writer for the combined dict format.•••This introduces a new textual format for the dictionary that combines
words, bigrams and shortcuts to avoid complexity. It is also extensible
to n-grams to fool-prof for the future, and easier to read than XML.
Bug: 7388540
Change-Id: I942bbad51bd0c905a5a54c278667563fd6dd66ec
|  Jean Chalard | 2012-10-23 | 1 | -7/+1 |
* | | Make a better choice for the temporary file•••Change-Id: I745bb285b6b52875c8d2b3a94deb962352f9754e
|  Jean Chalard | 2012-10-12 | 1 | -1/+7 |
|/ |
|
* | Put temporary files under a separate directory.•••Bug: 7328003
Change-Id: Ibe5278ea209d149f87fd08785c77b17e3859948e
|  Jean Chalard | 2012-10-11 | 1 | -2/+3 |
* | Unlink an old file before moving the new file over it•••This is unlikely to be relevant to this bug, but just in case.
Bug: 7274972
Change-Id: I56b31b377af16cc2c15ceb90a19792bed3aab367
|  Jean Chalard | 2012-10-04 | 1 | -0/+1 |
* | Cleanup: Make some classes as final•••Change-Id: I6009b3c1950ba32b7f1e205a3db2307fe0cd688e
|  Tadashi G. Takaoka | 2012-09-27 | 1 | -2/+1 |
* | Add CollectionUtils class to create generic collection easily•••Change-Id: I6b4de9187e122298e5e9cd8ddc9070d062df6a89
|  Tadashi G. Takaoka | 2012-08-22 | 1 | -2/+2 |
* | Fix a bad interaction with mmap•••Bug: 6761221
Change-Id: I7e6d98dc9d7cb34a6163c3957e401ff97abb975c
|  Jean Chalard | 2012-07-04 | 1 | -4/+14 |
* | Notify the dictionary pack about copy failures•••Bug: 6532896
Change-Id: I57f7b1a400222c89776f9bff652a7da4470232c5
|  Jean Chalard | 2012-05-23 | 1 | -5/+13 |
* | Remove an updated dictionary that changed locales•••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
|  Jean Chalard | 2012-05-23 | 1 | -0/+1 |
* | Allow using a format version 2 word list in LatinIME•••Change-Id: I73a4df3a83e49be6e8d3a7d14eb027cfe10f1a23
|  Jean Chalard | 2012-04-20 | 1 | -7/+13 |
* | Pass a parameter to the dict pack if we don't have a default dict•••Also, optimize quite a bit the code that decides whether we have
a default dict or not.
Bug: 5705834
Change-Id: Ied20fbcbbc42cbe8c01759d11b1804d1156c6960
|  Jean Chalard | 2012-04-12 | 1 | -8/+19 |
* | Fix some obvious compiler warnings•••Change-Id: I10a634f7492b45d5a72345f14d36cf341946387d
|  Tadashi G. Takaoka | 2012-03-29 | 1 | -1/+1 |
* | Correctly close the gzip stream•••I had gotten the chain call in reverse.
Bug: 6177523
Change-Id: Ic5b76425de2d5d05d5132f8d2c7ade0d79c14ccc
|  Jean Chalard | 2012-03-21 | 1 | -2/+2 |
* | Cleanup unused import•••This change also gets rid of several compiler warnings.
Change-Id: I23962edaadad18a6e0395d528af17b909dcf5dad
|  Tadashi G. Takaoka | 2011-10-04 | 1 | -2/+0 |
* | Check the magic number of a decoded file•••Checking the magic number of a file upon decoding is necessary,
because if the file is corrupt and we don't check it, we will
fall back to a simple copy of the corrupted file. Latin IME
would realize this and would not crash, but would not use the
corrupted dictionary. If this happened to be a main dictionary,
then the user would lose the ability to use the correct
built-in dictionary.
Not the same, but kinda similar to
Bug: 5223031
Change-Id: Ic2783dc9dd5f3dcf2865623d9452765fe3778db7
|  Jean Chalard | 2011-08-31 | 1 | -6/+36 |
* | Allow sharing dictionaries between similar locales.•••Bug: 5058488
Change-Id: Ib12013f58afad957a8205b439f87480cc12ea06f
|  Jean Chalard | 2011-08-25 | 1 | -15/+24 |
* | Add a debug variable•••...that was missing
Change-Id: Ia3b17909f295e0a93dee633c8d67c0e03840023e
|  Jean Chalard | 2011-08-24 | 1 | -0/+1 |
* | Avoid unnecessary output to the system log.•••The message this removes gets printed under normal conditions.
Normally dictionary files are compressed then crypted, but not
compressed a second time; however LatinIME tries to open a
compressed-crypted-compressed file first, because it could not
do it afterwards and we want to support this case. So under
normal operations, the first method LatinIME tries is actually
expected to fail.
Also, if we decide to stop compressing or/and encrypting dicts
LatinIME supports it as a valid use case. It should not print
errors to the log.
If the file cannot be open at all, then it is an unexpected
case, and Latin IME still reports to the log.
Change-Id: Ic5228c51365a101af1d03e2c893484d3050b5a1c
|  Jean Chalard | 2011-08-24 | 1 | -1/+3 |
* | Call the decrypt/unzip routines upon copying a dictionary.•••Bug: 5095140
Change-Id: I7000f752bc9b7fd6a7af4839b2f225c085300128
|  Jean Chalard | 2011-08-24 | 1 | -40/+103 |
* | Refactoring: cut out a method for caching a word list•••This is preparation to have the decrypting/unzipping code
moved over to LatinIME.
Bug: 5095140
Change-Id: Ic3fdcc3de673b46cef2eb9ebe6a52cbdd614e50a
|  Jean Chalard | 2011-08-24 | 1 | -28/+38 |
* | Exception refactoring•••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
|  Jean Chalard | 2011-08-18 | 1 | -10/+19 |
* | Rename a function and update a comment•••Bug: 5095140
Change-Id: Idf66a04c6a1a05015f94187a8dbce3d443bbf38b
|  Jean Chalard | 2011-08-11 | 1 | -72/+9 |
* | Give the orders to delete the source files to the dict pack•••Bug: 5095140
Change-Id: I64552861768ca30073ffe0d631b2e0c44dad4aa9
|  Jean Chalard | 2011-08-10 | 1 | -2/+6 |
* | Make sure the directory where to put files actually exists•••Bug: 5095140
Change-Id: I764471e54ce0bf6aefe5d604cee97639d5ad0af9
|  Jean Chalard | 2011-08-10 | 1 | -2/+13 |
* | Have Latin IME copy files from the dictionary pack.•••Also some minor cleanup: remove unused methods, minor refactoring into methods.
Bug: 5095140
Change-Id: I035537b37a31adfc8db3b933fb0cefcf703d6c7c
|  Jean Chalard | 2011-08-09 | 1 | -48/+48 |
* | Change the dictionary file passing schema to a list of ids•••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
|  Jean Chalard | 2011-08-02 | 1 | -10/+56 |
* | Close a multiprocess file handle.•••Bug: 5034192
Change-Id: I9c3d757cfae313e9b7510e167de797a74c74a351
|  Jean Chalard | 2011-07-26 | 1 | -0/+1 |
* | Set the locale for opening an asset•••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
|  Jean Chalard | 2011-07-21 | 1 | -2/+6 |
* | Improve the architecture to support multiple dictionaries.•••This change enables the interface to get multiple dictionaries from a
dictionary pack. It only implements it to the end in the case of the
proprietary method, as the open method needs still some working out,
and the "inside the package" method does not need it.
This change goes together with Iaa95bf36, and breaks the build
without it.
Bug: 1752028
Change-Id: I3ccfd696e8ef083ef9c074e1c3e4bb0bf2fcfd23
|  Jean Chalard | 2011-04-28 | 1 | -7/+14 |
* | Allow use of assets for data in the dictionary content provider.•••This update is necessary to allow dictionary content providers to use
assets, which are part of their apk, as data to pass to the keyboard.
Using plain file descriptors doesn't allow for sections of files to
be correctly used.
Change-Id: Ia94c26d6387bce61c73d38f5c2821f20e50e54d4
|  Jean Chalard | 2011-04-15 | 1 | -3/+6 |
* | Add different ways of reading the dictionary file.•••This change adds basic support for an external dictionary provider.
It adds methods for reading the dictionary itself from an asset in
the dictionary provider package directly, obtaining the file name
through the ContentProvider interface; it also adds a way of getting
the data through an InputStream and copying the file locally.
Incidentally this change also adds the code needed to listen for
updating the dictionary provider package and reloading it in time.
This change also goes hand-in-hand with Iab31db6e, which implements
the small closed part of this.
Issue: 3414944
Change-Id: I5e4fff99a59bb99dbdb002102db6c90e6cb41c8a
|  Jean Chalard | 2011-03-18 | 1 | -0/+141 |