Commit Graph

962 Commits (ea92b7b987abbaadf5aa2cccf96e8fab4f3ab612)

Author SHA1 Message Date
Jean Chalard 611a5bdf65 Refactoring
Change-Id: I2f92c01fa1ff6b318128d387f26942b5d47de3e0
2012-03-05 18:36:51 +09:00
Tadashi G. Takaoka c208f4dfb7 Make SuggestedWords immutable
Change-Id: I26bd82aee5ead84e40abfc3db5a48ed6d1e42361
2012-03-05 17:24:30 +09:00
Jean Chalard 895b70b8af Move some treatment to a more sensical place.
It makes more sense to catch words with the safety net in
updateSuggestions() than in showSuggestions(). Also, it's useless
to do it in updateBigramPredictions, because the result will
always be provably false.
This will also help with writing unit tests.

Change-Id: Ifab81e6c5a74b1aa75cf85ef7742fee69a98f5ce
2012-03-05 14:27:49 +09:00
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
Jean Chalard 862f950da3 Cleanup
Remove a useless test (we can only come here if the code
is not a separator, as we are only called from onCodeInput
inside an explicit test).

Change-Id: Icd996a5a1c18a550117a144a1d35f167b96211f7
2012-02-08 12:06:18 +09:00
Jean Chalard 2124bc5bf5 Remove a nested edition occurence
This was harmless but confusing

Change-Id: Ic271f80d3dadf01b29e3875c6a8ad51b99a936f9
2012-02-08 12:03:55 +09:00
Jean Chalard 2e2d6b4d40 Small simplification
Change-Id: I55f81f3ab427fd5b28bb1f31960077cd1897cbd0
2012-02-08 11:41:15 +09:00
Jean Chalard 1b986cc488 Merge "Fix a bug with manual pick then dotcom key" 2012-02-07 16:59:47 -08:00
alanv 8d4f0d5d1d Improved shift key and symbol/alpha switch key accessibility feedback.
Bug: 5933165
Change-Id: Id71f38874640785b7ad43b7a70e27f40c13be748
2012-02-07 13:14:18 -08:00
Tadashi G. Takaoka 69f672a4b3 Merge "Remove unused InputConnection argument" 2012-02-07 04:15:07 -08:00
Jean Chalard 12d67e6d5d Fix a bug with manual pick then dotcom key
Inhibit adding phantom space for tld keys even if the last
character inserted in the textview is not a dot

Change-Id: Ie92554ead7a18c932480905c5738aff7c0159a32
2012-02-07 20:36:48 +09:00
Tadashi G. Takaoka 64eaa67eb5 Remove unused InputConnection argument
Change-Id: Ic45c8c6e7730775654317fb6e2d1cb64f9031f46
2012-02-07 19:38:06 +09:00
Jean Chalard cfec7e72fd Merge "Fix a race condition that makes tests unstable" 2012-02-07 02:28:12 -08:00
Jean Chalard 816a8a0fd8 Fix a race condition that makes tests unstable
Change-Id: Ic19d380eb64855884bc6ded8547c200dd772ffe9
2012-02-07 19:22:37 +09:00
Jean Chalard 172a013ab5 Fix a bug with the auto-correct indicator
Bug: 5969106
Change-Id: I02d4b9184bb2c3fc0d08ffd5db77a9f9d816631f
2012-02-07 17:20:23 +09:00
Jean Chalard a7f2500001 Fix a bug with common objects.
Bug: 5961179
Change-Id: I452efc552c6ab390931f25557d7aee5a64bf054e
2012-02-06 18:41:00 +09:00
Jean Chalard fb684cebe8 Stop inserting a space after a manually picked word.
Bug: 4994861
Change-Id: I6ae256a94dbaddea4304304779d17025620c5025
2012-02-03 18:45:44 +09:00
Jean Chalard 51fd1632f5 Stop throwing an exception in some corner cases.
When the application is modifying the text under our feet,
we may come through this code path. We should log the error
rather than crash.

Bug: 5869235
Change-Id: Ic0fd24c3bc805d44c5db0ad781ddebeca0450614
2012-02-02 15:15:55 +09:00
Tadashi G. Takaoka ff858c7ff5 Use MoreKeySpecParser to parse puctuations strip resources
This change also
  * Doesn't use Key.getRtlParenthesisCode to get correct parentheses
    code in RTL context. Intead uses the outputText feature of
    moreKeys specification.
  * Move CVS string parser from KeyStyles to Utils.

Bug: 5948247
Change-Id: I45752c7d01b4f7d3f3da900b110a2185b336a1f0
2012-02-01 19:33:26 +09:00
Tadashi G. Takaoka a5c96f376a Move long press shift handling from PointerTracker to KeyboardState
This change also
  * Rename phone shift keyboard to phone symbols keyboard.
    Use CODE_SWITCH_ALPHA_SYMBOL code to switch between phone and phone symbols keyboard.
  * Remove phone symbols keyboard from tablet.
  * Introduces enableLongPress flag of Key.keyActionFlags attribute.
  * Remove clumsy long press code from PointerTracker.
  * Remove CODE_CAPSLOCK handling from LatinIME.
  * Make KeyboardSwitcher to invoke haptic and audio feedback.

Change-Id: I00e1f697a10ab5112aec75e36853b96246ff5054
2012-02-01 19:04:21 +09:00
Tadashi G. Takaoka 433ca6a46d Cleanup redundant methods of KeyboardSwitcher
Change-Id: I2ebeb8852177f6c6e30578d0bb3f372f488dc6c1
2012-01-31 17:18:14 +09:00
Tadashi G. Takaoka ca2f051cc1 Auto generate various shift states alphabet keyboard automatically
If any shift state variants of alphabet keyboard layout is not
specified in KeyboardSet.Element, it will be automatically generated
from base alphabet keyboard definition.

This change also
  * Eliminates KeyboardShiftState object from Keyboard.
  * Removes various set shift state methods from Keyboard.
  * Removes KeyboardSet.Element.elementAutoGenerate attribute.
  * Separates "sticky" Key.backgroundType to "stickyOff" and "stickyOn"
  * Add preserveCase flag to smiley, .com, and labeled special keys.
  * Rename KeyboardShiftState class to AlphabetShiftState.
  * Rename some attributes from *UppercaseLetter* to *ShiftedLetterHint*.
  * Introduce shiftedLetterActivated to Key.keyLabelFlags

Change-Id: I01a0a8efeeaa76820ae728a5bdfa8d02b6ce74b7
2012-01-31 12:55:45 +09:00
Jean Chalard c7c152de4b Guard against wrong auto-correction cancellation (A6)
This deactivates the cancellation at each separator pressed while
not composing a word. The net effect is to fix
Bug: 5875776

Change-Id: I67aa3f842ddff250828c60596ad5a7e466c1ddaa
2012-01-26 19:57:37 +09:00
Jean Chalard b6b8729374 Straighten out resuming suggestion on kept word (A5)
This is cleanup.
This also introduces a "deactivated" state to the last committed
word, that can be used for
Bug: 5875776

Change-Id: I1855adb8ac8123f6d2c5365b0ae899145e5c3ba1
2012-01-26 19:24:36 +09:00
Jean Chalard 2712f23acb Remove mCommittedWordSavedForSuggestionResuming (A4)
Change-Id: Ia62ef33b5c777a258b02280bda1b8368780a7eef
2012-01-26 18:36:28 +09:00
Jean Chalard 2692a87007 Move some functionality into LastComposedWord (A3)
Change-Id: Ie0ea02a061dd0cb84db5f33113ff433584636bc7
2012-01-26 18:25:08 +09:00
Jean Chalard 267563d1bb Add a class for previously composed data (A1)
Change-Id: I87498799e6a48b8fa65924a098bb0ceb7626dce1
2012-01-26 17:22:52 +09:00
Tadashi G. Takaoka bd51aaf98f Merge "Warn deprecated privateImeOptions, "nm" and "forceAscii"" 2012-01-25 22:20:35 -08:00
Jean Chalard 051ac1ef14 Merge "Add a guard against OOB." 2012-01-25 21:22:18 -08:00
Jean Chalard 8be16f78b1 Add a guard against OOB.
...and avoid crashing in one case where the application may
change the text while we are typing.

Bug: 5685922
Change-Id: I4a22c63168986f43ac84f512aaa4267023d536e3
2012-01-26 14:17:48 +09:00
Tadashi G. Takaoka 4f5c3a2898 Warn deprecated privateImeOptions, "nm" and "forceAscii"
Public API EditorInfo.IME_FLAG_FORCE_ASCII has been supported by
I6665b483.

Change-Id: I0ffdee15d8177d126cd8fe86a6bc4ab21be58c36
2012-01-26 13:37:35 +09:00
Jean Chalard fda847a870 Small cleanup
All calls to this method are done with the same parameter,
and it's really hard to understand if we call upon this
member inside.

Change-Id: I787664bb59053ab0fe666ed812fb12b2b9090918
2012-01-26 11:40:16 +09:00
Jean Chalard 0bfe359ee4 Add a test for auto-correction.
Fix two related subtle bugs:
- Stop singling out fat-finger-only corrections for rejection
  when touch coordinates are not available.
- Remove a racy check that would happen only in debug mode

