Commit Graph

659 Commits (9b01890254c62a30b079bd9f79a30f9541faf11b)

Author SHA1 Message Date
Jean Chalard 9b01890254 Move a method to a more sensical place.
Change-Id: I11f87448f689cf828bff960ad7a3e4739a3457dc
2012-03-05 14:19:35 +09:00
Jean Chalard 428178aca6 Merge "Replace a useless computation with a constant" 2012-03-04 19:35:11 -08:00
Jean Chalard 4ab5486bf2 Merge "Remove a useless test" 2012-03-04 19:35:02 -08:00
Jean Chalard 4e112d0782 Replace a useless computation with a constant
This is provably always false

Change-Id: I88d783fa59fec0b7a729558ba974a6a58c158645
2012-03-05 11:57:36 +09:00
Jean Chalard a04d2358c0 Remove a useless test
With the current logic, this test provably always resolves
to false.

Change-Id: Iba84ef5f3a14cd8ac48c6a813519ab283bf605f8
2012-03-05 11:38:45 +09:00
Tadashi G. Takaoka 49079df8ec Merge "Omit InputMethodManagerCompatWrapper argument from some utility methods" 2012-03-04 18:12:47 -08:00
Tadashi G. Takaoka 2d25ba2750 Omit InputMethodManagerCompatWrapper argument from some utility methods
Change-Id: Ic837018c702c8c575de3e5e81fe8e31fee16fe22
2012-03-05 10:43:12 +09:00
Jean Chalard a83a53ba24 Some renaming
Change-Id: I445277cb3af469a0145a8da0ffb801b7e19048cd
2012-03-02 20:46:54 +09:00
Jean Chalard dd931c47be Some more simplification
I wish "are we autocorrecting?" was not computed in a dozen
places all depending on a hundred code paths
More than likely, this fixes very subtle discrepancies
between auto-correction indicator with the underline and with
the LED on the spacebar - which is not displayed any more in
the current version anyway. Especially, the LED probably
would have been off when the word was caught by the safety net.

Change-Id: Idda3021771081d6155b06915e728ecd64d9e042e
2012-03-02 20:34:10 +09:00
Jean Chalard e2a50bd804 Optimization
Avoid doing some useless processing.

Change-Id: I4ce0a188e10db30322bd25751dc5c09492cea301
2012-03-02 20:26:51 +09:00
Jean Chalard 7204eab3da Precompute two values that never change
Change-Id: Ic54e7926028ea8374564da5e5004d710f42c53e1
2012-03-02 20:04:42 +09:00
Jean Chalard 38e535e596 Change a parameter type to make a call clearer
Change-Id: I2918d0a8b00da743689b919f80128bbf36973f24
2012-03-02 20:01:34 +09:00
Jean Chalard 5bc2b61274 Move a method up a level
Change-Id: I6b9a697480127e4745698ab19f8a360b86ff39ca
2012-03-02 19:59:55 +09:00
Jean Chalard d02783cb63 Break out a method
Change-Id: Ia14fc320422b7f198c33ba522bb93dd70fbcb2c1
2012-03-02 19:52:06 +09:00
Jean Chalard d992fa847d Small refactor (A1)
Change-Id: Ia0838bbce47a2b60067f464685ad6d55ee4ec934
2012-03-02 18:55:04 +09:00
Jean Chalard fa12acb8b7 Change a dangerous ID
The message id 0 is used intrinsically by the framework
for all messages without a specific ID. Using 0 here
we can't reliably use the post(Runnable) method on our
handler, because these would in *some* respects be taken
for update_suggestion messages, but not all.
For example, they'd be removed on removeMessage() but
they would not trigger the actual process. This would
lead to utter confusion.

Change-Id: I5d9b01d38e2ff090cd0d80c27421dc8a41c317b8
2012-03-01 19:05:51 +09:00
Jean Chalard 5935950d44 Rename cancelCommit to revertCommit
This wording is easier to understand, and it matches the other
revert* functions.

