Commit Graph

31 Commits (9ebba46c775f37abeb0451602cb323fd45adf33b)

Author SHA1 Message Date
Jatin Matani d711426a87 Remove android.util.Log from FileUtils
FileUtils is being used for other non android projects
and hence breaks when built. Instead use the log statements
at caller to record Log.e messages. Hence there is no side
effect here.

Bug:22042371
Change-Id: Ieb100006ff38e013bc30542637465f58bfc0f2f2
2015-07-09 11:50:10 -07:00
Dan Zivkovic 3aad142435 Load metadata.json from resources on DB reset.
This will ensure that a new (or upgraded) keyboard instance will know which
dictionaries are available for download so it requests missing dictionaries.
In addition, we increment the database version number to ensure upgrades of
existing Fava instances start with a clean slate.

Bug 22069694.

Change-Id: Id71310412682543a3931f9c5c03cb0369fa7b9ac
2015-06-24 18:40:34 -07:00
Mohammadinamul Sheik a0d9c82921 Make the DictionaryService stage the downloaded files
Bug: 20641948
Change-Id: I6639c995b12c033bc30241cd219201dd483ee516
2015-05-04 11:57:31 -07:00
Mohammadinamul Sheik 3a5de64110 Do not re-download the unused dictionaries.
Does the following
1. Uses dictionaries from the files/ directory while populating the
   entries into the pendingUpdates table. So that a download happens only
   if the metadata.json says so.
2. Delete an unusable dictionaries from the files/ directory.

Bug: 20142708
Change-Id: Ibd738793585c39735868e324b8ad682dff0eba34
2015-04-15 11:12:40 -07:00
Mohammadinamul Sheik 8f526c9a55 Use the complete Locale in generating the dictionary id.
- Also deleted a couple of dead methods.

Bug:19929051
Change-Id: I4f88dbc2a8204d5e2a20d1ad8c205a23c6319f8d
2015-03-25 16:45:56 -07:00
Mohammadinamul Sheik 3bc3bc7971 Force download the dictionaries after the apk package is updated.
- Also display the notification when the dictionaries are auto updated


Bug: 19808828
Change-Id: If5c4efb73d8bb554d812afcf7deafec3ac40a462
2015-03-24 14:56:54 -07:00
Mohammadinamul Sheik 6e29d261cb Introduce DictionaryHeaderUtils to get dictionary header values
Change-Id: I86cef6c7f2f68a75428bb2b9c4d5a1dc1876b541
2015-03-03 16:17:27 -08:00
Mohammadinamul Sheik 377ba98b75 Update the MAX supported file version for downloaded static Dictionaries.
Change-Id: I72d37cc21585b18f4a41ff32627024502f10e993
2015-02-27 10:30:23 -08:00
Mohammadinamul Sheik 24c282437d Do not crash when dictioanryInfo is NULL
Bug: 19417599
Change-Id: I82174401c595b57b42fc74bc478b551869729ba6
2015-02-24 15:45:10 -08:00
Mohammadinamul Sheik 1d5ec6136c Use DECODER_DICT_SUFFIX on fallback to the default main dict resource.
Change-Id: Icec45c364732c0aa9ac713846cad23439b9e42b5
2015-02-23 17:25:08 -08:00
Mohammadinamul Sheik 95711bfcee Add Decoder specific dictionary suffix to resource lookup
Change-Id: Ia2c74acdc8ac6f7b605bb06a1078d23b32f388a1
2015-02-12 19:56:46 -08:00
Mohammadinamul Sheik 0f7d881dc7 Move decoder specific constants to DecoderSpecificConstants.java
Change-Id: Ie4d325b3152e1e7e424b8b436e222e194e4d9da0
2015-02-05 13:27:36 -08:00
Tadashi G. Takaoka 063b2e8d71 Merge "Make LocaleUtils.constructLocaleFromString as @Nonnull" 2014-11-28 03:02:20 +00:00
Tadashi G. Takaoka a414b81a6c Remove unused code from DictionaryFactory
Change-Id: I666308ada968ee7993235ad98b92f2ad522af122
2014-11-21 17:58:50 +09:00
Tadashi G. Takaoka ebe5b42f71 Make LocaleUtils.constructLocaleFromString as @Nonnull
Change-Id: I82d574c67b25239510f3ecc8882efe46e40677eb
2014-11-21 12:02:06 +09:00
Jean Chalard 5b91b551e5 Move util classes under common
Also why did we have two copies of LocaleUtils >.>

