Commit Graph

151 Commits (9320553ab922621f021a66f934ae9b40c8da21b8)

Author SHA1 Message Date
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
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