Change-Id: Ibc2ec79fb5a0f9bf508e5cdeb75e54abd9241d0c
2012-02-22 01:09:23 -08:00
Jean Chalard 4fef31510d Remove a useless code path (A7)
This is never called any more, since we now use the cancelCommit
path to react to a backspace after a manual pick.
This concludes the run of changes to implement feature
request #5968922

Change-Id: I23df653bb2a3de2ba0152394d5d616a42ac7519b
2012-02-22 01:05:36 -08:00
Jean Chalard bdf89ce5fe Rename cancelAutoCorrect to cancelCommit (A6)
Also remove a test in debug mode that would check for absence of
a situation which is now expected.

Change-Id: Ia5be350bc98a604b3bf8f6057652c5534f6a19af
2012-02-22 00:59:01 -08:00
Jean Chalard 2aa16dd81f Merge "Activate the code to cancel a manual pick (A5)" 2012-02-22 00:50:13 -08:00
Jean Chalard 80c25df49d Merge "Implement cancelling a manual pick (A4)" 2012-02-22 00:29:23 -08:00
Jean Chalard 8db74d0fae Merge "Use the stored separator instead of reading it back (A3)" 2012-02-22 00:24:19 -08:00
Jean Chalard 9271b770e8 Activate the code to cancel a manual pick (A5)
This finally makes active the behavior described in
Bug: 5968922

Change-Id: I363ed23270c3dea75411ea806011225097b5d07c
2012-02-22 00:05:19 -08:00
Jean Chalard 32f0af1fc4 Implement cancelling a manual pick (A4)
This is new code, but simple code. The new code path is never
used for now, but it will be in an upcoming change. This serves
to implement feature request #5968922

Change-Id: I3e67731ec6e9fc0b86c5cbd972e9c081781c11a9
2012-02-22 00:00:51 -08:00
Jean Chalard 193d23f40e Use the stored separator instead of reading it back (A3)
Now that we have stored our committing separator, we can use
it directly instead of reading it back from the text view
paying the IPC cost. This prepares for feature request #5968922.

Change-Id: Ifeaa2d659cf12b91c89d28e6ff7d07a669258184
2012-02-21 23:56:36 -08:00
Jean Chalard e043bf02f2 Merge "Give LastComposedWord knowledge of the separator (A2)" 2012-02-21 23:42:21 -08:00
Jean Chalard 1dfdc8056c Merge "Give LastComposedWord knowledge of the committed word (A1)" 2012-02-21 23:41:42 -08:00
Jean Chalard 66bb563535 Give LastComposedWord knowledge of the separator (A2)
This stores the separator that was used to commit the word in
the LastComposedWord. It may be NOT_A_SEPARATOR if there was
no separator (for example, the cursor moved causing a commit,
or there was a manual pick). This is necessary to implement
feature request #5968922.

Change-Id: I5fcf19a78ec66d68d4df89418eaef13952588207
2012-02-21 23:33:58 -08:00
Jean Chalard cf9d92629c Give LastComposedWord knowledge of the committed word (A1)
There is no point storing the prospective autocorrect - we are
recomputing it anyway. The committed word however will be necessary
to implement feature request #5968922.

Change-Id: I588c18e1a5a1050a791d601de465f421ccbe36cd
2012-02-21 23:12:21 -08:00
Tadashi G. Takaoka 1b3c16c183 Merge "Add next/prev navigate action more keys and remove tab key" 2012-02-21 23:09:58 -08:00
Tadashi G. Takaoka 05bfd189a8 Add next/prev navigate action more keys and remove tab key
Bug: 6037537
Bug: 5961814
Change-Id: I9c6dedf953452a180fcd5bce7bfadfd3c821f224
2012-02-21 22:50:50 -08:00
Jean Chalard 5262fe8832 Dismiss the hint on a non-word-starting non-separator
This would happen when a character is not a separator but is not
a word starter. Such characters include single quote and
dollar, and others non-letter, non-separator chars.
We set the bigram predictions if any - if not so configured, this
will fallback on setting back punctuations into the strip.

