Commit Graph

445 Commits (9ebba46c775f37abeb0451602cb323fd45adf33b)

Author SHA1 Message Date
Seigo Nonaka f53e034a17 Update language to comply with Android’s inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: tapas LatinIME && m
Change-Id: I2ffb39ff70f61e579b62761d3da526a545dead1f
2020-07-22 14:08:35 -07:00
Yohei Yukawa 7a2459ca13 Merge java-overridable/ into java/ again
This CL a logical revert of a previous CL [1], which separated Java
files into common ones and overridable ones.  Now that that overriding
concept is no longer used, there is no need to keep having separate
directory structure.

 [1]: Ic734bd4d20aa050c688a3158b1a382ae0ac18991
      fb74ab15c1

Fix: 79323502
Test: make -j aosp_taimen-userdebug && make -j
Test: tapas LatinIME && make -j
Change-Id: I2090bc25d18e6d4f24e91c2cbfe832755cbb4e8f
2018-05-06 20:46:17 -07:00
Mohammadinamul Sheik 604158669b [LatinIME] Support MNC permissions.
This build has been compiled against API 23

This build is approved to go out with the M OTA, but may NOT be released
to the public until the Play Store has enabled API level 23 apps

Version: 4.1.2300x.build_id

1. Replaces the personalization is on information with the suggest
   contacts.
2. Enables "Use Contacts" only if the app has permission to read
   contacts.
3. Disables the contacts dictionary in the Facilitator.
4. Do not register/read the contacts in the contact observer.

Bug: 22236416
Change-Id: I9674e13d0d0f4a2014c5024fde0178de684c07e7
2015-07-15 22:51:53 +00:00
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
Jatin Matani 8c2591eec8 Bring back shortcuts and add to dictionary UI
For JB and lower devices, the UI is surfaced by the IME.
Bug: 22200135
Change-Id: Icca08500ee0683e2ceb5357b0bc430cd1712220e
2015-07-06 17:32:13 -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
Dan Zivkovic 5a53505fe4 Log interrupted tasks in AOSP.
Bug 19987461.

Change-Id: Ia2714f555146f8f31a6d8c61f555d2b6fecdab7d
2015-04-02 14:47:36 -07:00
Chieu Nguyen 16c262abe5 Make Hebrew spellchecking spellcheck Hebrew.
Bug: 19966676
Change-Id: I657d2989966804cc1b6e3b12670a2123b6f06127
2015-03-27 14:42:27 -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
Jatin Matani cb27c4fe2e Move ManagedProfileUtils to overridable
Bug:19532354
Change-Id: I50b3ae11b6e58f07b482353b624b1a7a73eadc99
2015-03-23 11:57:48 -07:00
Chieu Nguyen 8ec36026c9 Disable message if personalization is disabled.
Bug: 19087415.
Change-Id: I3974f1b676aa4a9bb04ab7f609b6daf1860c64f1
2015-03-18 15:30:22 -07:00
Tom Ouyang 5aeb092130 Start-of-sentence should include newlines and non-period terminators.
Bug: 19795382
Change-Id: Id6cc4a494a06de03d351aa6257632bd3b82e2ec4
2015-03-17 15:18:42 -07:00
Dan Zivkovic bff393ce13 Fix NPE in AccountSettingsFragment.
Bug 19773815.

Change-Id: Ib5eb27cdf385c81d1a3822836f424fa29c0bbaa8
2015-03-16 17:08:35 -07:00
Dan Zivkovic eaa710d4aa Separate executor for the Spelling decoder.
Bug 19710676.

Change-Id: I6e66eddd507c11e424105869833fe6841b90275d
2015-03-12 17:10:38 -07:00
Dan Zivkovic 107fb4c476 Remove ALS from LatinIME.
This fixes unit tests and brings us closer to a green build.

Change-Id: Iffcc392eda4a7671a238b79cc7367320ca648725
2015-03-11 17:29:12 -07:00
Dan Zivkovic 7472cc8245 Mark method @UsedForTesting
This prevents it from being optimized away.