Change-Id: Ic904f9b27c091ca6b369052c4e65a630bff81257
2012-01-25 19:29:40 +09:00
Jean Chalard 77da3d5a3b Fix a bug where backspace would not delete the selection
Bug: 5699301
Change-Id: I6c5a8470464d045349ac38e191c859b5c34cbeee
2012-01-24 18:07:23 +09:00
Jean Chalard 5fd11a7f33 Fix a typo
Change-Id: I358350c959d5610214a752b14d7744fe83eb3821
2012-01-24 11:58:07 +09:00
Jean Chalard 7c177e82af Merge "Fix a bug where a check would fail" 2012-01-20 01:16:44 -08:00
Jean Chalard 7546ff6e34 Fix a bug where a check would fail
Bug: 5894393
Change-Id: I810de58730f2cabcaf7b8dc1d85b3725f959094b
2012-01-20 18:09:59 +09:00
Jean Chalard af9fe5c5fc Fix a bug where the user typed word would not be passed.
Bug: 5894271
Change-Id: I4f02ff322697159e08f5e898608c0aff11dacb2f
2012-01-20 15:39:06 +09:00
Jean Chalard 250cf0a781 Merge "Fix a bug with backspace happening after a manual pick." 2012-01-19 01:55:30 -08:00
Jean Chalard 3b2112e70a Fix a bug with backspace happening after a manual pick.
Bug: 5884397
Change-Id: I01f462075bcbf7da38e9af2084ecd37143923e8b
2012-01-19 18:41:02 +09:00
Jean Chalard 95a6e58ebc Small code simplification.
I'm pretty sure the test here was useless.

Change-Id: Iaece641fbd5455406533b19555f2b639759a525f
2012-01-19 18:03:45 +09:00
Tadashi G. Takaoka 5731b939c7 Remove KeyboardSwicther.toggleCapslock
Change-Id: Id613c06e2df770659095d78d42637aed063d0c70
2012-01-17 19:26:24 +09:00
Tadashi G. Takaoka 2a88440419 Rename KeyboardActionListener methods
* Rename KeyboardActionListener.onPress to onPressKey
* Rename KeyboardActionListener.onRelease to onReleaseKey
* Merge KeyboardSwicther.onPressShift, onPressSymbol, and onPressOtherKey to onPressKey.
* Merge KeyboardSwitcher.onReleaseShift and onReleaseSymbol to onReleaseKey.
* Merge KeyboardState.onPressShift, onPressSymbol, and onPressOtherKey to onPressKey.
* Merge KeyboardState.onReleaseShift and onReleaseSymbol to onReleaseKey.

Change-Id: Icf28fd18e238c5e534c292893e4ab5b6b98e72f8
2012-01-17 19:07:20 +09:00
Tadashi G. Takaoka c9fade6b87 Merge "Remove toggleShift and toggleAlphabetAndSymbols from KeyboardSwitcher" 2012-01-17 00:07:38 -08:00
Tadashi G. Takaoka 87e025da11 Remove toggleShift and toggleAlphabetAndSymbols from KeyboardSwitcher
Change-Id: I9bb8f78b0a766cd7937d5cbe1c1e5e35898b2997
2012-01-17 16:49:33 +09:00
Jean Chalard d104a7aac8 Merge "Fix a bug where words disappear on inserting separators" 2012-01-16 23:22:03 -08:00
Jean Chalard edc6395d9b Fix a bug where words disappear on inserting separators
The basic idea is that in some situations, we would restart
suggestions, but before evaluating them we would bail out
because suggestions were not requested. This would lead to
the "correction" set to null, so we would commit a null word.

This fix does two things:
- Do not restart suggestions when not requested.
- If we still end up with a composing word when suggestions
  are not requested, we select the typed word as the
  correct version.

Bug: 5846646
Change-Id: Ic35351841d0cb20afa99092ef681ecb7bd68bec6
2012-01-17 16:16:52 +09:00
Jean Chalard aed5819a84 Merge "Fix a bug where suggestion would restart at a bad time" 2012-01-16 22:51:23 -08:00
Jean Chalard fbd1ac8083 Fix a bug where suggestion would restart at a bad time
Bug: 5846646
Change-Id: I7c907d0a9478e0878b92ead94173caefc21b627b
2012-01-17 15:50:18 +09:00
Tadashi G. Takaoka 1ef6fc7e15 Support EditorInfo.IME_FLAG_FORCE_ASCII
Bug: 5850605
Change-Id: I6665b483f775094903f2e26f5584e4b141592ab5
2012-01-17 14:38:00 +09:00
Jean Chalard a8ba49c253 Small cleanup
The method deleteWordAtCursor would call finishComposingText,
which is a very unexpected state change and would probably cause
surprising bugs to any parent that would call it.
As it happens, it's not used anywhere any more so let's just
remove it.

Change-Id: Iaa9200866e40b4e914f76baa987279948300679c
2012-01-17 11:55:23 +09:00
Jean Chalard 72d285f4d7 Add some comments about resuming auto-suggestion
Bug: 5846646
Change-Id: Ib2c76ec173972eb7acadbfaae7e930849d546721
2012-01-17 10:29:11 +09:00
Tadashi G. Takaoka 9751a626ec Don't cache resource value that depends on orientation
Bug: 5794655
Change-Id: Ib324366c772e20bb54aba63c2f4540dc0f9de515
2012-01-16 12:26:34 +09:00
Jean Chalard ab34a4a7f5 Merge "Fix a bug where last candidate would not be reset" 2012-01-11 21:47:35 -08:00
Jean Chalard a8c8ab1cb4 Remove an excessive parens
Change-Id: If8aa4253ab0f664e628ed7f4d7a3adc02a898cc7
2012-01-12 14:07:56 +09:00
Jean Chalard 9de5cfc67a Fix a crash where revertSwap would be wrongly called
This would crash the program when inputting a punctuation
symbol that should not swap with a weak space through the
suggestion strip, then press backspace.
Those include all two-part punctuation symbols in French for
example, as well as magic space strippers like the dash in
English. For English all suggestion strips symbols happen to
be magic space swappers so this would not happen in English
by default.
Also fix a typo.

Change-Id: Ia40678c264e978509b5786290a75a3c57181648e
2012-01-12 11:55:40 +09:00
Jean Chalard cd2286fff1 Fix a bug where last candidate would not be reset
Bug: 5851148
Change-Id: Ic270318842d8e16bc62d78d5fe0d6be0ca1fb532
2012-01-12 11:16:51 +09:00
Tadashi G. Takaoka 8cab0b56eb Get rid of Keyboard.CODE_DUMMY
Change-Id: Id2320f4d9b5f22f0ac844ab20ce42b0c4e7c6880
2012-01-10 18:19:36 +09:00
Tadashi G. Takaoka ee4be6e3c6 Call KeyboardState.onUpdateShiftState from onCodeInput if code is a normal letter
This will be helpful to write unit test code.

Change-Id: Ib61cc46ac547084e0dc9ecd3a50814fecf08ace2
2012-01-10 15:13:05 +09:00
Jean Chalard 0fd625bcfd Fix a bug with wrong auto-correct cancellation
Auto-correct cancellation would sometimes kick in at
wrong times, causing crashes.

Bug: 5784542
Change-Id: I68dd6b8d9237ce9b66af2dc63e77ba6dd5fd69dd
2011-12-21 19:28:02 +09:00
Jean Chalard 9e8761c440 Reorganize the auto-correction memory
Change-Id: I31cce9db471dcd4a7b3477bcb037a8ff482b7696
2011-12-19 17:33:15 +09:00
Tadashi G. Takaoka 3708787fe9 Remove LatinKeyboard class
Change-Id: I68c667b00dadf2ed9f1c62fb7da37d2cf499cd81
2011-12-18 19:10:42 +09:00
Tadashi G. Takaoka 4112dc0500 Move spacebar drawing code from LatinKeyboard to LatinKeyboardView
Also this change moves LatinKeyboard attributes,
autoCorrectionSpacebarLedEnabled, autoCorrectionSpacebarLedIcon,
spacebarTextRatio, spacebarTextColor, and spacebarTextShadowColor to
LatinKeyboardView.

Change-Id: I7cc27ce1fc550e9f620a9ed0fbe4b8172902d5a1
2011-12-18 19:07:12 +09:00
Tadashi G. Takaoka 22b48de11c Get rid of Key.needsSpecialPopupHint and related
Change-Id: I28e87ea3af9581f12094770b42f113e9018886c4
2011-12-18 16:08:28 +09:00
Jean Chalard 43c0a034bd Merge "Pretty print for InputAttributes" 2011-12-16 04:01:49 -08:00
Jean Chalard 4d0f03bd66 Remove a write-only variable.
Change-Id: I825307a429f46b31ed9bd940b5a97d2713127dfe
2011-12-16 20:54:58 +09:00
Jean Chalard 6fa003ee23 Pretty print for InputAttributes
Change-Id: I5e4b2b6f3cd943c8f6187aaed21d67ec786bf5df
2011-12-16 20:53:44 +09:00
Jean Chalard 2b2c0b574c Merge "Use the WordComposer to check if we are composing a word" 2011-12-16 03:47:34 -08:00
Jean Chalard 80b66bb166 General cleanup.
Move variables around, inline useless functions, remove
useless local variables.

Change-Id: Icb89d8b211a2ad4bc3619137c2276a649c2a5e34
2011-12-16 20:36:32 +09:00
Jean Chalard 644c8b7c96 Initialize input attributes in the InputAttribute class
Change-Id: I103d6851f54f47cbffdb567fb0f4c505c4697b05
2011-12-16 20:35:16 +09:00
Jean Chalard ccc35f7fa7 Make applicationSpecifiedCompletionOn final.
This is the last one (whew)
Also move a somewhat unrelated initialization out of the
input attribute initialization function.

