Commit Graph

25 Commits (ccfef1083a860ae4cce0ce59b6fcaa20db3fdbf5)

Author SHA1 Message Date
Jeff Sharkey 1d9bf42009 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Change-Id: I171bc299e660f96f20041a67a3052bd8a2ed781c
2020-07-31 09:33:35 -06:00
Brett Chabot c05a70a4ca Migrate packages/inputmethods/LatinIME to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I63edeced1465725cd8d6467cd75ea1acc2608932
2018-12-13 19:06:42 -08:00
Yohei Yukawa d3b93cc950 Migrate to Android Testing Support Lib (part 5/N)
This CL converts 19 test classes under com.android.inputmethod.latin
to Android Testing Support Library.

Bug: 110805255
Test: verified as follows. No new test failures.
        tapas adb LatinIME LatinIMETests arm64 userdebug && \
        DISABLE_PROGUARD=true make -j LatinIME && \
        adb install -r $OUT/system/app/LatinIME/LatinIME.apk && \
        atest LatinIMETests:com.android.inputmethod.latin
Change-Id: I878fcae0126f57c43a644af341e5a0a8ac8f5cc9
2018-07-06 10:10:54 -07:00
Mohammadinamul Sheik ab59129594 Add prev words context to the SuggestedWordInfo.
Bug: 19712589
Bug: 19715579
Change-Id: Ie06665cab8405455c1b0a2ff034e0bb0731c9156
2015-03-19 16:07:04 -07: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
Jean Chalard a2cb2f36a6 Make the typed word a SuggestedWordInfo
That allows to carry the language information in an
accurate manner.

Bug: 18063142
Change-Id: I0bca8981372ae10648274095b18b26a3686b762b
2014-11-20 13:57:01 +09:00
Jean Chalard 83f9524b87 Remove the other deprecated constructor to SuggestedWords
Change-Id: Ied821df01e032ebc913d2f15dffdf41a51372ea4
2014-11-17 16:23:52 +09:00
Tadashi G. Takaoka 5f00fe09e9 Fix some compiler warnings
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
2014-10-21 19:28:37 +09:00
Jean Chalard bc18005948 Always show the typed word in recorrections.
Bug: 11330140
Bug: 17875601
Bug: 17623275
Change-Id: Ie4620f36f312c54c7b01b5f6cbdb0bc9171b6179
2014-10-09 17:54:58 +09:00
Adrian Velicu 30f4a2a4d7 Hiding SuggestedWords.EMPTY and refactoring code that compares SuggestedWords instances directly to it to use isEmpty instead
Bug: 17560717
Change-Id: I7032bf0ab46f9cf5e3b3312a14e689b5496764c1
2014-09-22 14:50:21 +09:00
Jean Chalard 4e28a6a844 Fix an IOOB exception
Bug: 17316001
Change-Id: Iaa2cfd30ebbe0d49e10a5c3a30336e06817d0a8b
2014-08-29 06:56:34 +00:00
Jean Chalard 8380f921f7 Fix a bug where the top prediction would disappear.
This is because prediction can't be easily distinguished in
style. This fixes the bug by simulating the right members,
but some refactoring should be done to remove useless
booleans.

Bug: 17271923
Change-Id: Ib88f3fb95678021624e59535492926dd315d26fb
2014-08-26 20:35:59 +09:00
Yohei Yukawa cd6ef9a8b1 Indroduce SuggestedWords#getTypedWordInfoOrNull
This is a groundwork for subsequent CLs whith need to
do certain things for and only for the typed word.

Change-Id: I374b79cbc79470f57f523c996010301ea5701a61
2014-08-24 16:32:17 -07:00
Jean Chalard b8d764772b Add the input style to SuggestedWords.
Change-Id: I81f37d08659d449822b027d3d5912e11eec8b8ff
2014-08-14 17:53:04 +09:00
Keisuke Kuroyanagi 4bffac6db9 Stop directly checking SuggestedWordInfo.mKind
Bug: 15298959

Change-Id: Iba6eeb7981634e7ddb896404978b30f6efd6e72f
2014-05-28 20:35:45 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Tadashi G. Takaoka a273319c59 Add PunctuationSuggestions class
This change must be checked in together with I366c477516.

Bug: 12640318
Change-Id: I8d3864b9d9649c9e3306e82b01a6327b11281b1f
2014-02-14 14:13:39 +09:00
Jean Chalard a49f61f8a7 Conditionally store the raw suggestions.
Bug: 12913520
Change-Id: Ie15f97d90c142c51089280252b35b5ad1d226e19
2014-02-06 16:14:41 +09:00
Jean Chalard c6a121805f Fix a bug where autocaps would jam auto-commit
Bug: 11311002
Change-Id: I62955e364c9ffc75322cf05fa3ad7985f1d09259
2013-10-22 12:39:49 +09:00
Jean Chalard e8f717943f Improve trailing quotes processing
Bug: 10445496
Change-Id: Ib7bd05aea59ae6c9b8ce31299ef2235521b0e350
2013-09-17 22:17:22 +09:00
Jean Chalard 24aad5a4d5 [AC4] Add native methods necessary for auto-commit
Bug: 9059617
Change-Id: I7a47b0675446fc4f39628c60d16de9aea90d1b4d
2013-09-13 20:15:15 +09:00
Jean Chalard e8ef095670 [AC2] Reference a dict rather than a string in suggestion infos
Bug: 9059617
Change-Id: Ic17bc0fd5d812268fd37d7fd35b4e9ebfb95fa5e
2013-08-20 19:18:09 +09:00
Jean Chalard ef1e363016 [AC1] Add a memory of where to cut the first word.
Bug: 9059617
Change-Id: I931b6d1eb49f9f7dd7d5b18956e35751d1b2b631
2013-08-20 18:43:19 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Jean Chalard 0e9ee4d3bf If there are no suggestion span, recompute suggestions.
Bug: 8084810
Change-Id: I1743c09c43ca6835bb2f607684b037bf17d36335
2013-04-15 19:33:23 +09:00