Commit Graph

245 Commits (5eebaddccbdbd59669d658245eea6e8aca560fc6)

Author SHA1 Message Date
Yohei Yukawa 5eebaddccb Merge "Dismiss "Add to dictionary" hint with non-special char event" into lmp-dev 2014-08-25 04:08:56 +00:00
Yohei Yukawa ebc1509039 Introduce #shouldShowAddToDictionaryHint
This is a groundwork for subsequent CLs where we need to
call this method from multiple places. This CL does not
change any existing behaviors.

Change-Id: Id8fa0360305d7383571edffab6752b2240367cf9
2014-08-24 20:59:30 -07:00
Yohei Yukawa 034c326078 Dismiss "Add to dictionary" hint with non-special char event
This CL slightly extends the condition when "Add to dictionary"
hint is dismissed.

With this CL, "Add to dictionary hint" will be dismissed by any
non-special char event. This is more comfortable especially if
we start using more intrusive UIs such as indicator and/or
background color with the text hint in the suggestion strip.

Change-Id: I2ea0fa40d9c6663ebf5d5439be3eca2a2cbd5166
2014-08-24 20:32:22 -07:00
Yohei Yukawa 4a71d2c480 Allow to add/remove background color to/from the committed text
This is a groundwork for subsequent CLs where we need to
add/remove background color to/from the commited text.

In this CL, we use Spanned#SPAN_COMPOSING so that we can easily
remove such a background color by calling
InputConnection#finishComposingText. To make this operation easy
and realiable, we need to track whether we have specified the
background color to the commited text or not at one place. Here
we use RichInputConnection for this purpose.

Change-Id: I5f9bc4425c5d1b80a719a20e5baf336729ec08d2
2014-08-24 20:28:24 -07:00
Jean Chalard b8d764772b Add the input style to SuggestedWords.
Change-Id: I81f37d08659d449822b027d3d5912e11eec8b8ff
2014-08-14 17:53:04 +09:00
Jean Chalard 772a8019ef Revert "[HS2] Move more stuff to onStartInput"
This reverts commit 93b00a314e.

Bug: 16830599
Change-Id: I955e7da77978c3a495660aa29247e010d489c36b
2014-08-06 18:36:29 +09:00
Jean Chalard 9273f3832b [HS3] Fix a bug on ICS
There is a bug in ICS where the input connection won't take
any writing commands after rotation until the cursor moves.
This fixes it by wiggling the cursor position once before trying
to do anything.

Bug: 16810766
Change-Id: Ib14c70bd0550420cecfa86dea501d13a1a91e296
2014-08-06 11:38:11 +09:00
Jean Chalard 93b00a314e [HS2] Move more stuff to onStartInput
Bug: 8152758
Change-Id: Ida05df7d151ceb582886e2ad06c5bdf0b59978ee
2014-08-06 11:14:47 +09:00
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