Change-Id: Icc77b32fd16b112ab43786715061b1c9dca31c04
2011-12-16 19:09:01 +09:00
Jean Chalard 9cc1312eee Make inputTypeAutoCorrect final.
Change-Id: I550eba1fc3fa2843d007a8208d81fad208c1196b
2011-12-16 19:08:52 +09:00
Jean Chalard 13db05f930 Make isSettingsSuggestionStripOn final.
Change-Id: Iabb99a7f8f3f1777f9a87ae2bddff9795a50fa92
2011-12-16 19:08:13 +09:00
Jean Chalard 1ba17f97d5 Small refactoring
This helps to make following changes smaller

Change-Id: I95ba2901ac3bf1ed70a748c35a0babdd9af1df63
2011-12-16 18:21:26 +09:00
Jean Chalard ae0c109d11 Make insertSpaceOnPickSuggestionManually final.
Change-Id: I32fce0ea8c5c58b6f920d0758c8bf57769f39a12
2011-12-16 18:04:39 +09:00
Jean Chalard 4e8922f1be Use temporary variables for computing editor attributes
The ultimate intent is to make these variables final,
which will allow to move the computing function to the
InputAttributes class.

Change-Id: Ifb1fc7321a19b10d60aa63fa0daaa2708deda2cf
2011-12-16 18:04:17 +09:00
Jean Chalard dc9d0fcc11 Create a class for input attributes.
Change-Id: I834390c83865aac59fb758d5c66cf9b74103abd8
2011-12-16 18:03:16 +09:00
Jean Chalard 196d82cdd7 Use the WordComposer to check if we are composing a word
...instead of the hard-to-understand mHasUncommittedTypedChars.
This is possible because now the word composer is actually aware
of commits.

Change-Id: I36b664ce8402a280f801e87b9ebe161f416b0853
2011-12-16 15:58:29 +09:00
Jean Chalard be2f81f055 Merge "Make the word composer aware of commits." 2011-12-15 22:54:23 -08:00
Jean Chalard c73c26790f Make the word composer aware of commits.
Change-Id: I04e691fbc9227d4df195429bca89edea93575347
2011-12-16 15:41:10 +09:00
Tadashi G. Takaoka 8c3d5b6961 Add com.android.inputmethod.latin.suggestions package
Change-Id: If4b823768ab9c073625da3034ecc8091be1df230
2011-12-16 14:21:44 +09:00
Tadashi G. Takaoka e9a0efc242 Merge "Cleanup unused variables and parameters" 2011-12-15 18:02:38 -08:00
Tadashi G. Takaoka 2ac5988f84 Cleanup unused variables and parameters
Change-Id: Iad756a7a775c93f3344c6962e7b3456ef8339490
2011-12-15 20:26:12 +09:00
Tadashi G. Takaoka 23d27fefcb Fix auto correction spacebar LED
Change-Id: I4894d188d5612380cc9f8eec7cb72544e37fb2b0
2011-12-15 17:34:14 +09:00
Jean Chalard f3ca6a59a7 Cleanup
Change-Id: I724df0be7ac07ffb9f1f4974175aed5a2606221b
2011-12-14 18:42:47 +09:00
Jean Chalard 1c6cf26c37 Move some code inside a function to simplify flow
Also rename the function to reflect better the behavior.
An upcoming change will clean up the remnants

Change-Id: I19bdf0d9e95f62ee749e1f64fe17132c4a5ef0bc
2011-12-14 17:56:57 +09:00
Jean Chalard 46798d8f1f Fail faster in case of a bug
Change-Id: Ibea64133f200dce80034c641d4798b62843a2512
2011-12-14 17:54:18 +09:00
Jean Chalard b588003426 Refactoring.
Small simplification of the code.

Change-Id: I1f67ae529bbb2c9316bf5e083d367c57040ea22c
2011-12-14 16:59:25 +09:00
Tadashi G. Takaoka e35e13fc7d Merge "Record onStartInputView" 2011-12-13 23:31:43 -08:00
Jean Chalard dbdb385bb0 Merge "Fix a long-standing race condition." 2011-12-13 23:29:47 -08:00
Jean Chalard 514beb0992 Fix a long-standing race condition.
Upon autocorrection, there is visual feedback in the text
view that quickly flashes the background of the text that
just changed. This fixes a race condition that happens
upon autocorrection when typing fast, and that results in
flashing one character too far left (typically, the flashing
area includes the whitespace before the corrected word and
not the last character of the corrected word).
This happens because the call to commitCorrection may
happen before or after the IPC sent by sendKeyChar, but the
arguments are fit only for the case where it arrives first.

Change-Id: I9b5442a665aad5a9bc66cd49228075b9056b37fa
2011-12-14 16:24:18 +09:00
Tadashi G. Takaoka 7ef235f53f Record onStartInputView
Bug: 5722703
Change-Id: I56bcf6ccde82b4176093de4f197a8736b0cc8c10
2011-12-14 16:22:30 +09:00
Jean Chalard 8e3faff244 Merge "Decouple member logic from control flow" 2011-12-13 06:28:48 -08:00
Jean Chalard 7b5bc1ff4d Decouple member logic from control flow
This place is very confusing because a member variable with
a consistent meaning is hijacked for the duration of a function
to mean something else. This is in the way of easy-to-understand
refactoring.

Change-Id: If79bc771950d6bfc0ad5f0e9c51c7ef1dbb45b66
2011-12-13 23:15:12 +09:00
Jean Chalard f7d6517d6b Various mini-cleanups
- Stop the word composer from escaping - take a page from the law
  of Demeter and only report what is actually needed.
- Fix typos in comments.
- Add a comment for a fishy processing.
- Remove a useless local variable.

Change-Id: I5fa78901cbb5483fc9683bfb7094f47244b85df6
2011-12-13 23:09:22 +09:00
Jean Chalard edf4995a3b Merge "Remove the input connection sidework from handleCharacter" 2011-12-13 04:28:30 -08:00
Jean Chalard dafa7a8e15 Remove the input connection sidework from handleCharacter
Change-Id: I3d376dfda3acd8864274390de3ff5752b18456e0
2011-12-13 21:12:07 +09:00
Jean Chalard 117fc93f37 Move mBestWord to the word composer.
mBestWord has a confusing name - it's actually an auto-correction.
It's cleaner if it lives in the word composer because an
auto-correction should be tied to a specific user input, and
should be reset each time the user input changes to avoid
race conditions.

Change-Id: I718d29395bc747372067e6440e090c6a181994ae
2011-12-13 21:06:51 +09:00
Jean Chalard 7e6f4daa19 Merge "Tighten conditions for space-related cancelling" 2011-12-13 01:23:15 -08:00
Jean Chalard 77d59b0691 Consolidate underlining code under one function.
Change-Id: I4393ff1ec28a6b3118d1344dd6d82d04899dea42
2011-12-13 17:42:27 +09:00
Jean Chalard 8ad4013406 Tighten conditions for space-related cancelling
Instead of ignoring silently a found bug, throw an exception.

Change-Id: I0aa96d0cab022b6a5e7cffe8a592dcc443c3c7a8
2011-12-13 17:40:06 +09:00
Jean Chalard 14cb8448df Remove a useless return
Change-Id: Iefe10e94e2d88171387351a5b6cab52e281d0f76
2011-12-13 16:48:28 +09:00
Jean Chalard 2939063947 Simplification
Both tests have the same meaning. They should be merged.
Also, if "deleteLast()" deletes more than one char (which
never happens in the current implementation, but it's not
guaranteed), the new code is more correct.

Change-Id: I216df7cd45f4a7d76d1d5d6aa7f8d7f9a6e35ea3
2011-12-13 16:06:00 +09:00
Jean Chalard d2c69c7d12 Refactoring
If mHasUncommittedTypedChars is true, then
mWordSavedForAutoCorrectCancellation must always be null, and
spaceState must always be SPACE_STATE_NONE.
Hence, this change is supposed to be very no-op.

Change-Id: I2716f7372d996cc4dec40a4b7ac1ee7f5f4afe91
2011-12-13 16:04:11 +09:00
Jean Chalard 2245c3b5b3 Refactor + small bugfix
postUpdateShiftKeyState used to be called also when
mEnteredText is not null => this is a bugfix.
The rest does not change the logic, as posting a message can
be done anywhere within the function with no impact.

Change-Id: I7888797c0778702d64f96701e35b611a55a6a259
2011-12-13 15:59:36 +09:00
Jean Chalard a2a85d45e0 Refactoring
Change-Id: I57b2232f7fde32df5f6e1925aad1df988def34f9
2011-12-13 15:38:49 +09:00
Jean Chalard 34081186f9 Merge "Fix a bug where revert auto-correct would revert too much" 2011-12-12 04:46:27 -08:00
Jean Chalard 5c3ff4c9c8 Fix a bug where revert auto-correct would revert too much
If there are no uncommitted chars, we shouldn't enter any of
the tests that follow. We didn't use to, but a change today
made it possible - it should not happen.
There is no point in doing the rest of the tests, they are
sure to fail.

Change-Id: I580dd104aff3585de72a93b38989bfd9713f615b
2011-12-12 21:27:16 +09:00
Jean Chalard 4f41cbc588 Remove a useless function call
Change-Id: I1a775cbf90dca301e1e6b596ddac64fdbc023199
2011-12-12 20:51:43 +09:00
Jean Chalard dcf8a6b2c6 Merge "Move a settings var to the settings class" 2011-12-12 03:31:42 -08:00
Jean Chalard 2a659b8aa6 Remove a useless variable
This can be just read when it's needed.

Change-Id: I00753fe55645c244db5d4a96e7fdb8f5325475d9
2011-12-12 20:22:39 +09:00
Jean Chalard d567b230b0 Move a settings var to the settings class
Change-Id: I1331ad6dec3a9d64a77e314f8a1f4c29282df31b
2011-12-12 19:52:17 +09:00
Jean Chalard 7208af0ecd Remove a messy and unused class.
Today is a happy day

