aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused method for dictionarypackWilson Wu2022-02-231-54/+0
| | | | | | | | | Remove the showDictionaryAvailableNotification method since there is no module use it. Bug: 209479751 Test: presubmit Change-Id: I4c88b4a2d0cb36761d9102ce35260f93303625d9
* Revert "Close FileChannels in UpdateHandler#copyFile."Yohei Yukawa2016-03-031-10/+2
| | | | | | | | | | | | | | This reverts commit 3e2670265e17e91c5a8cfff01711f973dccd2a0c. It turns out that the behavior change in libcore was unintentional, and it was already fixed [1]. Let's revert our workaround back to see if the existing code is compatible with N. [1]: Ibacb192abc37870c74a2500d65b94d68f9c2318e 5e7b572c2b494ab86ddd2baca3883a40a6064c1e Bug: 26239281 Change-Id: I6cd2340492d93251231e7ee37c3d4f82c1721293
* Close FileChannels in UpdateHandler#copyFile.Keisuke Kuroyanagi2016-02-241-2/+10
| | | | | Bug: 26239281 Change-Id: Ib30beb3548f8fb4a8e338b5da863ae28c252bc2b
* Don't show download toast during SUWRussell Brenner2015-08-251-6/+16
| | | | | | | | | | | Check to see if setup wizard is running before showing toast to inform user that a download was started. Note that this will only affect the device owner; when adding new users later, the toast will still appear. (The USER_SETUP_COMPLETE flag is hidden from the SDK, while DEVICE_PROVISIONED remains available.) Bug: 22594336 Change-Id: I57c42d6f821714b71cbb066e82bba2a1dbab4951
* Don't prompt before downloading.Dan Zivkovic2015-06-251-21/+8
| | | | | | | | We don't pay attention to the answer, so don't ask. Bug 22069694. Change-Id: Ic048d5570e68fbc9438c6577e27e6c7f68428606
* Add some more logging. Why not.Dan Zivkovic2015-06-241-2/+5
| | | | Change-Id: I536212e1b3c35d75ed93f9ab3762908e3deb9a97
* Load metadata.json from resources on DB reset.Dan Zivkovic2015-06-241-7/+10
| | | | | | | | | | | 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
* Do not restrict downloads to WiFi networks.Dan Zivkovic2015-06-171-41/+12
| | | | | | Bug 21900337. Change-Id: I82991b492ea4c02a28a1ccc898d6f12741f1b793
* Hide Notification when downloading the keyboard metadataMohammadinamul Sheik2015-06-151-5/+2
| | | | | Bug: 21797386 Change-Id: Iebe9d2f18c5c8325a5601d49d8c4c65166b67036
* Make the DictionaryService stage the downloaded filesMohammadinamul Sheik2015-05-041-0/+2
| | | | | Bug: 20641948 Change-Id: I6639c995b12c033bc30241cd219201dd483ee516
* Do not re-download the unused dictionaries.Mohammadinamul Sheik2015-04-151-1/+3
| | | | | | | | | | | 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
* Do not throw NPE if the dictionary info is not available on dbMohammadinamul Sheik2015-04-021-0/+3
| | | | | Bug: 20035793 Change-Id: Idc13af405eab5457954a93db3dddcd81f6eb6435
* Force download the dictionaries after the apk package is updated.Mohammadinamul Sheik2015-03-241-6/+19
| | | | | | | | - Also display the notification when the dictionaries are auto updated Bug: 19808828 Change-Id: If5c4efb73d8bb554d812afcf7deafec3ac40a462
* Make LocaleUtils.constructLocaleFromString as @NonnullTadashi G. Takaoka2014-11-211-3/+2
| | | | Change-Id: I82d574c67b25239510f3ecc8882efe46e40677eb
* UpdateHandler to support v202 dicts.Adrian Velicu2014-11-121-1/+3
| | | | Change-Id: Ib61a5005a82927f5e12a19c9c14f20d46572cf31
* Move util classes under commonJean Chalard2014-11-071-0/+1
| | | | | | | Also why did we have two copies of LocaleUtils >.> Bug: 18108776 Change-Id: I03b4403dfd51934e66b567f2f8b87da419cfb3ab
* Fix some compiler warningsTadashi G. Takaoka2014-10-211-7/+12
| | | | | | | | | | | | | | | | | | | | | This CL fixes the following compiler warnings. - Indirect access to static member - Access to a non-accessible member of an enclosing type - Parameter assignment - Method can be static - Local variable declaration hides another field or variable - Value of local variable is not used - Unused import - Unused private member - Unnecessary 'else' statement - Unnecessary declaration of throw exception - Redundant type arguments - Missing '@Override' annotation - Unused '@SuppressWarning' annotations Bug: 18003991 Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
* Avoid downloading the metadata in quick succession.Jean Chalard2014-10-011-11/+24
| | | | | | | Bug: 17668298 Bug: 8651816 Bug: 17709442 Change-Id: Ib232f9d95d7c01a028be85d10f974a5a570c0ed5
* Attempt retry for broken dictionariesJatin Matani2014-09-031-37/+55
| | | | | | | | | 1. Add retry count column within metadata in dictionary pack. 2. Attempt a retry for download and installation by running StartDownloadAction. 3. If the number retrial are at the threshold, we don't attempt it again. Bug: 15150487 Change-Id: I70720353e5803fccf4728c2aa798883ba75c61e5
* Add new attributes to our notificationJean Chalard2014-08-281-3/+10
| | | | | | Bug: 17167221 Bug: 17128331 Change-Id: I6a045fd2398f40dbdc10c9d20993f7513e1f2cff
* Use Java 7 diamond operatorTadashi G. Takaoka2014-05-241-5/+5
| | | | Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
* Catch exceptions we can't do anything about.Jean Chalard2014-02-171-20/+12
| | | | | | | | This also abstracts away the "package deactivated" case for simpler and safer code. Bug: 11072561 Change-Id: Idaaf2ae8d8d5b2c4a15de641bbf2f8c5c7cc9410
* Fix a wrong call to cancel downloadsJean Chalard2013-07-111-12/+12
| | | | | | | This resulted in downloads not being correctly canceled. Bug: 9715797 Change-Id: I786d869977df225f85cb69ec7ea9c96b039258fe
* Reorganize Utils classTadashi G. Takaoka2013-07-051-2/+2
| | | | Change-Id: I7294d1547def5dcfcae9d1d53b277cb3cc9f2d18
* Fix a bug where no URL means refresh never endsJean Chalard2013-07-011-3/+7
| | | | | | | | | | | This patch does two things: - If there is no URL to download new data from, then the Refresh button is not shown. - Even if for some reason refresh starts for a client for which there is no URL, loading correctly finishes. Bug: 9388602 Change-Id: I3fd9214da50faa4b59d0bd3e775293dd34f07547
* Cleanup under the utils packageKen Wakasa2013-06-251-24/+24
| | | | Change-Id: If2f7bd1346cc5085bf57645830f0faac44d017e4
* Move util classes to the latin/utils directoryKen Wakasa2013-06-241-24/+26
| | | | Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
* Work around a bug in older DownloadManager versions.Jean Chalard2013-04-251-2/+13
| | | | | | | | | | | | | This adds a number to the extension. Note that for DownloadManager to keep this, the server needs to send it a mime type it does not recognize. Right now, it does not recognize application/json so it's okay, but we'd do well to remove the content/type header from the server to prevent problems. Bug: 8467516 Change-Id: Ic484f66ac3f67c36f59f2c0bcb8c7fdeb6e8590d
* Hide the correct button when pressing a new button.Jean Chalard2013-04-191-7/+7
| | | | | Bug: 7600384 Change-Id: Ic5dbbbbcf19d778dde1316ebb417f1a8ede2d25d
* Fix an infinite loopJean Chalard2013-04-181-1/+0
| | | | | | | | | What do you mean "Can't happen"? It happens all the time - the empty string is the default ID, and it needs to be updated like everyone else. Bug: 8651858 Change-Id: I5a2f2ebb5b2ef08b27f26be8fb2c3d2f231ebcfc
* Ask the client to make itself known when it's notJean Chalard2013-04-011-1/+13
| | | | | | | | | | Upon invoking the settings of the dictionary pack with an unknown client, we now launch an intent to ask the client to make itself known. This change also includes the code that receives this intent and acts upon it. Bug: 8492879 Change-Id: I2c6496dea845646961ecafcf64e282cb93ee91dc
* Break dependencies to allow offdevice tests to buildJean Chalard2013-03-191-9/+2
| | | | Change-Id: Ia9a2e8f0672b3f72943f26fb15de1d3c7c5ce7f1
* Merge the dictionary pack in Latin IME.Jean Chalard2013-03-191-0/+1088
Bug: 8161354 Change-Id: I17c23f56dd3bc2f27726556bf2c5a9d5520bd172