Bug: 6010408
Change-Id: Id203bbe87f8c13de0d5027b555c9067c7ec98f92
2012-02-21 21:16:18 -08:00
Jean Chalard b141c9cd3f Rename resources to reflect current usage
Bug: 6010403
Change-Id: Ia02ff31007296fdf6901504f238dfd9e4621f658
2012-02-21 18:54:44 -08:00
Jean Chalard 8a3d369840 Remove a useles parens
...I could swear I had compiled :/

Change-Id: I4e1fb2b1dda0a4ceffe2082935395d05297c63ec
2012-02-21 16:53:05 -08:00
Jean Chalard 9a2a11e65b Rewrite a condition
Change-Id: I805c9579788d99b015feb2075ad4771756c7adc5
2012-02-21 15:46:53 -08:00
Jean Chalard 2649e42d75 Extract a method to reset the ime state
Change-Id: I921184b85b94418cf360508ee3f67e85b10b3d72
2012-02-21 15:12:01 -08:00
Jean Chalard 5eeff7cf54 Converge paths of an if() branch
This is to help with further refactoring.

Change-Id: Ib2459903862570cf7022fd90f2d5c524a6bbbe19
2012-02-19 18:02:40 -08:00
Jean Chalard 1044539080 Rename variables and add comments
Change-Id: I746f2364d9f02f22aa6ab57d7060013ee114f4e3
2012-02-19 17:26:41 -08:00
Jean Chalard 1fead1d5f1 Read the initial selection value.
It turns out this was available in an unexpected place.
Fixes both the following bugs
Bug: 5948469
Bug: 6023118

Change-Id: Ie1a91b8268540ea0f0df02bee94c3bbdeb0fa4c5
2012-02-17 20:54:48 -08:00
Tadashi G. Takaoka beb08b398f Remove unnecessary and harmful KeyboardState.onUpdateShiftState call
This change also cancels double tap and long press timers if other
letter key is pressed after shift key.

Bug: 5693999
Bug: 6017610
Change-Id: I3b5f3debfb8915fa73a93b409a38afadf24132e9
2012-02-16 18:02:17 -08:00
Charles Chen 4baf767fac Merge "Improved shift key and symbol/alpha switch key accessibility feedback." 2012-02-09 15:33:40 -08:00
Jean Chalard accd2a9f61 Merge "Add finals" 2012-02-08 19:08:09 -08:00
Jean Chalard a828f613a8 Merge "Some more simplification" 2012-02-08 19:05:46 -08:00
Jean Chalard 8ff0564f6a Add finals
Change-Id: Ib81be9a0df34c5e9fc49d2b5d9bf02297ea2b499
2012-02-09 11:40:54 +09:00
Jean Chalard 6a800b253f Some more simplification
Remove useless method calls, and ultimately remove useless
method.

Change-Id: I3f353b1b37460d5e9ceae5cb5dde3fff0da81c21
2012-02-09 11:38:03 +09:00
Jean Chalard 4721427c7d Allow revert swap punctuation again
This may not be the best behavior, but it's the same as ICS.
Bug: 5981844

Change-Id: Ibb7798e2a315312310ed3be4e731d0fe1ac04456
2012-02-09 11:34:00 +09:00
Tadashi G. Takaoka 7a39bd4454 Shift+Smiley key will register newline character of textMultiLine
This change also
 * Honors the custom action label in EditorInfo.actionLabel.
 * Invokes InputConnection.performeEditorAction if action is specifed
   at EditorInfo.imeOptions or actionLabel/actionId.
 * Stops using InputMethodService.sendKeyChar. Implements
   sendKeyCodePoint instead.

Bug: 2498607
Bug: 5961809
Bug: 5368408
Change-Id: If4cd5eb3dacfc6b6a7ea434b0617c2438e06e42d
2012-02-08 19:31:35 +09:00
Jean Chalard e771fc2f1a More simplification
A suggested punctuation is sure to be 1 character and a word separator,
so the isSuggestedPunctuation() test is redundant.

Change-Id: I3d31f0825f069f64d514682e46be62afdae25291
2012-02-08 18:17:51 +09:00
Jean Chalard 8174373a0e Merge "Remove a nested edition occurence" 2012-02-07 19:42:35 -08:00
Jean Chalard 5a6daf46cf Merge "Cleanup" 2012-02-07 19:42:26 -08:00