Change-Id: I3ef484bd258d5a59815bfcb0bd35ea3606b32430
2011-12-12 19:31:29 +09:00
Jean Chalard f162ed7ec8 Merge "Remove side-effects from TextEntryState" 2011-12-12 02:20:49 -08:00
Jean Chalard 406d192a9e Remove side-effects from TextEntryState
Change-Id: Ib98eea9e791e426435cfdfd0c9ab3ed9061664aa
2011-12-12 19:19:39 +09:00
Jean Chalard c2a76a1529 Remove a useless variable.
Change-Id: Iea5ce5cfc05bad8b1d9085438e90147bd54b7e9c
2011-12-12 16:49:32 +09:00
Jean Chalard 890d13189d Straighten out logic for revert word paths
This also includes a new memorized string with simpler
logic that will allow to remove other members

Change-Id: I0b97243084902e68fcb835b6163c86fef8190ebc
2011-12-12 16:41:49 +09:00
Jean Chalard 86344836ee Merge "Remove a duplicated variable." 2011-12-11 21:26:31 -08:00
Tadashi G. Takaoka 2ba1bcccdd Remove unused Keyboard.CODE_CANCEL
Change-Id: Ic2eab17e525901a1cf7096ebe7d24ae78624ed2e
2011-12-12 12:56:30 +09:00
Jean Chalard 3651220327 Remove a duplicated variable.
This is awesome cleanup.

Change-Id: I35ce8940a13f3084630dc26d6e7e397acfdaac36
2011-12-12 12:06:41 +09:00
Tadashi G. Takaoka 963abf4bcc Merge "Remove unused public methods from KeyboardState and KeyboardSwitcher" 2011-12-09 04:38:14 -08:00
Tadashi G. Takaoka df9deffba2 Remove unused public methods from KeyboardState and KeyboardSwitcher
Bug: 5708602
Change-Id: I3dbc3cd00aa9ddf611e2078ff2cfea8945fa09bf
2011-12-09 21:14:13 +09:00
Jean Chalard 0fe3611bee Resolve TODOs: add some members to store prefs
Change-Id: Idf09cb5d801e8008eb63cbb5138058faeb7db136
2011-12-09 20:16:57 +09:00
Jean Chalard c207e0a7da Move settings variables to the settings class
Change-Id: Ifa7033a84b08ea626eb44cf6d04ba8e28c250bea
2011-12-09 16:47:31 +09:00
Jean Chalard 284c8a0449 Merge "Stop a flag from escaping." 2011-12-08 23:14:15 -08:00
Jean Chalard 4606de117b Stop a flag from escaping.
The ultimate intent is to close it up in the settings, as it does not
change while typing, only when the keyboard is open again.

Change-Id: I12ff56e7482c1584877fe5531473bf03e95a60f6
2011-12-09 16:09:04 +09:00
Jean Chalard ed43296217 Move settings method from Utils to SettingsValues
Change-Id: I633378a41f63cd492b8c9345d550e07254df5e5a
2011-12-09 16:03:10 +09:00
Tadashi G. Takaoka a76c62e92d Merge "Remove direct calls of setKeyboardXXX from KeyboardSwitcher" 2011-12-08 21:33:09 -08:00
Tadashi G. Takaoka 96c56cb577 Remove direct calls of setKeyboardXXX from KeyboardSwitcher
These calls, setAlphabetKeyboard, setSymbolsKeyboard, and
setSymbolsShiftedKeyboard have to be call backed from KeyboardState.

Bug: 5708602
Change-Id: Ibbe1a21bd10bf942e17886869c0ab0fa1735b87e
2011-12-09 13:26:11 +09:00
Jean Chalard 7a16a061e6 Extract Settings.Values to a new class
This is pretty much automatic refactoring. Thanks Eclipse!

Change-Id: I8ccd24d11878445c836347e9c487c91461eee9cd
2011-12-09 12:40:50 +09:00
Jean Chalard 283b0c2b64 Cleanup
Here, shouldAutoCorrect implies mSettingsValues.mAutoCorrectEnabled

Change-Id: I9256718dd63b75252d1454e264db6814bbf18aa5
2011-12-08 21:37:15 +09:00
Tadashi G. Takaoka eef6238f94 Move SWITCH_STATE related stuffs to KeyboardState
Bug: 5708602
Change-Id: I904ec370e3761c47af17a680c0932ec98cfd3c27
2011-12-08 16:12:49 +09:00
Tadashi G. Takaoka 6b7100feca Don't execute pending onStartInputView if EditorInfos are equivalent
Bug: 5722732
Bug: 5722867
Change-Id: I8347c258b286c3329f318d50adf205e78e49c722
2011-12-07 22:39:13 +09:00
Tadashi G. Takaoka 8a70e70c84 Remove toggleSymbolsShift and rename toggleKeyboardMode
Bug: 5708602
Change-Id: Iadef3e862d00505d1d9f588d0d64445754d7b962
2011-12-06 18:12:34 +09:00
Jean Chalard 55042ff977 Merge "Resume suggestion when backspacing to the end of a word" 2011-11-29 01:15:42 -08:00
Tadashi G. Takaoka b230806f44 Merge "Save keyboard layout only when it is shown" 2011-11-29 00:53:38 -08:00
Jean Chalard 6b1f500da4 Resume suggestion when backspacing to the end of a word
Bug: 5515381
Change-Id: I26fea896feaf2e9716c7ae3d4f2630360f23ac50
2011-11-29 17:50:36 +09:00
Jean Chalard 117fc18ed4 Keep count of the trailing single quotes for suggestions
Bug: 5665809
Change-Id: I4d9100dbe980861ccb55c78464524be670cac1f7
2011-11-29 15:16:28 +09:00
Tadashi G. Takaoka f2c9a88887 Save keyboard layout only when it is shown
Bug: 5130446
Change-Id: I150b4a053036eae050099155169325f0d1f7dfed
2011-11-29 14:12:49 +09:00
Tadashi G. Takaoka 9324665263 Move ignore special key code out from LatinIME to PointerTracker
Bug: 5560766
Bug: 5639503
Change-Id: I34c9eea833516adf6ef1db58f1a64a5ef5322fa9
2011-11-22 17:49:12 -08:00
Jean Chalard 6d1cbbc2ff Fix a bug with single quotes
I14dd3815 special-cased single quotes at the start of a word, but
did not do so correctly - it would kill a composing word if entered
just after some punctuations.
The right test was not isCursorTouchingWord() but
mHasUncommittedTypedChars, which actually makes for a simpler
implementation.

Bug: 5648032
Change-Id: Icd21d213e0cad6da68cacfeb921502cd8dcfac95
2011-11-22 18:29:51 +09:00
Tadashi G. Takaoka e7eac906c0 Pending onStartInputView only if the EditorInfo is identical
Bug: 5604372
Change-Id: I2a88cf15b07eebd29e43e460f6ec758432181b01
2011-11-21 16:32:46 -08:00
Jean Chalard 19cbdfc92f Merge "Remove an unused (and scary) method" 2011-11-21 00:57:45 -08:00
Jean Chalard ce86e39e00 Merge "Cleanup." 2011-11-21 00:53:49 -08:00
Jean Chalard 5d5028f2c5 Remove an unused (and scary) method
Change-Id: I14a545a3e4955a25fde17554156552c755d44e2f
2011-11-21 17:45:32 +09:00
Jean Chalard 6ecd1e1280 Merge "Special case quotes at start and end of words" 2011-11-21 00:21:09 -08:00
Jean Chalard c83359f974 Special case quotes at start and end of words
Single quote at start of word is not considered a part of a
word any more.
Single quote at the end of a word now behave like capitalization:
lookup in the dictionary is done *disregarding* a final quote,
and it is forcefully added back into the suggestions afterwards.

Bug: 5566368
Change-Id: I14dd3815f4b743edba56d64a3abdf4b73d863a6a
2011-11-21 16:34:39 +09:00
Tadashi G. Takaoka e00ede531f am 5619d765: Shift/Symbol/Smiley will not disable settings/microphone keys
* commit '5619d7658459d13723b6d7ad8969b249adf9e717':
  Shift/Symbol/Smiley will not disable settings/microphone keys
2011-11-18 15:23:14 -08:00
Tadashi G. Takaoka 5dc318a3f2 am 10dff768: Fix NPE introduced by I38b21d49
* commit '10dff76856a98b6eec86a53d3d07fdc9708037b7':
  Fix NPE introduced by I38b21d49
2011-11-18 14:48:05 -08:00
Tadashi G. Takaoka 49cc3beb75 resolved conflicts for merge of 137667ed to master
Change-Id: I75fc5d278b002ab89dd2475d282d0ee4aede7817
2011-11-18 08:51:39 -08:00
Tadashi G. Takaoka 5619d76584 Shift/Symbol/Smiley will not disable settings/microphone keys
Bug: 5560766
Change-Id: Ic2dbb835e87a7debb222093756816e683b464b83
2011-11-17 23:32:19 -08:00
Jean Chalard 88562bec54 Cleanup.
Fix a typo, and move a cursor.close() in a finally{} clause

Change-Id: Iac011ebb80b9430774c7dc5cd94728d05cef443f
2011-11-18 15:24:49 +09:00
Tadashi G. Takaoka 10dff76856 Fix NPE introduced by I38b21d49
Bug: 5560766
Change-Id: Ic5eaebe0ef893c69ad90a777ebfa07807535a0e3
2011-11-17 21:46:24 -08:00
Tadashi G. Takaoka 137667ed3d Merge "Ignore microphone and settings key while typing" into ics-mr1 2011-11-17 18:01:43 -08:00
Tadashi G. Takaoka 175acb8205 Ignore microphone and settings key while typing
Bug: 5560766
Change-Id: I38b21d49b7e803bf94805ba8e13849b3c734e010
2011-11-17 16:01:31 -08:00
Tadashi G. Takaoka 60acfdf4a8 Skip loading keyboard when SoftInputWindow hasn't shown yet. (DO NOT MERGE)
This is cherry-pick of I003101b2 from Master for Bug: 5541192
Bug: 5636367

