Commit Graph

339 Commits (1d9bf42009301bee11ebdafb26ca6a0a18240e84)

Author SHA1 Message Date
Jean Chalard 0a2872cb44 [HW16] Implement processing event chains.
Change-Id: I4e1e4f101050ebda77c629a61c548d3c8efb330f
2014-08-05 15:37:01 +09:00
Jean Chalard f69bb4c7a3 [HW15] Pass events instead of reading them from the transaction
It's probably cleaner to just pass the events rather than read
them from a transaction, especially when a transaction may be
associated with several events in a chain.

Change-Id: I27830f0f3f3f32fe77ea8b9cad505b7ebee648af
2014-08-05 15:37:01 +09:00
Jean Chalard dd31a2dedf [HW14] Cleanup
Do away with the didAutoCorrect local variables which are
unnatural to return out of all these functions.

Change-Id: I22024004d2c489de018beff812c2c589bfd8ca32
2014-08-05 12:59:55 +09:00
Jean Chalard a88e95e07e [HW13] Split up onCodeInput
Change-Id: I503c5403dcaea5db632eba85ae3fae9ba9a1f946
2014-08-05 12:59:36 +09:00
Jean Chalard e0bad8e988 [HW12] Use the consumed status of the Event.
Change-Id: I1619f6132f8f71bc1291fd6a5604a5e1e3431ae2
2014-08-04 12:41:07 +09:00
Jean Chalard da5ccd9f18 [HW11] Cleanup
Change-Id: Ia866d3f9a5981c687766f8c39979fb6091018e44
2014-07-31 18:33:30 +09:00
Jean Chalard 00ee5f7697 [HW10] Pull the processed event in its eventual place
Change-Id: I5f7932097627766e907764a99a5e9c170f725bc0
2014-07-31 09:10:24 +00:00
Jean Chalard f290d4073a [HW9] Pull the processed event further.
The 'processedEvent' variables will ultimately disappear entirely.

Change-Id: I612c5ce7dedc341b64921a86ac028fe91b75359b
2014-07-31 09:10:03 +00:00
Jean Chalard 86893a3b3f [HW8] Pull up the processed event.
Change-Id: I18021b7ec1588fc52533c48b7d8774bec7764822
2014-07-30 08:39:46 +00:00
Jean Chalard 7196566d4f [HW6] Split processing and applying the event.
...take 2

Change-Id: I9d13b6d51e13ce2e76ae3febebfb8c310eba509d
2014-07-30 11:06:43 +09:00
Ken Wakasa 4399849dea Revert "[HW6] Split processing and applying the event."
This reverts commit 1db3d860ca.

Reverting due to a few critical bugs and unit test failures.

Change-Id: I5e2d02300320438ef9c29577ec5b0860ea91d822
2014-07-30 00:55:49 +00:00
Jean Chalard 1db3d860ca [HW6] Split processing and applying the event.
If anyone has better names for those...

Change-Id: Ia2dfc75381816bd688948647e2c50c10657b9e89
2014-07-29 17:40:48 +09:00
Tadashi G. Takaoka ab661e3ef8 Make "Show correction suggestions" as a binary option
Formerly "Show correction suggestions" had three options, "always
show", "show in portrait mode", and "always hide". The reason behind
"show in portrait mode" was that there may not be enough screen estate
in landscape mode to show suggestions. Because recent phone devices
have relatively large screen, we decide to remove "show in portrait
mode" option.

Bug: 15780939
Change-Id: I896d737452c3893d43ce20bd88127f10c1eb3d83
2014-07-27 14:47:07 +09:00
Tadashi G. Takaoka 2dae79b196 Rename LatinImeLogger to DebugFlags
Bug: 15318007
Change-Id: Ic0268fd12865c9a692a5e7110a9beb76cb8b6d7f
2014-07-16 18:49:00 -07:00
Keisuke Kuroyanagi b8a9479b57 Move phrase gesture from additional features to public.
Bug: 15758242
Change-Id: I703dc2703afdf9402c5d2ac27411b74ece993dba
2014-07-08 16:36:06 +09:00
Ken Wakasa 0100a49bdd Merge "[HW5] Make the word composer package private." 2014-06-26 23:14:30 +00:00
Jean Chalard 28ebbd481a [HW5] Make the word composer package private.
Change-Id: I66ed277751272eb3ae2fd5e55e9f3e413970082f
2014-07-01 18:21:17 +09:00
Jean Chalard 08c01ea8a8 [HW4] Move a reference to WordComposer out of LatinIME
Change-Id: I5436432c0da86ed1e33b3c9d40204f4ea013ff55
2014-07-01 18:21:17 +09:00
Jean Chalard 292deb632c [SD7] Actually check for script.
...also implement the check for Hebrew and Arabic.