Bug: 18108776
Change-Id: I03b4403dfd51934e66b567f2f8b87da419cfb3ab
2014-11-07 18:00:03 +09:00
Ken Wakasa 9342484e8d Move Constants.java to the latin.common package
Our intention is to have classes of latinime-common under the common
package as much as we can.

Change-Id: I76efbbbe7bebf1a4aa943715cdff64f91675e20d
2014-10-23 20:27:37 +09:00
Jean Chalard f13487dfbf [ML25] Add an hasDict method.
We used to have separate methods for existence of dicts
according to whether it's a file or a resource. This unifies both.

Bug: 11230254
Bug: 17979623
Change-Id: I728773461f3465f756d06297c3f3bee34390c3e6
2014-10-16 17:09:27 +09:00
Adrian Velicu 8c889784e2 Added @UsedForTesting to 'missing' methods to avoid ProGuard removing them
Bug: 16864527
Change-Id: I698a1b3e09e7e9a12722169b37f87bd51c8cbd34
2014-09-19 14:31:33 +09:00
Keisuke Kuroyanagi d9a8f2a82f Allow adding DICTIONARY_MAX_WORD_LENGTH-length words.
Bug: 12725817
Change-Id: Ib9b30473ba94242a7b97ccd3b850068f596a5d17
2014-07-28 21:48:02 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Keisuke Kuroyanagi 93cda5bb39 Move code only used for dicttool and tests under tests.
Bug: 13035567
Change-Id: I13c6df013ef2b67c9bf67455d9c32d283bf9ea2e
2014-03-27 15:30:32 +09:00
Keisuke Kuroyanagi de36b47d29 Use BinaryDictionaryUtils to read dictionary header.
Bug: 8187060
Bug:13035567
Change-Id: I90a5e0665c367f5a1bd786f4babf0d03e79e68fa
2014-03-05 19:42:53 +09:00
Keisuke Kuroyanagi b986f78ba8 Separate header class from FormatSpec.
Bug: 12810574
Change-Id: Iacf1cd05a268bf690ab864b5e32a18a4b0ccc693
2014-02-04 21:36:04 +09:00
Keisuke Kuroyanagi b7197b705b Check length of words for personalization dict.
Bug: 12602903

Change-Id: I1ea4e558b6d2fde425ce28226647ad60095e3488
2014-01-24 16:32:28 -08:00
Jean Chalard 84a3047e80 Fix build.
Change-Id: I6d0b572190080e58e95f72856ad39e72a49537b7
2014-01-10 12:18:26 +09:00
Keisuke Kuroyanagi 8214a8c2cf Fix possible NPE.
Bug: 11933670
Change-Id: Ib0ce853e691bdadffb73874ea9f188cfbec8bc93
2014-01-06 17:56:49 +09:00
Yuichiro Hanada 2232a70806 Clean up unused imports.
Change-Id: I7147ca237b99399e79210852aa5bf5a01101d779
2013-08-26 08:29:16 +00:00
Yuichiro Hanada 8f4d5d5f23 Fix getDictionaryFileHeader.
Change-Id: I5186f41b0f38eb08f4154f7b3de7ffc2119fc44b
2013-08-23 22:39:36 +09:00
Tadashi G. Takaoka 72c2feb573 Use TimeUnit instead of DateUtils for readability
Bug: 9550800
Change-Id: I087205530a5dbcff4bf08f48f4aa7068aae93215
2013-07-05 17:57:01 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00