Change-Id: I560126d17be6a770b19c1f1347332ebdfde5d671
2011-11-17 14:30:54 -08:00
Tadashi G. Takaoka eb520c5683 am 549e295d: Fix updateFullscreenMode of LatinIME
* commit '549e295dc113bff50077c3c355dcd94af09a1b2f':
  Fix updateFullscreenMode of LatinIME
2011-11-15 18:25:21 -08:00
Tadashi G. Takaoka 549e295dc1 Fix updateFullscreenMode of LatinIME
Bug: 5597608
Change-Id: If4b18dc933493bd74bc5506c028af86b0450df1f
2011-11-15 15:15:11 -08:00
Ken Wakasa ed631627cb Double space conversion should be enabled only when the 1st space is "weak".
bug: 5608934
Change-Id: Ide7ca9d526620c4f225a6f5eb27dcd7df5b504bd
2011-11-15 12:35:22 +09:00
Tadashi G. Takaoka 1e39565bb4 Skip loading keyboard when SoftInputWindow hasn't shown yet.
Bug: 5541192
Change-Id: I003101b2a3fdeb5bb554d249634ec5ab50aea09e
2011-11-04 15:01:58 +09:00
Jean Chalard 2c77216e22 Remove trailing spaces when appropriate
Bug: 5509651
Change-Id: I99cfb5a6fc2873e2c11ed16967cd82a7f504a263
2011-11-02 19:44:26 +09:00
Tadashi G. Takaoka 6f811bd13f Merge "Make some private method static" 2011-10-27 22:57:58 -07:00
Tadashi G. Takaoka 8fbf29e2d5 Make some private method static
Change-Id: Ia23765268be0ef89d7fe7c3f5372ed32d6615765
2011-10-28 13:31:31 +09:00
Tadashi G. Takaoka 3122cf8daa am 07a44557: Merge "Cancel pending rotation when another rotation start" into ics-mr1
* commit '07a445572f7fa21c0e24f5cdb0f0b88ff2adc672':
  Cancel pending rotation when another rotation start
2011-10-27 22:59:14 +00:00
Ken Wakasa 644d33d60e Display "Touch again to save" in the keyboard locale
bug: 524239
Change-Id: I227c193ba149f9296f8b1cf40aa3d9cf4e6ae2ab
2011-10-28 00:33:15 +09:00
Tadashi G. Takaoka dd25e4fa2c Cancel pending rotation when another rotation start
Bug: 5516802
Change-Id: Iccb0abeb94e6dc1322a98a0c744188bb74034c7f
2011-10-27 17:03:03 +09:00
Tadashi G. Takaoka ef543c725e Merge "Use onCustomRequest to request haptick and audio feedback" 2011-10-26 07:54:23 -07:00
Tadashi G. Takaoka d999ea4480 Use onCustomRequest to request haptick and audio feedback
Change-Id: I958f274d8cfebb1551cdf08f1bada50c20fb9ca0
2011-10-26 23:32:38 +09:00
Ken Wakasa 44f4d77b75 am cb8cb95d: Fix NPE
* commit 'cb8cb95d0afd340de9f1a0e15948f0068d2450bc':
  Fix NPE
2011-10-26 14:25:28 +00:00
Jean Chalard 120586c226 Group special spaces and double/swapped spaces in undo mode
This introduces an elementary undo facility that accounts
for magic space, strong space, double space and its cancelling,
and swapped punctuation and its cancelling.
The former three were existing behavior ; this change adds
the swapped punctuation cancelling behavior.

Bug: 5454442
Change-Id: I87af633f30caa2788e9af725e556a7f0746d9a14
2011-10-26 19:12:55 +09:00
Ken Wakasa cb8cb95d0a Fix NPE
bug: 5512097
Change-Id: Id6752c95c9c4b39e7975daa187a2ab92b740060a
2011-10-26 02:35:44 +09:00
Jean Chalard d0c5f9395a Cleanup.
Remove a state that can never be reached, and ajust all the
callers that would always have received false.

Change-Id: Iac025568be11743428419e0772da306a4f0a0bf1
2011-10-25 21:57:30 +09:00
Jean Chalard 126698fdd2 Add a strong space behavior.
Bug: 5454442
Change-Id: Ic095cb65dd7b4427617cd74fc7c53a9666b218c4
2011-10-25 18:40:14 +09:00
Jean Chalard b715299125 Fix a cosmetic bug where text would blink on space swap
On space swap or space removal in some occasions there would be
a small blink on the screen. This change fixes that.

Change-Id: I486cbcc5dfcafd531b3fa92c4f9a3255832f22cc
2011-10-25 18:02:23 +09:00
Tadashi G. Takaoka b2b1eb5ca5 Call updateFulscreenMode before calling isFullscreenMode
Bug: 5495739
Change-Id: I25eab59833a8b95a0b75893d37a45e67504fa7d0
2011-10-24 15:30:49 +09:00
Jean Chalard 26a531c6fe Rename a flag
...and insert some explaining commands

Change-Id: Iff6511e71d66abfaea9f6c21c47f74fa0a67ad78
2011-10-21 19:59:46 +09:00
Tadashi G. Takaoka 49426a1ea9 Fix potential NPE
Bug: 5462524
Change-Id: I76012d1bbcd83d58f034c2f588802e4d1b7edc4d
2011-10-20 20:31:17 +09:00
Tadashi G. Takaoka 82c8c2e6c0 Add warning log for unexpected inputType
Bug: 5130446
Change-Id: I3484c75144ba68db0734a4d38186d2eafd1b1879
2011-10-19 16:53:07 +09:00
satok c5d51a40a4 am fe2d9079: Fix a bug that the typed word with the blue underline indicator will be duplicated
* commit 'fe2d90798ea409ee39d6f63942eb01bb7eed98e3':
  Fix a bug that the typed word with the blue underline indicator will be duplicated
2011-10-17 11:32:24 -07:00
satok fe2d90798e Fix a bug that the typed word with the blue underline indicator will be duplicated
Bug: 5466373

Change-Id: I0300c34cb6076b12ecb89cb29bea95288559108f
2011-10-17 13:25:22 +09:00
Tadashi G. Takaoka 6262fa5307 am ed6bc82d: Merge "Revert "Bug 5352720: IME_FLAG_NO_EXTRACT_UI is not enforced"" into ics-mr0
* commit 'ed6bc82d9785372c407e1a4f563ae7d30c479b8a':
  Revert "Bug 5352720: IME_FLAG_NO_EXTRACT_UI is not enforced"
2011-10-13 22:09:08 -07:00
Tadashi G. Takaoka d874ac581e Revert "Bug 5352720: IME_FLAG_NO_EXTRACT_UI is not enforced"
This reverts commit b1bc5fd896. (If3a73179)
Bug: 5410786
2011-10-14 12:15:24 +09:00
satok 22c2a23cda am 605a6fea: Merge "Fix the safety net Bug: 5453150" into ics-mr0
* commit '605a6fea750c4acc96a5136ecaf7162e0a858b9f':
  Fix the safety net Bug: 5453150
2011-10-12 23:46:25 -07:00
satok 605a6fea75 Merge "Fix the safety net Bug: 5453150" into ics-mr0 2011-10-12 23:44:54 -07:00
satok 2aa1dd45c4 Fix the safety net
Bug: 5453150

Change-Id: I5990feb2622738988bf29843c6bcdb9cbf8bbf33
2011-10-13 15:16:59 +09:00
Tadashi G. Takaoka 283d35cb6c am 62fb8a48: Merge "Take invisible extractArea height into account" into ics-mr0
* commit '62fb8a480df325ebc6b2a4dc023a944e3cd0bcef':
  Take invisible extractArea height into account
2011-10-12 12:00:44 -07:00
Tadashi G. Takaoka 62fb8a480d Merge "Take invisible extractArea height into account" into ics-mr0 2011-10-12 11:02:05 -07:00
satok e596fe2702 am ef0a7b75: Merge "Suppress flickers of the auto correction indicator" into ics-mr0
* commit 'ef0a7b75462c75b756caa09d9dd356309968abf3':
  Suppress flickers of the auto correction indicator
2011-10-12 10:10:41 -07:00
satok 604d80c671 Suppress flickers of the auto correction indicator
Bug: 5440788
Change-Id: I7832b449ee777dbd87388a02cebdfee0ce350fbd
2011-10-12 19:14:13 +09:00
Tadashi G. Takaoka d44647e76f Take invisible extractArea height into account
Bug: 5410786
Change-Id: I97ce2d72f86ce62b37d408103863af66f91e7107
2011-10-12 19:13:28 +09:00
satok a86869711e Merge "Add a settings to change the sound effect volume" 2011-10-11 06:29:11 -07:00
satok 79c0acf519 Add a settings to change the sound effect volume
Bug: 5345401
Bug: 5402541
Change-Id: I1e653573a3362160104b77388d6cbd1700424649
2011-10-11 22:25:13 +09:00
Tadashi G. Takaoka f44aeb6618 Fix haptic and audio feedback of caps-lock mode changing
Bug: 5435669
Change-Id: Ic1c1eb00d7e535a3ac602b9b505fd8bf43da5a8d
2011-10-11 15:27:56 +09:00
satok 602bcecf6b Merge "Put SuggestionSpan as the indicater of the auto-correction" 2011-10-10 02:58:22 -07:00
satok ec780e2868 Put SuggestionSpan as the indicater of the auto-correction
Bug: 5245468