Bug: 15840116
Change-Id: Ia6433d7d98038ade64c171be4fe4b3f094111fac
2014-07-01 15:01:22 +09:00
Jean Chalard b10ca308af Merge "[HW4] Move a reference to WordComposer out of LatinIME" 2014-06-26 23:14:58 +00:00
Jean Chalard 20c89b1cf5 [SD5(2)] Remove useless args
Bug: 15840116
Change-Id: I1123426fbd9d420c1be64ccc917a5f870e70e6fa
2014-07-01 13:34:25 +09:00
Ken Wakasa 7eef5d3ff4 Revert "[SD5] Remove useless args"
This reverts commit 1d30023961 that broke the build.

Bug: 15840116
Change-Id: I0a5fa7dea2b418d19df24b2b31ed96bf192d45c0
2014-07-01 03:23:14 +00:00
Jean Chalard 1d30023961 [SD5] Remove useless args
Bug: 15840116
Change-Id: Ib3380cfc9d343c6f8953bba03af3801142bc3bdb
2014-06-30 21:58:55 +09:00
Jean Chalard 6345562e2b [SD4] Restart suggestions on language change
...otherwise we can't recompute the composition when we
change scripts.

This also fixes when we register that we need to take note
that the current subtype was used. Luckily this is a good
occasion for some cleanup that I've wanted to do for some
time: use InputTransaction for onTextInput (with the goal
to ultimately remove it entirely)

Bug: 15840116
Change-Id: Ie4f4f9157b66b79237eeb3db75535803124d3e19
2014-06-30 21:58:52 +09:00
Jean Chalard 35c37dbef8 [SD3] Forward the script ID to where it will be used
Bug: 15840116
Change-Id: If2073e76fed74ae6e1cdd7670013e0e985b0e630
2014-06-27 21:18:42 +09:00
Jean Chalard e063e1b218 Merge "Fix a unit test" 2014-06-26 23:14:30 +00:00
Jean Chalard fa4c59f9b6 Fix a unit test
When switching languages, we need to wait until the dictionary is
loaded to compute suggestions.

Change-Id: I7c32a900b297cd6302bfdc020842581315f3007f
2014-07-01 18:19:11 +09:00
Keisuke Kuroyanagi 17c5a388d6 Merge "Find multiple previous word information to support n-gram." 2014-06-26 23:14:58 +00:00
Keisuke Kuroyanagi 1c2f1ada83 Find multiple previous word information to support n-gram.
Bug: 14425059

Change-Id: Ieace636334a9b2a094527341d4fcfc05958296c5
2014-06-27 17:59:21 +09:00
Jean Chalard 310bb2c76f Merge "[HW1] Fix some bugs with event handling" 2014-06-24 01:52:26 +00:00
Jean Chalard 09291050a0 [HW1] Fix some bugs with event handling
With hardware events, we do have some events that
have both a keycode and a code point, so we need
a better way of distinguishing between auto-insert
keystrokes and others.

Change-Id: Ia23042989b4dca9d3a7d4a4c06bcebdabe324a7a
2014-06-26 18:27:53 +09:00
Keisuke Kuroyanagi 92827b0712 Merge "Make PrevWordsInfo have multiple words' information." 2014-06-24 01:52:26 +00:00
Keisuke Kuroyanagi e708b1bc2e Make PrevWordsInfo have multiple words' information.
Bug: 14425059
Change-Id: I2bd6a872904a44b80f638a13d91a97559217cc1a
2014-06-25 14:14:37 +09:00
Jean Chalard a3f7a5840a Don't commit a space before it's actually needed
Bug: 15740318
Change-Id: Idad06cb2c18335a981d5e9dea7eccf5e7ea8f701
2014-06-25 10:37:06 +09:00
Jean Chalard debe0dacbd Some cleanup to accommodate a fix
Also, this double tests for CODE_SPACE in the path going through
maybeDoubleSpacePeriod, but that's temporary.

Bug: 15740318
Change-Id: I0a6ace09cc791f0009157d3017675b9b3eb92145
2014-06-23 22:51:45 +09:00
Keisuke Kuroyanagi f73769c638 Merge "Remove word from personalized dicts when it's canceled." 2014-06-19 22:55:19 +00:00
Keisuke Kuroyanagi 0fbca1ac23 Remove word from personalized dicts when it's canceled.
Bug: 15555552
Bug: 15552347
Change-Id: Ia4d8c79d079e3ce233d46d4bbad4fff1be5c5c39
2014-06-20 14:46:13 +09:00
Tadashi G. Takaoka f49e975740 Clear suggestions strip if a suggestion engine isn't attached
Bug: 15709298
Change-Id: I1b3fff3152960d85060149727d7a3422fea8a0bd
2014-06-18 18:47:34 -07:00
Jean Chalard c715d95f17 [CM2] Update beginning-of-sentence suggestions
We need to update them after separator-space, and also when
the user presses shift and they are displayed.

