Skip to content
Snippets Groups Projects
  1. Feb 12, 2013
  2. Feb 07, 2013
  3. Feb 06, 2013
  4. Feb 02, 2013
  5. Jan 29, 2013
    • Jean Chalard's avatar
      Refactoring · d515f134
      Jean Chalard authored
      This creates a new DictionaryInfoUtils class and moves a bunch
      of static methods there for later usage.
      
      Change-Id: Iecb0643e6029a7be36bd6cb36aa918c40e6d8c6a
      d515f134
  6. Jan 21, 2013
  7. Nov 13, 2012
    • Jean Chalard's avatar
      Make sure all FDs are correctly closed. · 5c32b6da
      Jean Chalard authored
      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
      5c32b6da
  8. Oct 23, 2012
    • Jean Chalard's avatar
      Fix the build. · 1e0cc86b
      Jean Chalard authored
      It seems this change snuck out from a previous version.
      
      Change-Id: I9c33d51273732b1d55bfd60f0957184c86fa88ab
      1e0cc86b
    • Jean Chalard's avatar
      Add reader and writer for the combined dict format. · 9bb4eebf
      Jean Chalard authored
      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
      9bb4eebf
  9. Oct 12, 2012
  10. Oct 11, 2012
  11. Oct 04, 2012
  12. Sep 27, 2012
  13. Aug 22, 2012
  14. Jul 04, 2012
  15. May 23, 2012
  16. Apr 20, 2012
  17. Apr 12, 2012
  18. Mar 29, 2012
  19. Mar 21, 2012
  20. Oct 04, 2011
  21. Aug 31, 2011
    • Jean Chalard's avatar
      Check the magic number of a decoded file · 7a408431
      Jean Chalard authored
      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
      7a408431
  22. Aug 25, 2011
  23. Aug 24, 2011
    • Jean Chalard's avatar
      Add a debug variable · a16621ad
      Jean Chalard authored
      ...that was missing
      
      Change-Id: Ia3b17909f295e0a93dee633c8d67c0e03840023e
      a16621ad
    • Jean Chalard's avatar
      Avoid unnecessary output to the system log. · 20973de7
      Jean Chalard authored
      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
      20973de7
    • Jean Chalard's avatar
      Call the decrypt/unzip routines upon copying a dictionary. · 38d512c0
      Jean Chalard authored
      Bug: 5095140
      Change-Id: I7000f752bc9b7fd6a7af4839b2f225c085300128
      38d512c0
    • Jean Chalard's avatar
      Refactoring: cut out a method for caching a word list · 7b1f74bb
      Jean Chalard authored
      This is preparation to have the decrypting/unzipping code
      moved over to LatinIME.
      
      Bug: 5095140
      Change-Id: Ic3fdcc3de673b46cef2eb9ebe6a52cbdd614e50a
      7b1f74bb
  24. Aug 18, 2011
    • Jean Chalard's avatar
      Exception refactoring · 80e0bf04
      Jean Chalard authored
      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
      80e0bf04
  25. Aug 11, 2011
  26. Aug 10, 2011
  27. Aug 09, 2011
  28. Aug 02, 2011
    • Jean Chalard's avatar
      Change the dictionary file passing schema to a list of ids · fae8d60e
      Jean Chalard authored
      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
      fae8d60e
  29. Jul 26, 2011
  30. Jul 21, 2011
    • Jean Chalard's avatar
      Set the locale for opening an asset · e150ef98
      Jean Chalard authored
      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
      e150ef98
  31. Apr 28, 2011
    • Jean Chalard's avatar
      Improve the architecture to support multiple dictionaries. · d8f52a4f
      Jean Chalard authored
      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
      d8f52a4f
  32. Apr 15, 2011
    • Jean Chalard's avatar
      Allow use of assets for data in the dictionary content provider. · 4e3bd58b
      Jean Chalard authored
      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
      4e3bd58b
Loading