Change-Id: Ia5609e1b3c69f5553e3632fbce60a55665a5b185
2011-10-10 18:44:52 +09:00
Svetoslav Ganov 7c2d7ad634 Merge "Let accessibility users know to connect a headset when the IME connects to a password field." 2011-10-07 15:36:04 -07:00
Jean Chalard 266ae6964d Merge "Fix a bug with the whitelist" 2011-10-07 02:50:11 -07:00
Jean Chalard 5f41b705fc Fix a bug with the whitelist
This bug would kill the case where the whitelist contains
a word to be autocorrected to an uppercased version of
itself, and the user would enter the uppercase version.
In this case, this bug would cause the typed word to be
killed off the list of candidates, and possibly autocorrected
to the *next* candidate.

When the whitelist checks whether this the typed word is
a candidate for whitelisting, this change has it check whether
the whitelisting results in the typed word before returning.
Hence, it can keep the case-insensitive behavior of the
whitelist.

Coincidentally, this change renames the method used to do
this, because it does not comply with the general contract
of Dictionary. This happens to be in the way of another
upcoming change.

Bug: 5420371
Change-Id: Ifb305271acc5f171adf9b18c762ae7975b14be0a
2011-10-07 18:40:23 +09:00
Tadashi G. Takaoka 416ee19d33 Add haptic feedback for caps lock
When long press triggers caps lock, the keyboard also triggers haptic
feedback.

This change also fixes trivial harmless bug in KeyboardSwitcher.

Bug: 5424681
Change-Id: I62706b49abd7be1dcebc3c5166ea03f426fc8c86
2011-10-07 13:57:49 +09:00
Alan Viverette b0c8db018d Let accessibility users know to connect a headset when the IME connects to a password field.
Change-Id: If96cd7626950dd12e88a8a97f5e405d303d41e06
2011-10-06 11:02:29 -07:00
Yusuke Nojima a25dd3b5c3 Merge "Pass the touch position correction flag from KeyboardSwitcher." 2011-10-03 04:42:53 -07:00
Yusuke Nojima 294e1b4a5a Pass the touch position correction flag from KeyboardSwitcher.
Change-Id: Ia242a9fa2fa71f7fdf8f974071a2df7acc4aa51f
2011-10-03 20:41:03 +09:00
Jean Chalard 45f45a4fdb Cleanup : remove recorrection-related stuff.
This removes UPDATE_OLD_SUGGESTIONS, and the associated settings.

Bug: 5402537
Change-Id: Ie87d4e05c54e4b7d2dd5a05f2d0b570e9cd3e463
2011-10-03 18:23:23 +09:00
Jean Chalard fe5364c825 Cleanup : remove old recorrection code
This removes the calls, but another change will be needed to remove
the messages LatinIME used to send itself to update the suggestion
strip.

Bug: 5402537
Change-Id: I5d1aa63a892516f339f3ceac21f43771b5ffda34
2011-10-03 17:45:45 +09:00
Jean Chalard cd95a36558 Fix a bug where moving the cursor would not reset selection
This change updates suggestions when the cursor is moved.
It is now reasonable to remove the explicit test for
TextEntryState.isAcceptedDefault because it is now shielded
by mExpectingUpdateSelection : actually, this probably fixes
a long-standing bug.

Bug: 5337309
Change-Id: Iee4046420c6a88d1a07d428230f93c3ebef25c39
2011-10-03 17:18:29 +09:00
Jean Chalard 397f6f8299 Merge "Small refactoring" 2011-10-02 23:12:41 -07:00
Jean Chalard 4c0fe57198 Small refactoring
Change-Id: Ifc33e109562abb3dd720ad4fed76add8ab1a64aa
2011-10-03 14:58:34 +09:00
satok 904baab25a Remove code related to AutoText
Bug: 5245751

Change-Id: Ic02f951e8e1dbde9d8964d2c16e4928fb374ca41
2011-10-03 14:38:44 +09:00
Tadashi G. Takaoka 59f8ca752d Skip successive InputMethodService callbacks after orientation changed
IME is called back four methods for each input field as a IME life
cycle. The four methods are onStartInput, onStartInputView,
onFinishInputView and onFinishInput.

After orientation changed, Those quartet methods will be called back
twice. This behavior of the framework might be a bug.

In order to restore the previous keyboard layout, we should skip
onFinishInputView and onFinishInput of the first quartet and
onStartInput and onStartInputView of the second quartet.

Bug: 4311428
Change-Id: I450ddc0cce5d00abc971ffd42a507a8a86682548
2011-09-30 10:38:32 +09:00
satok 074cda4d26 Update suggestions when user presses the backspace even when there is not two or more suggestions
Bug: 5384445
Change-Id: I419999da8f5745ac114d0173beeadcb365a8c3ac
2011-09-29 16:12:11 +09:00
satok 433965784d add vibration duration settings
Change-Id: I56a1a94df63160f367f866da759d7dd4fc428ed5
2011-09-29 11:46:20 +09:00
Tadashi G. Takaoka ffd156c77e Postpone onDisplayCompletions until onStartInputView has been executed
Bug: 5108267
Change-Id: I42d297ce4e4913e5dab5f5d647b1d13dc860b884
2011-09-28 09:36:40 +09:00
Gilles Debunne 8d6fd877c5 am b1bc5fd8: Bug 5352720: IME_FLAG_NO_EXTRACT_UI is not enforced
* commit 'b1bc5fd896329a39ad51a8c79e2970750c814ea0':
  Bug 5352720: IME_FLAG_NO_EXTRACT_UI is not enforced
2011-09-21 18:57:03 -07:00
Gilles Debunne b1bc5fd896 Bug 5352720: IME_FLAG_NO_EXTRACT_UI is not enforced
CL https://android-git.corp.google.com/g/#/c/136474 refactored
the fullscreen test, but ithe IME_FLAG_NO_EXTRACT_UI test was
lost in the process.