Bug: 15554503
Change-Id: I5596163d5cd94d3cc5f6af10a1ab2cc74b6d4279
2014-06-16 18:44:43 +09:00
Jean Chalard deccc23564 [CM1] Let predictions be aware of capitalize mode.
Bug: 15554503
Change-Id: If5e8c0d94ed26d929400ccbb0d45ac23dd98d180
2014-06-16 18:44:39 +09:00
Jean Chalard 367c199de1 Remove mPrevWordsInfo
This member has outlived its usefulness. It's not clear now that it
makes things really faster, but it does bring a lot of complexity
that we can avoid by removing it.

Change-Id: Ifbc8094a45b56b958fe165b1930f4cc358a97721
2014-06-10 12:07:51 +09:00
Jean Chalard fca2c4b439 When starting input, include the literal word in suggestions
This change also includes a fix that has suggestions re-computed
when the typed word is included but no prior suggestions were
found in spans.

Bug: 2349475
Change-Id: Ic06e6ac492507126ffc1e96a5f396c971b567272
2014-06-06 16:00:18 +09:00
Jean Chalard 70ff0c2122 Merge "Fix a bug on rotation with selection." 2014-06-06 03:12:12 +00:00
Jean Chalard 9fd9a68d87 Fix a bug on rotation with selection.
The symptom : when text is selected and the device is rotated,
sometimes the keyboard sets the word as being composed around
the start of the selection. Upon the next rotation this ends up
with the keyboard committing some text in place of the selection.

The cause : another bug in the framework with rotation >.>
The keyboard receives a call to startInput with a wrong cursor
position, namely one that does not represent a selection. The
keyboard sets a composition according to this wrong data. When
the keyboard is rotated again, it commits the text, which takes
the place of the selection.

The solution : actually when restarting input the keyboard
realizes that the cursor position is wrong. We cancel composition
at that time.
For robustness, this change also implements two other defensive
changes : upon call to onUpdateSelection, we actually realize
that the previous values were wrong, so we also fix it at that
time, and in addition, when rotating, we finishComposingText()
instead of commitText() which is less dangerous. Implementing
this later change also allows us to let less internal variables
from InputLogic escape to LatinIME, so it's also a good change
for design.

Bug: 14140799