Change-Id: Iecd317568e23e86e4c0ece8134a4926a7a56d65b
2015-03-11 14:00:30 -07:00
Dan Zivkovic 820317f7aa Make inner classes visible for testing.
We need this to assert the correct behavior in the facilitator.

Bug 19695605.

Change-Id: I3923d00791c99208bc72f7c4210ae1ea0a34bd0e
2015-03-11 13:40:20 -07:00
Dan Zivkovic 77fd5dbf3e Remove dead code, including tests.
Change-Id: Id88b02b74bdfe4ca05b08181ceb6b34d5652fc0c
2015-03-10 17:22:41 -07:00
Dan Zivkovic 70c096d9a1 Restart background executor.
Bug 19671650.

Change-Id: I1a28a53e94bdb79aeb173f6905c1035022495acc
2015-03-10 10:03:17 -07:00
Dan Zivkovic 375035905d Kill+restart tasks before/after decoder init.
Bug 19625976.

Change-Id: I6d8b0d2b0a77ccda1bfc914501cf568b92862980
2015-03-09 18:54:48 -07:00
Dan Zivkovic bd1bc4067f ExecutorUtils lets use schedule a runnable chain.
Bug 19625976.

Change-Id: Iebbef7fed57a381498301dcf26fefa27d06802f7
2015-03-09 14:58:16 -07:00
Dan Zivkovic f9e2d271ca Use a single background executor.
Bug 19625976.

Change-Id: Ia03f440a31b059b5af42d162e1145330bf7b5ddf
2015-03-09 13:22:56 -07:00
Mohammadinamul Sheik 6e29d261cb Introduce DictionaryHeaderUtils to get dictionary header values
Change-Id: I86cef6c7f2f68a75428bb2b9c4d5a1dc1876b541
2015-03-03 16:17:27 -08:00
Jatin Matani 55d9651929 Merge "Turn off cloud sync if we have managed profiles" 2015-03-02 20:21:29 +00:00
Jatin Matani 854edce6dd Turn off cloud sync if we have managed profiles
UserManager#getUserProfiles > 1 implies managed
profile.

Workflow:
- Disable sync prefs
- Execute an async task to check for managed profile; if
  managed profile is found, remove the sync prefs. If not, enable
  the preference;
- Move the logging pref from Advanced to Account & Privacy.

Bug:19230544
Change-Id: I4dbd1fe8433b3263ccc74c35dc0ee0bb371122b3
2015-03-02 12:03:57 -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
Dan Zivkovic 7d7f082075 Stop waking up to decay dynamic dictionaries.
Bug 19516048.

Change-Id: Ibc27a792b4fa80fa8c6af4721c47a617526e9584
2015-02-25 20:13:59 -08:00
Dan Zivkovic 5551302d27 Don't assume that correctable words are invalid
Currently, the Delight3DictionaryFacilitator sets a boolean flag when the top
suggestion score exceeds the auto-correction threshold. This flag is used to
trigger auto-correction of the typed word. Also, the existing logic assumes
that if allowsToBeAutoCorrected then the word is invalid, which is no longer
true after we stopped using whitelists.

Bug 19518376.

Change-Id: Ifa7f6a09c07d25ac68c6cf3aec91f358bd88689f
2015-02-25 17:59:58 -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
Dan Zivkovic 0b03f13cab Sanitize the usage of executors.
There should be 1 executor each for static and dynamic language models.
This prevents too many dynamic LM updates from running in parallel,
competing for resources.

Change-Id: I8ec439e0ea2d92fba275bc20a0b8c9193346a0c1
2015-02-19 11:40:57 -08:00
Mohammadinamul Sheik 95711bfcee Add Decoder specific dictionary suffix to resource lookup
Change-Id: Ia2c74acdc8ac6f7b605bb06a1078d23b32f388a1
2015-02-12 19:56:46 -08:00
Dan Zivkovic cf84f8ce0c Switch from script to language codes.
Unfortunately, our Locale objects don't always have a script code.
But we can get almost the same functionality by specifying script
codes for some languages, and defaulting the rest to Latin.