Note that there is still a problem (orthogonal to that change
with key_preview_backing, which appears opaque and black sometimes.

I'll re-open 5315001.

Change-Id: If3a73179d21eaca10bdc948db7bac4b4f7a88d34
2011-09-21 16:14:30 -07:00
Tadashi G. Takaoka 68c7b9b195 Merge "Remove "autoCorrectInvert" feature from SuggestionsView" 2011-09-20 23:28:31 -07:00
Tadashi G. Takaoka 77a87e3cb5 Remove "autoCorrectInvert" feature from SuggestionsView
Bug: 5162005
Change-Id: Iec679f5f05f28cd7e8013d7350ea03372f1cd7b2
2011-09-21 15:06:51 +09:00
Tadashi G. Takaoka f5fe245df0 Fix key preview backing view height
Bug: 5344344
Change-Id: Ied0cda2c4b822b391ece54a6880fae8e349cc0bc
2011-09-21 11:22:05 +09:00
Ken Wakasa 34a9831811 Merge "Tweak LatinIME's keypress volume" 2011-09-20 04:07:38 -07:00
Ken Wakasa f58293f6eb Tweak LatinIME's keypress volume
bug: 5337902
Change-Id: I7f864f158d110aa3e755961303799882f59b7e4c
2011-09-20 20:00:43 +09:00
Tadashi G. Takaoka 6d8d25ee5a (DO NOT MERGE) Update fullscreen mode also at onStartInputView
This is a cherry-pick cheof I190a71f7 from Master.

Bug: 5315001
Change-Id: I76c756eeecf21eec4c88dd4558d5c50f10ff3d3c
2011-09-20 16:59:00 +09:00
Tadashi G. Takaoka 3ea503c851 Merge "Update fullscreen mode also at onStartInputView" 2011-09-20 00:47:00 -07:00
Tadashi G. Takaoka 59010a89b8 Update fullscreen mode also at onStartInputView
This change also separates controlling visibility of "key preview
backing view" from suggestions strip visibility.

Bug: 5315001
Change-Id: I190a71f7956c804e5d89d2d5bacecc62d565ac2c
2011-09-20 16:38:24 +09:00
Ken Wakasa 28f36d68af Tweak LatinIME's keypress vibration duration
bug: 5337363
Change-Id: If6e6de587cbcddf26710d8f0b237c4bc393589b6
2011-09-20 11:23:30 +09:00
Tadashi G. Takaoka ea843f2a24 Make WordComposer aware of capitalized word
Change-Id: If6c0edef2334f018f2e04c6034f8ce747206f150
2011-09-13 19:11:10 +09:00
Jean Chalard a40aba0022 Merge "Fix an NPE" 2011-09-09 02:18:11 -07:00
Jean Chalard 5955cfdaea Fix an NPE
I think only the monkey can realistically stumble on this one,
but still.

Bug: 5276917
Change-Id: I0d9f76e4786973d3695fcd46127f0bed46621c33
2011-09-09 18:08:53 +09:00
Tadashi G. Takaoka 2cb36637f4 Back button to dismiss the more suggestions
Bug: 5275063
Change-Id: If31e9a25d827f44c8d4ff455a780ec2a6d2d9bef
2011-09-09 09:33:35 +09:00
Tadashi G. Takaoka 2be872555c Use full screen mode on landscape/phone device
Bug: 5262767
Change-Id: I721c18522c972ced9f359f2e5208572d54a4b7a1
2011-09-08 11:02:55 +09:00
Tadashi G. Takaoka f80b6a0699 Tune the threshold of fullscreen mode from 2.5in to 500dip
Bug: 5262767
Change-Id: Ie418ab766951a568d0f40822d8e8d719582749ba
2011-09-07 16:37:50 +09:00
Tadashi G. Takaoka abb0c77af1 Use separate View for key preview backing
Bug: 5246982
Change-Id: Icec4281cb01771909fcece36647ee42ba179118c
2011-09-03 01:36:26 +09:00
Jean Chalard 1531528bfe Add an option to prevent insertion of suggestion spans
This is to help debug of
Bug: 5250788

Change-Id: I961321aff3776c4912eaf7a1fa4de0c01d715f24
2011-09-02 14:43:13 +09:00
Tadashi G. Takaoka 913e2aeef2 Rename CandidateView to SuggestionsView
Change-Id: I6480cdf025f065130e1969899b259a243e7a11be
2011-09-01 15:41:34 +09:00
Tadashi G. Takaoka d81479a340 Implement KeyboardLocale InputMethodSubtype extra key
The locale is specified by KeyboardLocale extra key in method.xml,
LatinIME will use the specified locale for keyboard layout.

Bug: 5238658
Change-Id: I8e6cb66c73a7ac1bf611d9910b42fa9cff38eba0
2011-09-01 14:05:01 +09:00
Tadashi G. Takaoka 392276d73d Add Key constructor for suggestions pane
Bug: 5023981
Change-Id: I737bacb1a6bb40f70be65d6eff85614afe6c79ed
2011-08-30 19:14:52 +09:00
Jean Chalard ef35cb631c Move locale-related utility methods to LocaleUtils.
Change-Id: I7e9e6e5bc4486d8618d0213b112308c3d305c15e
2011-08-29 12:29:35 +09:00
Tadashi G. Takaoka af52c0ea04 Implement "forceAscii" private IME option
This change also introduces "AsciiCapable" extra value for subtype
that indicates the subtype can input any ASCII code point from its
keyboard layout.

Only if the input field has "forceAscii" private IME option and the
current subtype doesn't have "AsciiCapable" extra value, the en_US
keyboard layout will be used for the input field.

Bug: 3384942
Change-Id: I25e2553e37ecb5002df1164e45f6273845fe463b
2011-08-24 13:19:56 +09:00
Tadashi G. Takaoka c84bc3460d Rename LatinKeyboardBaseView to LatinKeyboardView
Bug: 5182291
Change-Id: I5089a14902b9f4ff1ab4f34e3f7a42aca5040d3e
2011-08-23 17:57:02 +09:00
Tadashi G. Takaoka 2d306a225c Merge "Extract sudden jumping touch event hack into separate class" 2011-08-23 01:49:38 -07:00
Tadashi G. Takaoka c403a46f6d Extract sudden jumping touch event hack into separate class
Bug: 5182291
Change-Id: I6a88ed4df3ec98e31ea4966d82da56f7fca342ac
2011-08-23 17:44:41 +09:00
Tadashi G. Takaoka f94df382fb Remove screen orientation confirmation hack
Bug: 4311428
Change-Id: Ie7e094ded9c7c1fe811b7eb97bc33ffecb29a73c
2011-08-23 14:58:45 +09:00
Tadashi G. Takaoka b39f612d97 Remove hacks related to determine window width
Bug: 4311428
Change-Id: Ic93f264101d13963503fcd447a69bbffd06e69f3
2011-08-22 17:17:42 +09:00
Ken Wakasa bf7dd47329 Key click sound volume fix
bug: 5145886
Change-Id: Ic599373ee17423ef9c61b3dd5177c3763aa31015
2011-08-12 02:02:03 +09:00
Ken Wakasa 11b7febc0b Ellipsis for "Space" key for triggering the IME switcher
bug:5136497
Change-Id: Iab7c68135500e9fed212521484090b52943550ca
2011-08-10 00:31:23 +09:00
Jean Chalard 14051e2b53 Stop reloading contacts when not appropriate.
A recent change had the contacts reloaded every time a new field
is touched. This change not only fixes the problem, but also removes
reloading contacts when changing language, which should make language
switch within LatinIME lighter.

Bug: 5125034
Change-Id: Ia61c4f75a8617113cdce88a2e2c6fdf073146a2d
2011-08-09 12:49:19 +09:00
Ken Wakasa c769ef4dd1 Correction mode should not rely on the existence of the main dic
bug: 5114094
Change-Id: I2088918ec2c9ad6f8db13b55e58d3e73e180aef8
2011-08-08 19:42:24 +09:00
Ken Wakasa 20c4aec827 Partially revert I531a3257 as it mistakenly broke some logic -- textToTheLeft was required.
Change-Id: I24f55cec05fea68836d6b3413b69f1e1b9c68ba2
2011-08-06 22:37:45 +09:00
Ken Wakasa cadb2128f5 Fix issues with long-pressing the spacebar
bug: 5114433
Change-Id: I18f2147724a08965147bafe93e11fc86c7c59d33
2011-08-06 16:49:32 +09:00
Jean Chalard ac21e0a349 Merge "Create a way to pass the proximity info to the dictionary" 2011-08-04 04:17:33 -07:00
Jean Chalard 043f784198 Create a way to pass the proximity info to the dictionary
This is a preparative change for inserting the spell checker.

Change-Id: Ie441879cac4f67078ec27a95f1fcbbf3ef373df7
2011-08-04 19:46:21 +09:00
Ken Wakasa de30f9f2d6 Additional hack for bug:4311428, a follow up for Ieade33d7.
Change-Id: If1799a6fa3b2f45c98c9f3aeb88845f1fb08f09b
2011-08-04 15:31:33 +09:00
Ken Wakasa 3889462439 Handle non word separators correctly even for the initial letter of a word
bug: 5101114
Change-Id: I0d804c9a500ff000dc06cadad46a2c6c6b8088b2
2011-08-04 12:24:45 +09:00
Tadashi G. Takaoka 38b5605fee Fix saving keyboard state while rotating
This change also uses longer timeout for restoring keyboard state.

Bug: 4311428
Change-Id: Ieade33d7c69f1dee727b2b8c26f0112eca44b336
2011-08-03 09:41:04 -07:00
Tadashi G. Takaoka 055054eef3 Retain keyboard layout while orientation change
This change also changes the timimng that the window width is
registered.

Bug: 4311428
Change-Id: Ied6b1b43bfa16a85f0e05cd308ce919d5d65677e
2011-08-03 02:20:27 -07:00
Tadashi G. Takaoka 8da9a13760 Make Keyboard object immutable except shift state
This is the first step to implement suggestions pane as mini keyboard.

Bug: 5023981
Change-Id: I90ffbde0fda19b4be68add449310997b56bf6904
2011-08-01 22:04:48 -07:00
Jean Chalard cb1cc0d0de Merge "Try to compensate for a race condition." 2011-08-01 04:17:22 -07:00
Jean Chalard f2f9715319 Try to compensate for a race condition.
This does not really fix the underlying bug, but it does fix
the apparent symptoms.
When the user presses space and a letter quick, the
onUpdateSelection handler may be called after the letter has been
actually committed. The keyboard then happily proceeds to clearing
the composition because it thinks space was pressed (or the user
moved the cursor, since it can't guess which happened).
This change removes this behavior when we are expecting an update
event from a keypress. This means the bug still exists if the user
presses space twice and a letter, and all events come after the
letter, but it is very very hard to reproduce this. There may be
other collateral damage when the user moves the cursor in the form
of race conditions, but likewise, they should be really hard to
reproduce.

Bug: 5100521
Change-Id: Ib05328c9b451bf6fe288ae00296fd283a9a4e863
2011-08-01 19:51:55 +09:00
Ken Wakasa 9351550dc6 Clean up revertLastWord()
The "deleteChar" argument of this method is acutally always true in the current code path.
Also, in this method, textToTheLeft virtually never has a punctuation letter as its initial
character.  This change is one of preparatory changes for bug:4983945.

Change-Id: I531a32570a35634c21c1d74b2b461e40a1b7f660
2011-08-01 16:03:43 +09:00
Tadashi G. Takaoka 259ce17f5d Merge "Use isFullscreenMode to determine candidate container height" 2011-07-28 17:40:18 -07:00
Tadashi G. Takaoka 3782f2bf1e Merge "Remove icon and negative button from dialogs" 2011-07-28 17:39:07 -07:00
Tadashi G. Takaoka 4b1780fa95 Use isFullscreenMode to determine candidate container height
Bug: 5081182
Change-Id: I3783d3994e96f8bf466cbc47c9e0aecc2a6bed50
2011-07-28 15:06:15 -07:00
Tadashi G. Takaoka e4b445f1ce Remove icon and negative button from dialogs
Bug: 5092028
Change-Id: I25b86c6e74e380e6cee4998bfe494bdafb611f36
2011-07-28 13:49:57 -07:00
Tadashi G. Takaoka c3d175c01f Fix wrong keyboard width when orientation has changed while IME is not shown
Bug: 5084021
Change-Id: Ie42da40b8249eaf9cf29707058906949278eff6a
2011-07-28 11:02:29 -07:00
Jean Chalard f50aa19337 Purge quick fixes option.
This change removes everything related to the quick fixes
Latin IME option item.
Note that Autotext is still used if the current subtype language
is the same as the system language.

Bug: 4985058
Change-Id: I51728a2190543ffb9e004470674ef6257b14f6c2
2011-07-26 16:25:57 +09:00
Ken Wakasa 83ffff2a49 Take care of bidi-mirrored characters in suggestion strip as well
Follow up to I1b884848

bug: 5047217
Change-Id: I18b9962c4943363bae88009354fcc75ab60ad2ba
2011-07-26 07:55:12 +09:00
Tadashi G. Takaoka cce61aa045 Merge "Refactor Keyboard and KeyboardView resizing and drawing code" 2011-07-22 18:41:23 -07:00
Tadashi G. Takaoka 38f55b36c3 Refactor Keyboard and KeyboardView resizing and drawing code
Bug: 4311428
Change-Id: Ice4050f92c8f3cec1bec2074fe6a913d04f50524
2011-07-22 16:50:53 -07:00
Tadashi G. Takaoka f3e7688361 Merge "Disable VoiceInputLogger inside LatinIME" 2011-07-22 02:41:31 -07:00
Tadashi G. Takaoka 255486a5d0 Disable VoiceInputLogger inside LatinIME
Bug: 4985273
Change-Id: I6c70e50a58be0973f78c6a1abc1fb4eac5449c0b
2011-07-22 02:37:56 -07:00
Tadashi G. Takaoka ada26bb383 Check user dictionary is enabled before showing touch-to-save
Bug: 5024127
Change-Id: If4d691a4a59c43579d1f977e9a0545495f30bafb
2011-07-22 01:32:53 -07:00
Tadashi G. Takaoka 3be0039164 Fix potential NPE
Change-Id: I3679d24b6c89e081d24d59c91b136c139dcb3d5c
2011-07-21 02:27:27 -07:00
Tadashi G. Takaoka 055265684b Revert "Guard unused voice functions"
This reverts commit 795a712ecf.
Bug: 4985273
2011-07-21 02:18:35 -07:00
satok 795a712ecf Guard unused voice functions
Bug: 4985273
Change-Id: I9491b4af24e636cba6362cdde44568d14f7b2b85
2011-07-21 16:07:00 +09:00
Tadashi G. Takaoka ef5dfc480c Remove sliding spacebar language switcher
Bug: 4971680
Change-Id: Ia3485ddcf8051bf7b7ba7f7a37fa75c3bc8a4798
2011-07-19 23:24:49 -07:00
Tadashi G. Takaoka 1dc80048d7 Merge "Support select input method dialog on pre-HC platform" 2011-07-19 23:22:37 -07:00
Tadashi G. Takaoka bf9d8348d8 Support select input method dialog on pre-HC platform
Bug: 4971680
Change-Id: I641b336da54813e13409bd7874aa22e51f790729
2011-07-19 22:22:47 -07:00
Jean Chalard 40f7efc172 Fix an NPE related to absent InputConnection
Bug: 5035577
Change-Id: I1a11fc475d4a0f692636000d0b0f40bc35427867
2011-07-19 19:25:48 +09:00
Jean Chalard 2b4eabed2b Allow double-space-period after relevant punctuation signs.
This allows the user to enter a period via double-space after quotes,
currency symbols, brackets and other non-sentence-finishing
punctuation marks.

Bug: 3430389
Change-Id: Ibe40b3902861207eb918e7be6113e8be12216f53
2011-07-19 16:12:24 +09:00
Tadashi G. Takaoka 2811841ab4 Honor EditorType's IME_FLAG_NO_EXTRACT_UI and IME_FLAG_NO_FULLSCREEN flags
Bug: 5030408
Change-Id: I1c5649725780cd063db7a437b8559b7f2573469c
2011-07-15 16:21:16 -07:00
Jean Chalard f422345211 Rename AutoDictionary to UserUnigramDictionary.
...and adjust internal functions, variables and constant names.

Bug: 3459274
Change-Id: I1b11c6adfee360ac0fc22d627955688b3dbdcffc
2011-07-15 12:14:47 +09:00
Ken Wakasa 4f365403c5 Fix build breakage
Change-Id: Id2c2d152f54d00842ef9e200ccdce1e13cc128cb
2011-07-13 13:49:13 +09:00
Ken Wakasa 84cb23a789 Small code cleanup
Change-Id: I7075d85f745c3b186e6d06086b9fcd54e7459feb
2011-07-13 12:15:22 +09:00
Ken Wakasa 8558cfb42a Code cleanup
Change-Id: Ie43181721ba18e0c04048eaa9e3016dcea9f5a49
2011-07-12 16:47:08 +09:00
Ken Wakasa 9318d33b6e Change variable names for readability
Change-Id: I9face4e90af4bcd6040eb7e303b596af7d643934
2011-07-12 12:08:58 +09:00
satok 4a0c343dbd Use InputMethodSettingsActivity
Bug: 4979539
Change-Id: Ib721814bfe80822ded7b0d801f6bc0c854588da4
2011-07-11 10:15:03 +09:00
Tadashi G. Takaoka c71854a661 Remove swipe gesture
Bug: 4971680
Change-Id: Ifff27f3bd3dd26417bfcb7072aaba074025b1bb7
2011-07-08 00:00:14 -07:00
Tadashi G. Takaoka 88110d1799 Clear CandidateView in onStartInputView
Before starting input on new TextView, we must clear the CandidateView
because it may hold the suggestion of previous TextView or even worse
the suggestions pane has been expanded and keyboard has been hidden.

Bug: 4995414
Change-Id: If848320c1a510e7018d36ed8ac61291be2fc6ce5
2011-07-06 17:57:24 -07:00
Ken Wakasa 273e5d60f4 Use the new settings activity class name
Follow up to I96230f05

Change-Id: I0ee7ccb5461764490ae9c977658883b10fe3ed3d
2011-07-06 12:38:34 +09:00
Tadashi G. Takaoka f60d09ac30 Narrower KeyboardView reference
This change also rename static inner class to more readable name and
get rid of unnecessary object reference from PointerTracker.

Bug: 4768084
Change-Id: Ie4e2b940d66b47d41efcae7eeac853cdae2e4d38
2011-07-04 22:42:48 +09:00
Tadashi G. Takaoka 5f6816fa8b Move keyboard event handling code to separate LatinKeyboardBaseView class
To sort out the issue, main keyboard and mini keyboard have to share
the pointer trackers.

In order to prepare for that, KeyboardView needs to be refactored as
two separate classes. KeyboardView is responsible for drawing keyboard
visual. And LatinKeyboardBaseView is responsible for handling key
event and mini keyboard as well.

Bug: 4768084

Change-Id: I5643e333b9bdfde0c939a0693cea76bd22f38897
2011-07-04 18:53:50 +09:00
Tadashi G. Takaoka 5238df54ad Disable auto-correction when application auto completion has set
Change-Id: I3f4ecfe7f2d96613dd37d41d9195d94864f82b48
2011-07-04 16:21:32 +09:00
Ken Wakasa 9ae24750f4 Some clean up and fixes around auto-correction cancellation logic
Change-Id: I07f4c3cd98d14d9f0da2de54bfa76a3867389f6f
2011-06-30 18:35:17 +09:00
Tadashi G. Takaoka 660d42fb36 Remove mInForeground flag from KeyboardView
Instead of that, added cancelAllMessages() and call it from
onFinishInputView().

Change-Id: I58f6f0931ed8d73441d80d9616ba3afbbbe38e05
2011-06-28 01:00:59 +09:00
Tadashi G. Takaoka 55303bc634 Re-create input view after voice IME finished
Change-Id: Ia389eb43ac7ffec229bfd8b0fe56ce8271cb1d39
2011-06-27 23:46:15 +09:00
Tadashi G. Takaoka 7e9615f218 Fix NPE
Change-Id: Ia2c7d9e9298330ae991956fca64b225adaeff898
2011-06-27 22:54:18 +09:00
Tadashi G. Takaoka 281e180c33 Fix NPE
Change-Id: Ie4b8b657fc6cc5a819d4ea3a0ca4536e6fdf6825
2011-06-27 20:30:40 +09:00
Ken Wakasa 4f0d290c5d Avoid memory leak by by non-static Handler inner classes
bug: 4901934
Change-Id: I870ab2e621ef3640a84468f09c074cdd726dc963
2011-06-26 00:14:40 +09:00
Alan Viverette 5ac4638f99 Added support for touch exploration to Latin IME.
Bug: 4379983
Change-Id: I97f22e54827c6229054b514801401ffa5b4ed3b8
2011-06-22 10:54:06 -07:00
Tadashi G. Takaoka 35f20916e5 Support Turkish keyboard
I left TODOs in Suggest.java because we must pay attention to locale
when changing character's case. Filed another Bug: 4769095 to track
that.

Bug: 4768050
Change-Id: I1ae2c4ffd2208403a8c2a25dd3a56b71dcefc826
2011-06-21 17:50:17 +09:00
Tadashi G. Takaoka 2951aa7e93 Fix NPE
NPE has occured while getting containerHeight in
LatinIME.onComputeInsets().

Change-Id: Ib906c20791a1f80a5c484a75eead9d2816a9da1b
2011-06-20 22:34:24 +09:00
Tadashi G. Takaoka 5a2d063047 Remove unnecessary onRefreshKeyboard call.
When using the sliding spacebar language switch on ICS, both
LatinIME.toggleLanguage() and
InputMethodService.onCurrentInputMethodSubtypeChanged() invoke
LatinIME.onRefreshKeyboard().  This change eliminates the first one if
it isn't necessary.

This change also cleans up the followings.
  * reuse theme Context when the keyboard theme hasn't been changed.
  * clear the Keyboard cache when theme has been switched.
  * eliminates unnecessary Context reference from LatinKeyboard and
    SlidingLocaleDrawable.
  * recycle Bitmap and reuse Canvas in KeyboardView.

Bug: 4725930
Change-Id: I87366e9304879d94d12b7345adea768d86d43519
2011-06-20 19:21:31 +09:00
Tadashi G. Takaoka 5e4e05afd2 Fix NPE
Bug: 4686479
Change-Id: I0b8a32d0f9bcebe55eebecd38dc5e69198e94378
2011-06-18 23:43:58 +09:00