Change-Id: Ib10de18e53e376ac1bbc8487e13d969828483346
2014-06-06 11:18:23 +09:00
Tadashi G. Takaoka 2e32e37d5b Rename some boolean variables for readability
Change-Id: I434cf507e68349b9893ac084645986d6b3d7da91
2014-06-05 18:18:46 +09:00
Jean Chalard c84b10840e Don't recapitalize just at the start of input
Bug: 13283555
Change-Id: Iab0466425dc44779d110f2cd29d725d22eb04827
2014-06-04 16:29:31 +09:00
Jean Chalard 4a1113b6b0 Refactoring
Rename `initialize' to `start' and `deactivate' to `stop' for ease
of understanding. It's completely bizarre that you can "deactivate"
a recapitalization and that will just restart a new one the next time
you press shift. Start and stop are easier to understand.

Change-Id: I455175aebfcfe11198c6c61bf2c6b19efc3f82df
2014-06-04 16:29:29 +09:00
Keisuke Kuroyanagi 8f71fab2ed Make prevWord = null if the next word starts from a connector.
This fixes PunctuationTests#
testAutoCorrectionWithSingleQuotesAround.

Bug: 14119293
Bug: 15334309

Change-Id: I604c21a21e89a5fc431fd56ab7b6ad03f4736b01
2014-05-30 20:30:17 +09:00
Jean Chalard fa0e76dde6 Limit recapitalization for reasonable performance.
At 100k text, it's reasonably fast (less than 1s on latest hardware).

Bug: 12913404
Change-Id: I426b918b2610af24364934a1c37a7314f1142ad0
2014-05-30 18:04:39 +09:00
Tadashi G. Takaoka aaf2bbf9c3 Merge "Remove LatinImeLogger and UsabilityStudyLogUtils" 2014-05-29 09:33:25 +00:00
Tadashi G. Takaoka 51ee5a47b8 Remove LatinImeLogger and UsabilityStudyLogUtils
This CL must be checked in together with Ie52007dc5c.

Bug: 15318007
Change-Id: Ie665f296e43b5485ae8ba7e949aa262794ee0dcc
2014-05-29 18:03:03 +09:00
Jean Chalard 944923f266 Fix: too many calls to getSuggestedWordsForTypingInput
This reverts commit d941ea18 and builds on it to fix the behavior
of the broken cases.
It also fixes a small, related bug that probably has existed for
a very long time: predictions not displayed when cancelling
double-space-to-period.

Bug: 15148015
Change-Id: I1f9358f8b6f5804f831643611576be347e83999d
2014-05-29 17:36:46 +09:00
Tadashi G. Takaoka bbf556e8e1 Remove researcher logger
This CL must be checked in together with I5cc76807e3.

Bug: 15318007
Change-Id: I61423c3377ddc299fb332e742d6626c2e47145bb
2014-05-29 15:10:28 +09:00
Keisuke Kuroyanagi 4bffac6db9 Stop directly checking SuggestedWordInfo.mKind
Bug: 15298959

Change-Id: Iba6eeb7981634e7ddb896404978b30f6efd6e72f
2014-05-28 20:35:45 +09:00
Keisuke Kuroyanagi 0088d1f668 Merge "Use whether it's exact match to detect distracters." 2014-05-26 13:53:19 +00:00
Keisuke Kuroyanagi a6278eb9c1 Use whether it's exact match to detect distracters.
Bug: 13142176
Change-Id: Id5b7286d28897931f7bfe571be45d46ffeef4adf
2014-05-26 21:56:20 +09:00
Tadashi G. Takaoka 9df51d10fa Keep showing important notice when "show correction suggestions" is off
When
 1. The important notice message is shown on the suggestions strip.
 2. And the "Show correction suggestions" settings is off.
we will keep showing the important notice message on the suggestion
strip.

Bug: 13741460
Change-Id: I411007ab1e5e6959b6cdba7a6601a84635259313
2014-05-26 14:11:41 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Keisuke Kuroyanagi 9f9988e996 Merge "Introduce EMPTY_PREV_WORDS_INFO and BEGINNING_OF_SENTENCE." 2014-05-23 14:53:13 +00:00
Ken Wakasa 991c9026b9 Merge "Revert "Fix: too many calls to getSuggestedWordsForTypingInput"" 2014-05-23 14:34:36 +00:00
Ken Wakasa d941ea1826 Revert "Fix: too many calls to getSuggestedWordsForTypingInput"
This reverts commit 7aa895e2e3.

Bug: 15148015
Change-Id: If39c4f8b897f247d4eb935923d55d81def4c8fb4
2014-05-23 14:34:06 +00:00
Keisuke Kuroyanagi a790c5b683 Introduce EMPTY_PREV_WORDS_INFO and BEGINNING_OF_SENTENCE.
Bug: 14119293
Change-Id: I5020e5f0aa64bc3e97b3a3c2c07a60c8b765ed64
2014-05-23 23:19:33 +09:00
Keisuke Kuroyanagi a1035be6d8 Have DictionaryFacilitator in LatinIME.
Bug: 13142176
Bug: 15094186
Change-Id: I9da67352ff2abcd289fa5885389895ced878a413
2014-05-23 09:30:55 +09:00
Jean Chalard 2df6374ffa Merge "Fix: too many calls to getSuggestedWordsForTypingInput" 2014-05-22 03:14:01 +00:00
Jean Chalard 7aa895e2e3 Fix: too many calls to getSuggestedWordsForTypingInput
Bug: 15148015
Change-Id: Idcb729734bd62b537fb81acf8bdb5cae4470404c
2014-05-22 12:08:12 +09:00
Keisuke Kuroyanagi 17f326b745 Add beginning of sentence information in PrevWordsInfo.
Bug: 14119293
Bug: 14425059
Change-Id: I65320920e840082b0b697bb621676716d0933e0c
2014-05-21 15:40:08 +09:00
Keisuke Kuroyanagi e507d92aa3 Use PrevWordsInfo for get/add/remove n-gram(bigram) entry.
Bug: 14119293
Bug: 14425059
Bug: 15102610
Change-Id: Ib482390f8d15b37d44a1a54e8c243a9eaec3f815
2014-05-21 11:15:38 +09:00
Ken Wakasa 4e21d3711f Revert "Use PrevWordsInfo for get/add/remove n-gram(bigram) entry."
This reverts commit ff50b39176.

Bug: 14119293
Bug: 14425059
Bug: 15102610

Change-Id: If278b4ab236e38d20d8cdc0761b0438911bd4ff9
2014-05-20 14:01:06 +00:00
Keisuke Kuroyanagi ff50b39176 Use PrevWordsInfo for get/add/remove n-gram(bigram) entry.
Bug: 14119293
Bug: 14425059

Change-Id: I12e9ba977c153b514c6591ab52940712fd0874e3
2014-05-20 13:37:04 +09:00
Jean Chalard 5ce39dfa78 Fix a bug where changing languages kills the composition.
Bug: 14926896
Change-Id: Id2a06c68a51f833db4d8bbc858a232c2696afb6e
2014-05-14 20:34:32 +09:00
Jean Chalard 309ab664a8 Don't send empty composing texts.
Bug: 13160467
Change-Id: I5e3204ac8aaa18fe9219cc6b564b832ab6cf94fc
2014-05-14 16:55:32 +09:00
Keisuke Kuroyanagi 490e6846a1 Merge "Add freq=0 words to user history depending on the option." 2014-05-12 11:15:52 +00:00
Keisuke Kuroyanagi 84070cbc74 Merge "Improve multi-word suggestion handling for user history." 2014-05-12 11:11:15 +00:00
Keisuke Kuroyanagi 87343166e5 Add freq=0 words to user history depending on the option.
Bug: 14686585
Change-Id: Ia1c3adb1bcc625788016e378e1ac7b0792ea9f4e
2014-05-12 19:48:58 +09:00
Keisuke Kuroyanagi ddacfdeb09 Improve multi-word suggestion handling for user history.
Bug: 12902664
Change-Id: I03deed16047f0beaba8932d87c6129ec8061ba9c
2014-05-12 18:04:43 +09:00
Jean Chalard be99616afa Create the path for specifying combining rules in the subtype
Also add the skeleton of the combining rules for Myanmar
reordering as a pilot.

Bug: 13945569
Change-Id: Iabeb6838f45f1efff482143595ce5b48543e0c43
2014-05-12 15:58:51 +09:00
Jean Chalard 29c00ff538 Introduce clustering punctuation
Bug: 10081730
Change-Id: If198fa3df68ecb267da0a278da41fd509d6165f1
2014-05-01 15:45:24 +09:00
Tadashi G. Takaoka 393da03c8e Fix handling shift + enter
Bug: 14278758
Change-Id: Id77c99b83cc69855972b27c9cebd482c8cbd3539
2014-04-23 19:22:00 -07:00
Jean Chalard 3aba6263f0 Restart suggestions when restarting input
Bug: 6851364
Change-Id: I3052924053f37f56c9c3953051aa1b22224a2b2e
2014-04-16 17:02:08 +09:00
Jean Chalard 2282e8520a Fix updating the shift state upon backspace
Bug: 13514349
Change-Id: If4c9db12b0ab5be676f7a2f72715f469066ee537
2014-04-14 21:28:24 +09:00
Jean Chalard cb05dc1d1b Merge "[IL133] Avoid calling a dangerous method from outside." 2014-04-10 09:15:13 +00:00
Jean Chalard 4370ff0998 Fix some flaky tests.
In tests, we create many instances of LatinIME, but we never
destroy them. That means we never close the dictionaries nor
the handlers.
This change calls onDestroy, which closes all dictionaries, and
adds some code to finish the handlers.

Change-Id: I942517a2a940c54256b08763f6b38f5b55809f55
2014-04-10 17:32:05 +09:00
Jean Chalard d52bec0069 [CB23] Merge add and deleteLast
Bug: 13406701
Change-Id: Id9a2e4144b1908ad27d78228ee19e6fc4d4d669f
2014-04-07 15:51:44 +09:00
Jean Chalard f9516b00ec Merge "[IL132] Remove some calls that let a value escape." 2014-04-04 13:33:26 +00:00
Jean Chalard 28a59dd049 Fix a bug with double-space-to-period
Bug: 13778001
Change-Id: I3ebd57950cdfacbbcdc64ed214c0590519a0665c
2014-04-03 22:07:57 +09:00
Jean Chalard 8ab4ae4377 [IL133] Avoid calling a dangerous method from outside.
We want to remove all calls to this as it lets internal values
escape, but there is some refactoring to do to finish this.

Bug: 8636060
Change-Id: Iedba6afe4719bc0add868714a1ee5a04b7ead33e
2014-04-03 15:36:15 +09:00
Jean Chalard 9320553ab9 [IL132] Remove some calls that let a value escape.
Bug: 8636060
Change-Id: I696514934586ee71e734fd974026af8b2c866127
2014-04-03 15:36:15 +09:00
Jean Chalard 7ebd7ca9a4 [IL131] Cleanup some cruft
Bug: 8636060
Change-Id: I169618b50532df68e973e14b3f114c6c19714c84
2014-04-03 15:36:12 +09:00
Jean Chalard 26650377cf [IL130] Remove a useless local
Bug: 8636060
Change-Id: I36ba3e00630bef644fc4671d0714490b5982f6a1
2014-04-02 18:10:21 +09:00
Jean Chalard a777c1c460 [IL129] Change some confusing method names.
Bug: 8636060
Change-Id: I2f55fc23d7e05b63582a3f0660b58635eae5ec59
2014-04-02 18:10:18 +09:00
Jean Chalard 1dc354bed1 Merge "[IL128] Remove passing some handlers." 2014-03-31 09:32:00 +00:00
Jean Chalard dbadee96b6 Do not create a handler thread for each session
Bug: 13710224
Bug: 12821388
Bug: 12667742
Change-Id: I6188e0240193d2bca789110e7660a0f31bbafc62
2014-03-31 15:32:48 +09:00
Jean Chalard 452cd2f619 Fix a bug where LatinIME would leak pipes.
Bug: 12667742
Bug: 12821388
Change-Id: Ic0bad56fb96e54ac032759adffc8ea320c06dff2
2014-03-28 19:54:07 +09:00
Jean Chalard 70d9152c7f Some cleanup
Change-Id: Ia11d656a70623168b091763ac6524750f9cca8d8
2014-03-28 15:27:00 +09:00
Jean Chalard 6bd3723e73 [IL128] Remove passing some handlers.
Bug: 8636060
Change-Id: I088be9a7555265ca097667523defd73be4cbe37f
2014-03-27 17:51:32 +09:00
Jean Chalard 071b9c1a05 Merge "[CB14] Implement backspace in the combiner chain" 2014-03-25 10:46:32 +00:00
Jean Chalard 1079665c3c [CB14] Implement backspace in the combiner chain
Bug: 13622107
Bug: 13406701
Change-Id: I0023b398c4451253f9f717e2bd990b8a054004bc
2014-03-25 17:57:03 +09:00
Keisuke Kuroyanagi adfb262797 Remove logic related to dictionary loading from LatinIME.
Make mSuggest final and give DictionaryFacilitator the
responsibility to manage dictionary loading state.
This can simplify the logic to decide how to deal with
additional dictionaries when loading settings or language
switching.

Bug: 13273534
Change-Id: I9f3d328272f25addfa186fbeedaaf8417455ba99
2014-03-25 15:35:20 +09:00
Jean Chalard 4df6bc0853 Merge "[CB10] Add an event for string input" 2014-03-20 11:34:16 +00:00
Jean Chalard 058a38988b [CB10] Add an event for string input
Change-Id: Ie5da6c73d4df4553067c58cd0dce9abb34534250
2014-03-20 19:47:01 +09:00
Jean Chalard 437dbbcfee Merge "[IL127] Move the double space countdown to InputLogic" 2014-03-20 09:07:49 +00:00
Jean Chalard 7ede642df4 [CB08] Create a combiner chain in the word composer.
Bug: 13406701
Change-Id: I3b9f75de9283f76366d1bef7e14a8f22f2186669
2014-03-20 14:27:55 +09:00
Jean Chalard 350d73932d [IL127] Move the double space countdown to InputLogic
Bug: 8636060
Change-Id: Ie193b747bd9d0b5ba6a986b9a3c746c2182742ed
2014-03-19 17:47:03 +09:00
Jean Chalard 46e17983c6 [IL125] Remove arg to onPickSuggestionManually
Bug: 8636060

Change-Id: I55332c22897e97148621cbd367acf5175b5b3d04
2014-03-19 17:47:03 +09:00
Jean Chalard 1110adad11 [CB07] Small refactoring
Bug: 8689779
Change-Id: I2cf10c690c7e4a9c6bf27211d1fccc1f9d4a9249
2014-03-17 21:26:36 +09:00
Jean Chalard 5eac728b4a [CB06] Fix a design error.
The event interpreter should intervene later, after decoding.
Decoding should happen first, and then the Event should
be passed to the InputLogic.

For the time being, we will leave the (unused) EventInterpreter
class and its friends, because we'll use them again later.

Bug: 13406701
Change-Id: I7582d486724311e39e6692e606cca50c78800643
2014-03-17 20:49:29 +09:00
Jean Chalard f8accd8839 [CB04] Add an event array to WordComposer.
Bug: 13406701
Change-Id: I9ecd2709c8f1c678a85b0cfaf7c5ed4f78459821
2014-03-14 12:44:49 +09:00
Jean Chalard 750cd48981 [CB03] Pass whole events to the various input logic handlers.
Bug: 13406701
Change-Id: I0a0e4e0b3357f116e1b915c548dee4575e300c92
2014-03-13 19:35:54 +09:00
Jean Chalard a79a3265db [CB02] Pass an Event to onCodeInput.
Bug: 13406701
Change-Id: Id82e9aab6544ca308e6ac6dee2cfa018b9ce2d8f
2014-03-13 18:41:02 +09:00
Jean Chalard 3892991b80 Merge "[IL124] Remove the KeyboardSwitcher arg to onCodeInput" 2014-03-06 09:15:26 +00:00
Jean Chalard 4da06b9a19 Merge "Correctly update the suggestion strip on non-resumable word" 2014-03-06 08:54:44 +00:00
Jean Chalard a1bf550294 [IL124] Remove the KeyboardSwitcher arg to onCodeInput
Bug: 8636060
Change-Id: I29ce4c82ea880a937b1c9e5daf494fcdbbdd1336
2014-03-06 14:20:41 +09:00
Jean Chalard db38d5cf63 [IL123] Put the settings values inside the transaction
A transaction should always operate with a consistent set
of settings. It's better to have it reference them than to
always pass them along.

Bug: 8636060
Change-Id: I3c642dfea6be30712fc6cbb279c64f3185895791
2014-03-06 14:20:37 +09:00
Jean Chalard 29881854bc [IL122] Put the code, x and y in the transaction
Bug: 8636060
Change-Id: Icdf87995dedec410b54c306e8d312ba7ec25cea6
2014-03-06 12:50:07 +09:00
Jean Chalard c6e200ef3a Correctly update the suggestion strip on non-resumable word
Bug: 13303965
Change-Id: Iedc5d38f70af76fbebb99e59a0d17c1e226c810d
2014-03-05 18:47:41 +09:00
Jean Chalard 7b905c40e9 [IL121] Introduce InputTransaction
We probably can't put this off any longer

Bug: 8636060
Change-Id: I1e5d3cf62d719f4d064ced3282bebf2e822f6baa
2014-03-05 17:04:10 +09:00
Jean Chalard 151761a276 [IL120] Cleanup
Remove useless arguments, local vars, make stuff private

Change-Id: I7cc6c19e9c1703304d593e02be31eb9569cc7b4e
2014-03-04 17:52:14 +09:00
Jean Chalard fb28935f82 [IL119] Make fields private.
Change-Id: Ia84d3e5a102e1056e3d7467be07df89390f17617
2014-03-04 17:52:14 +09:00
Jean Chalard 030da519de [IL115] Cleanup continues
Bug: 8636060
Change-Id: I944b10ec9798eec57d986e1075ba348aa0892cae
2014-03-04 14:46:04 +09:00
Jean Chalard e110018e2a [IL114] Move a method to InputLogic
Bug: 8636060
Change-Id: I0d8f93985ddc6e93ce9af0d92a8056620351a498
2014-03-04 14:46:04 +09:00
Jean Chalard 32c6d4caea [IL111] Remove a member.
...and improve encapsulation and readability.

Bug: 8636060
Change-Id: I36407630b307df0721ea7fdb7e7a22cdf2b018b3
2014-03-04 14:31:47 +09:00
Keisuke Kuroyanagi ea89cb40b7 Use dynamic operations to construct all ver4 dicts.
Bug: 8187060
Bug: 13127350
Change-Id: I081ee904c41898128efa8ba7a1bf3fa0a46c6231
2014-02-27 23:21:09 +09:00
Jean Chalard 57c0c577af [QRP6] Fix: recorrection top candidate is displayed in bold
Bug: 10385162
Change-Id: Icf9471d474a3a8ed8f38c46c7948c66f9131691e
2014-02-25 19:48:09 +09:00
Jean Chalard 2a5ec00301 Don't trim newer inputpointers with old data
We already have a mechanism to avoid this crash, but it wasn't
used every time it needed to. It's possible that ending a batch
input and starting a batch input happen while suggestions
are being pulled out, which would result in pointers that have
been reset being passed for trimming.
Just increasing the sequence number should get rid of the
problem.

Bug: 12178124
Change-Id: I36ef3bc8a78679bc09daa39e665f5ce1bab50c2a
2014-02-21 16:43:11 +09:00
Jean Chalard 1b3a142cac Merge "Fix a bug where suggestions would not be updated." 2014-02-20 14:46:35 +00:00
Jean Chalard 6f50c95887 Fix a bug where suggestions would not be updated.
Also fix a small cosmetic bug where the suggestion strip
would flash.

Bug: 12951777
Change-Id: I68b7bb9175571de9c718f737eebd9f67ea04a931
2014-02-20 23:32:04 +09:00
Keisuke Kuroyanagi b063377e77 Add final and volatile for members of InputLogic.
Bug: 13107471
Change-Id: I47df79bc6f015c212d1b6d2f63b2efc5da24294e
2014-02-20 18:55:19 +09:00
Jean Chalard 63be066544 Cleanup.
Less code, less chance of stuff escaping, and a bit of a clarification.
Yay.

Change-Id: I3193fd8ad7ac28195260cbc231c4e498a63a460c
2014-02-18 17:07:46 +09:00
Jean Chalard 7a7aeffcdc Don't resume suggestion on links.
Bug: 11447084
Change-Id: I5bd558b9dd85d1505aa918f44e8ac3e52ec42d97
2014-02-17 20:36:16 +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 2c48846903 Backward compatibility hack : send delete when empty.
Some apps depend on the keyboard sending something to them
when the text is empty. This is BROKEN. Your app must not lie
to the keyboard about what is before the cursor. If there is something
to delete, you must not pretend there is not and try to catch some
delete event. This will result in a bad user experience. This will not
work with all IMEs. If your app needs this broken behavior, you're
doing it wrong. Seriously guys, we're not in the era of typewriters
any more, there are touch screens, there are gestures, there is
accessibility, there are many innovative IMEs that don't have
keys. Do *NOT* rely on key events.

This change implements an ugly hack so that these broken apps
may continue half-working with LatinIME. We are very unhappy
about this.

Bug: 12998568
Change-Id: Ia62ae2fbee4fee65b463acf3a79aafcfd0defa1d
2014-02-13 18:41:54 +09:00
Jean Chalard cf03ff02b1 Fix a test.
This fixes two separate problems:
- The word finds itself with two separate suggestion spans.
This is fine for LatinIME, but it's hard to predict whether it's
fine for other interested parties (other keyboards).
- The test for the blue underline was incorrect.

Change-Id: I3ecc849676851bf25a25238d694adaa956521a26
2014-02-13 14:01:37 +09:00
Jean Chalard 3df8bcb7a9 Revert "Display predictions when the cursor is moved after a word."
This change is lacking some comments and break some unit tests.
It needs more work.

This reverts commit 38d31a5e79.

Change-Id: I675854fd0729f2d01b7751e35c6d0117f4f88993
2014-02-10 14:24:30 +00:00
Jean Chalard 38d31a5e79 Display predictions when the cursor is moved after a word.
Bug: 12951777
Change-Id: I744b98df6679edd34ca3c1392e38597325935932
2014-02-10 23:07:00 +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 8fb2f6a441 Merge "Fix a flash in the wrong place" 2014-02-05 09:46:44 +00:00
Jean Chalard 9e9e948a70 Fix a flash in the wrong place
Bug: 7226099
Change-Id: I8f74802b3ae24018fc4176fb2fff2c777ae170b0
2014-02-05 18:44:24 +09:00
Jean Chalard 2bb1c6add9 [IL109] Move more code to InputLogic
Bug: 8636060
Change-Id: Ib12eacc836e8d39c4165c97a2a287f32f6bf5405
2014-02-05 14:49:59 +09:00
Jean Chalard 2c01dd00f2 [IL108] Remove some uses of LatinIME in input logic.
Access the suggestion strip through the interface instead.

Bug: 8636060
Change-Id: Ia8bd705c230f943e309d677ef683b1a2cbe68036
2014-02-05 14:49:59 +09:00
Keisuke Kuroyanagi 8c5c01e981 Check isEligibleForAutoCommit when batch input is ended.
Bug: 11951198
Change-Id: Ibbe09fa38eaa3ebf8f9b69f744a29db7ac598975
2014-02-05 11:40:17 +09:00
Jean Chalard 9068fd4e77 Don't resume suggestions if suggestions are not requested.
Bug: 12832614
Change-Id: I6a9b6d128d7e0324ba59a43cf153a3b54e1d35bf
2014-02-03 15:20:45 +09:00
Jean Chalard ac84fe642e [IL106] Inline a now useless method.
Bug: 8636060
Change-Id: Ic8e0225206358680aa0de421f17ab443c888036d
2014-01-29 12:23:40 +09:00
Jean Chalard fa7075768d [IL105] Remove more useless arguments
Bug: 8636060
Change-Id: I9e817bb9622c84544a5ca8708e5c1fccad1ed447
2014-01-29 12:23:26 +09:00
Jean Chalard 084c9961f4 [IL104] Remove useless arguments
Bug: 8636060
Change-Id: I97a371fe0c6227eb0f03d3e391a33726e6280322
2014-01-29 12:23:25 +09:00
Jean Chalard 1d2e4f9dcc [IL103] Save the typed word separately in SuggestedWords.
This helps managing the cases where the typed word is not
in the suggestions. This happens during recorrection.

Bug: 8636060
Change-Id: I6784feb793cae96272a7f1d123a0e3bbb8f03143
2014-01-29 12:22:21 +09:00
Yohei Yukawa be18530acf Merge "Fix inconsistent behavior with the back-to-the-main-keyboard key" 2014-01-28 10:50:23 +00:00
Yohei Yukawa 576f8a5b72 Fix inconsistent behavior with the back-to-the-main-keyboard key
With this patch, the back-to-the-main-keyboard in the Emoji
palette will be registered as a key-release action instead of
a key-press action, like switch-to-the-emoji-palette in the
main layout. This provides mroe consistent UX when the layout is
switched from the main layout to the Emoji palette then
switched back to the main layout.

BUG: 12464067
Change-Id: Ia0d0185db43234dfcfb7cee2677f3d199fe6ed96
2014-01-28 19:30:27 +09:00
Jean Chalard c9cc1b1de5 [IL102] Rename a method
Bug: 8636060
Change-Id: Ia54afdfab9124aa5c35699e357e63eae66a7557f
2014-01-28 17:18:02 +09:00
Jean Chalard 4500dedfa9 [IL101] Remove a method
Bug: 8636060
Change-Id: Ic9c12fc6970987b0e1912e8ae85bed55260d66b5
2014-01-28 17:18:02 +09:00
Jean Chalard 4761d2fb00 [IL99] Migrate some code to InputLogic.
Bug: 8636060
Change-Id: Ibf1f9c7bdc3fdd872d6c15447fa555434485cc52
2014-01-28 17:18:01 +09:00