Change-Id: Id81ff67bf44c84f44707a2e167c2787c60c6ecee
2015-02-12 15:42:25 -08:00
Dan Zivkovic 98596e51a1 Map ISO 15924 codes to internal IME script codes.
This way we can support all the languages for which we define a script code.

Bug 19340741.

Change-Id: Ia80eca4cc2511b70f11058f73bd31746948ded19
2015-02-12 11:00:06 -08:00
Jatin Matani 4084fa5cae Refactor content provider code from ContactsDict
Break contacts binary dictionary into two parts
- one that talks to contacts content provider and maintains
  local state. Includes a manager class and a content observer
- other one that just manages the dict code.

Change-Id: Ie8f89ac9ce174c803ff3168ee0bee5cbe7721d5b
2015-02-11 16:29:14 -08:00
Dan Zivkovic 12d80ebead Remove shortcut support from LatinIME.
Note this change does not affect the native decoder interface.

Change-Id: I73b7dc008a5acaf75a31a36a2d332b5afabd82d0
2015-02-11 13:02:41 -08:00
Dan Zivkovic 644a709a5f Remove distracter filter from client.
Bug 19296201.

Change-Id: Ic834e5956347cd86a96bd14024c42ad8ee258659
2015-02-09 11:52:12 -08:00
Mohammadinamul Sheik aadfef6ffa Merge "Move decoder specific constants to DecoderSpecificConstants.java" 2015-02-06 22:46:08 +00:00
Dan Zivkovic d6a8adcb04 Cleanup in preparation of distracter change.
Bug 19296201.

Change-Id: If016da2b7f4b3ecb9afd6d7aed9d19fbd4938758
2015-02-06 14:25:37 -08:00
Mohammadinamul Sheik 0f7d881dc7 Move decoder specific constants to DecoderSpecificConstants.java
Change-Id: Ie4d325b3152e1e7e424b8b436e222e194e4d9da0
2015-02-05 13:27:36 -08:00
Dan Zivkovic c0eb57124f Don't check user dictionary, except for spelling.
We check different lists of dictionaries based on the use case.

Bug 19270992.

Change-Id: Ide69f2855978ebad32a58e9689b3a8d47e095994
2015-02-04 18:23:38 -08:00
Mohammadinamul Sheik b00c054125 AOSP changes to use KeyboardLayout to support the new DictionaryFacilitator
Change-Id: Ie0c9ce805d9ad009fc9bbaac37b715aff90cd844
2015-02-04 12:50:31 -08:00
Dan Zivkovic 23574d1231 LatinIME portion of "green plus" feature.
Removes the feature that adds strings to the user dictionary,
aka the "green highlight with a plus sign".

Bug 19237189.

Change-Id: I2387129a3add2d69d625f2ff16ed8cab3f10a735
2015-02-03 15:12:01 -08:00
Dan Zivkovic 77e0fa1d67 LatinIME portion of multi-lang option removal.
Bug 19188067.

Change-Id: Ic9a3637f59dda30c699141222b9dcac3cd624b99
2015-01-29 15:57:03 -08:00
Tadashi G. Takaoka 4934a88b61 Make LanguageOnSpacebarHelper as utility class
Change-Id: I546f3b1943999a41803222bd14f9ddd23aa87a51
2014-12-11 14:22:21 +09:00
Tadashi G. Takaoka 2b25f674f2 Add NetworkConnectivityUtils class
Change-Id: I7bd71f1d4ef0fc0fe21ddfd9f3e11463f53ac4e7
2014-12-11 01:37:44 +00:00
Keisuke Kuroyanagi 515c508135 Quit auto-correct explicit accented letters to base letters.
Bug: 7677193
Change-Id: I66eddbf27a9db8682c0347a1be19922792a3bea7
2014-12-09 19:23:27 +09:00