aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android (follow)
Commit message (Collapse)AuthorAgeFilesLines
* If there are no suggestion span, recompute suggestions.Jean Chalard2013-04-151-0/+60
| | | | | Bug: 8084810 Change-Id: I1743c09c43ca6835bb2f607684b037bf17d36335
* Clean up tests and increase speedJean Chalard2013-04-151-5/+6
| | | | | | | | Conservatively reduce the number of unigrams to test from 1000 to 100. Bug: 8583091 Change-Id: I48621ec44ff5f0590640d7c6b174ab5a6d267aaf
* Fix a typoJean Chalard2013-04-151-1/+1
| | | | Change-Id: I27b925be030e9e6ee8ae49dc13f39accec996d7e
* Merge "Fix Binary dict tests"Jean Chalard2013-04-151-1/+4
|\
| * Fix Binary dict testsJean Chalard2013-04-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two problems here. The first one is the tests would send an invalid unicode character. Although we could want dicttool to handle this more gracefully, it's fine for now. The second problem is much more serious. If a node has more than 128 children, then the java code will crash trying to read the dictionary back because of a bug that this change fixes. In theory, it's possible that happens when we try to load the user history dictionary back from the disk - native code is not affected so there is no other point that may cause a problem. In the practice, that means you'd need to have 129 words with a common prefix (including empty string) but all different after this. It's almost impossible with Google Keyboard since there are only so many keys on the keyboard that you can make a word out of, and then again you'd have to do it repeatedly until it actually enters the user history dictionary, wait for it to get saved on the disk. The bad news is, if you manage to get this far, the keyboard will crash every time and won't be able to get up until you clear data for the package. The good news is, the dictionary itself is not corrupted and only the reading code is wrong. So updating to a newer version would actually even recover from this situation. All in all, considering how almost-impossible this is to trigger, I don't think even a single user actually did hit this bug. Bug: 8583091 Change-Id: Iabb2a7f47cbd9ed3193d2a3487318d280753e071
* | Tighten unit test condition of MoreKeysKeyboardBuilderTadashi G. Takaoka2013-04-152-8/+8
| | | | | | | | | | Bug: 8601979 Change-Id: Icf584f3b35adce69cc3dfc46f3aacfef05e5dd2a
* | Fix failing testsJean Chalard2013-04-121-7/+8
|/ | | | | | | | RichInputConnection#getWordRangeAtCursor may now returning either a SpannableString or a String. We can't test that with String#equals(), but TextUtils#equals() does the job for us. Change-Id: I59ebe54207e92f4d90b49476b64f1e12fd4929cb
* Remove voodoo magic.Jean Chalard2013-04-121-32/+9
| | | | | | | There was a much, much simpler way of achieving the same thing. Bug: 8583091 Change-Id: I8882f389312caad3b17335672892a31d30cd00bc
* Add some utility functions.Jean Chalard2013-04-111-0/+79
| | | | | Bug: 7657025 Change-Id: I4889721b5348c77ed56c5157557e9988dea48a02
* Fix a faulty testJean Chalard2013-04-101-1/+1
| | | | Change-Id: I5c03cea41e9b6e936e8f93b7d756f0fc9520002d
* Fix a bug where autocorrection status would be wrong.Jean Chalard2013-04-102-10/+30
| | | | Change-Id: Ic220129dc59f585164dbf63591cd1c96de17fe6f
* Separate StringUtils.capitalizeFirstCharacterTadashi G. Takaoka2013-04-102-4/+3
| | | | | Bug: 8582061 Change-Id: Iac8f65defdd92d7df533bdf0e2937ad897d96363
* Merge "Offer to add any OOV typed word to the dictionary."Jean Chalard2013-04-091-1/+3
|\
| * Offer to add any OOV typed word to the dictionary.Jean Chalard2013-04-091-1/+3
| | | | | | | | | | | | | | That includes gestures, which used not to work. Bug: 8532637 Change-Id: I04606565d7000faadf954c4a806c39d4d162a2c1
* | Fix bugs and add testsJean Chalard2013-04-051-0/+46
|/ | | | Change-Id: I6b56b91ace57f4a49584b5dceb71b145859f839e
* Change which backdoor the tests goes throughJean Chalard2013-04-021-8/+12
| | | | | | | | Yes that's even harder to understand. The old technique doesn't work any more, so I have to drill a new hole in this class. Bug: 8303100 Change-Id: I70a41b5094dab2bb56a17eaf55b2a2df853e4bb6
* Fix a test.Jean Chalard2013-04-021-3/+3
| | | | | | | | | | | | | | The test was not passing the correct input type when it was creating the text view, resulting in mismatched types seen from TextView and LatinIME with some bad results. The test would even go as far as restoring it after it's been fixed by TextView. Additionally, since we want to enter litteral carriage returns, the input type should be MULTI_LINE. If not, TextView does not allow carriage returns. Bug: 8302690 Change-Id: I1c20bcf6ca554ad981048ec181e19c649f6c742e
* Interpolate gesture preview trailsTadashi G. Takaoka2013-04-011-0/+203
| | | | | | | There is the boolean flag to kill interpolation. Bug: 7167303 Change-Id: Iac7e4cb88cf437c2ee77c003c9cddb92416025c7
* Fix two nasty bugs with surrogate pairs.Jean Chalard2013-04-011-14/+14
| | | | | | | | | | | | | | | | The important bug is in findWordInTree. The problem, which is not obvious, is that we were calling codePointAt() with the code point index in the string, instead of the char index. The other bug this change fixes was harmless in the practice, because it's in the iteration which is only used for debug and pretty printing purposes. It's very similar in that it would substract a length in code point to a length in chars and truncate a StringBuilder at that length, so it would fail in a quite similar manner. This changes the meaning of the "length" attribute in Position, but it's clearer this way anyway. Bug: 8450145 Change-Id: If396f883a9e6449de39351553ba83f5be5bd30f0
* Remove reference to string.english_ime_nameTadashi G. Takaoka2013-03-221-3/+5
| | | | | Bug: 6789579 Change-Id: I062c076f0ca16cc39274e20955aa83d667b7380d
* Separate suggestions from SuggestionViewJean Chalard2013-02-281-9/+16
| | | | | | | This is a cleanup change, but it's also necessary for Bug: 8152758 Change-Id: Id6ba06243f573fdb856f87d1df03277c9f2e5e71
* Fix failed unit test due to resource string changeTadashi G. Takaoka2013-02-261-3/+3
| | | | Change-Id: Ie7acdf6895a9769eb43ea8a1c70c0d13b32ed349
* Merge "Separate caps mode related utils to CapsModeUtils"Tadashi G. Takaoka2013-02-1224-250/+273
|\
| * Separate caps mode related utils to CapsModeUtilsTadashi G. Takaoka2013-02-1224-250/+273
| | | | | | | | Change-Id: I32700c434b296bb3fd39e040c2dda1fe90667daf
* | Merge "Move parseCsvString to StringUtils"Tadashi G. Takaoka2013-02-121-1/+3
|\|
| * Move parseCsvString to StringUtilsTadashi G. Takaoka2013-02-121-1/+3
| | | | | | | | Change-Id: I602f33991ca57b6057ec2defe01573552b322857
* | CleanupsJean Chalard2013-02-112-16/+16
|/ | | | | | Follow-up to Idc6f419a Change-Id: I4aae8f4e19f27a0a309879dc19af6e40906d58c5
* Fix a testJean Chalard2013-02-061-1/+1
| | | | | | | | The test is wrong - it checks a struct that contains a string instead of checking the string itself. Bug: 8149360 Change-Id: Ifb93d61f25a64a64e1c1e689de792f27994487b6
* Add unit tests tagsTadashi G. Takaoka2013-02-0427-27/+70
| | | | | Bug: 8131968 Change-Id: Ibca5a0d63a492134b8af401a62ca3a5748e003cf
* [Rlog48c] Replay historical motion dataKurt Partridge2013-02-041-0/+169
| | | | Change-Id: Ib398ea61ff048b1a4ac3b7f7b4a772e173a7b294
* Add a way to know externally if we're installing a new dictJean Chalard2013-01-311-2/+2
| | | | | | | | That helps tests know when to wait and when to declare the dictionary actually not usable. Bug: 7925814 Change-Id: Ic963c1206c43e3cde39ac4214a0d601f4fc6c03b
* Remove keyboard layout description on the spacebarTadashi G. Takaoka2013-01-281-80/+117
| | | | | Bug: 8056376 Change-Id: I33f07e7a044c2b5fc20de40c7a9777dab493e41c
* Display custom input style name in system localeTadashi G. Takaoka2013-01-241-13/+165
| | | | | Bug: 8032166 Change-Id: Ib9a6b63c4d540ce377892fb865e53abdd8adec16
* Refactor SubtypeLocale to hold ResourcesTadashi G. Takaoka2013-01-232-88/+73
| | | | Change-Id: Ia667bc2d406d66c87215dd3b9569f36f4642cfe0
* Remove automatic switch back to alphabet featureTadashi G. Takaoka2013-01-183-88/+31
| | | | Change-Id: I4600c808f2ec31c18d3698a43afa7f4be9407e3e
* Fix international testsJean Chalard2013-01-102-30/+1
| | | | | | | | | | | Tests have been broken again by recent changes to subtype choice within Latin IME. This fixes the problem and all tests pass again. This change also includes a small fix to one test that was checking for something irrelevant. Change-Id: I6a03dea24f99b0d2ad84c4161a8413f3060bb811
* Fix a race condition with backspacesJean Chalard2013-01-091-0/+21
| | | | | | | And add a test to make sure it stays not-broken. Bug: 7946604 Change-Id: I996da3d5507d591ec25a13fb57434f39843f1df5
* Simplify singleton class initializationTadashi G. Takaoka2013-01-072-6/+2
| | | | Change-Id: I16a27f2ed6ea66184bfdc9903180372cd7ea2fd1
* Get rid of current subtype and system locale cache from SubtypeSwitcherTadashi G. Takaoka2012-12-271-1/+1
| | | | | Bug: 7675452 Change-Id: I2121f56964b6d25e8d40f5b8ec67eeae527b2117
* Set additional subtypes before getting current subtypeTadashi G. Takaoka2012-11-282-2/+6
| | | | | Bug: 7594188 Change-Id: I1977acb7189f8eb186b9b20a3e5b64b4aaabf191
* am 7ba02315: am b172725c: am 7d045829: Request update shift state after ↵Tadashi G. Takaoka2012-11-271-5/+21
|\ | | | | | | | | | | | | shift-chording input * commit '7ba02315abf3f6fe2e40fcb248ccf1cab8dee179': Request update shift state after shift-chording input
| * Request update shift state after shift-chording inputTadashi G. Takaoka2012-11-211-5/+21
| | | | | | | | | | Bug: 7529860 Change-Id: Iec82459348722be358ae2ded15deafac21749dcd
* | Cancel gesture typing by sliding out from keyboardTadashi G. Takaoka2012-11-221-0/+3
| | | | | | | | | | Bug: 7594165 Change-Id: I7849d763e49b57716e8418fb8b6f90eca3a5d2ec
* | am 82cc7349: am b9385ff9: am cdbf6fb5: Merge "Correctly add double quote to ↵Jean Chalard2012-11-201-0/+16
|\| | | | | | | | | | | | | the space strippers" into jb-mr1.1-dev * commit '82cc7349254e1ca3722ead1f108b6c53820432d5': Correctly add double quote to the space strippers
| * Correctly add double quote to the space strippersJean Chalard2012-11-191-0/+16
| | | | | | | | | | | | | | | | ...without removing space, this time. Also add a test to make sure it is working. Bug: 7531719 Change-Id: I3afcc433c6cdc2774e7deeb6d358356db5035d35
* | Add Spanish United States keyboardTadashi G. Takaoka2012-11-191-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The subtype locale name on the spacebar will be suppressed when only one subtype is enabled and - Subtype locale is equal to the system locale. or - Subtype language is equal to the system language but the subtype is implicitly enabled. Thus the "es_ES" system locale chooses "es" subtype keyboard implicitly but the keyboard doesn't have the subtype name on its spacebar. This change also removes Spanish Latin America keyboard. Bug: 7531804 Change-Id: Ib929e8235d643c0ba039eb010e18ab721a734e15
* | Enhance ImfUtils to InputMethodManagerWrapper classTadashi G. Takaoka2012-11-122-40/+43
| | | | | | | | Change-Id: I6ff86ee819a446dd3ed5f9c3400d23564027b020
* | Move code point constants from Keyboard to Constants classTadashi G. Takaoka2012-10-295-54/+49
| | | | | | | | Change-Id: Iee01d4d2b916d0b584531104ac865ae6e6370a3d
* | Fix the build (again)Jean Chalard2012-10-231-1/+1
| | | | | | | | Change-Id: Idb7addede891a5c672d7fc09ddfe4d2585f8d647
* | Replace useless CharSequence to StringTadashi G. Takaoka2012-10-221-1/+1
| | | | | | | | Change-Id: Idc478f901185ee1b4912acc82d0cbc54fee4e991