Commit Graph

170 Commits (9ebba46c775f37abeb0451602cb323fd45adf33b)

Author SHA1 Message Date
Tadashi G. Takaoka 6b4ce58fc6 Remove unused WordComposer.init method
Change-Id: I46c6a6e1c1536599cb909bf81297001b238f2ec8
2012-07-06 20:12:14 +09:00
Tadashi G. Takaoka ac3bd96192 Merge "Remove WordComposer.add(int, int, int, KeyDetector) method" 2012-07-04 01:48:42 -07:00
Tadashi G. Takaoka 5c641a9f59 Remove WordComposer.add(int, int, int, KeyDetector) method
Change-Id: Ie6af46acba18a2d1cf3ddd1578d60ded4c90f89a
2012-07-04 17:29:47 +09:00
Tadashi G. Takaoka adc80eef15 Use Keyboard.getKey
Change-Id: I722b9e981389f660db928b7fd5ced1b82371fbf3
2012-07-04 16:31:57 +09:00
Satoshi Kataoka 71538b08e4 Add input pointers
Change-Id: I95300bf0a847fb86d026e846ff4ad723bb45284f
2012-06-29 18:58:51 +09:00
Ken Wakasa e55c23e4b0 Small cleanups
Change-Id: Ic1a198ab1b4f0323fde9e4245729fd0e6011b914
2012-06-27 16:54:37 +09:00
satok c54d558e2e Cancel adding user history bigram when autocorrection is cancelled
Bug: 6465474
Change-Id: Ifbfe0ddc2ce5fab070939ede3db7bf03a8535a45
2012-05-24 12:11:02 +09:00
Jean Chalard 4b5b46bb66 Don't autocorrect after suggestion resuming
Bug: 6105732
Change-Id: I92e7a9c6d6eb648f747c3b396d7993479fd8478a
2012-05-01 17:06:29 +09:00
Tadashi G. Takaoka c61cd79229 Fix some obvious compiler warnings
Change-Id: I10a634f7492b45d5a72345f14d36cf341946387d
2012-03-29 15:07:53 +09:00
satok 6ba8de2a60 Good bye the proximity logic in Java code
Bug: 4343280
Change-Id: I82f7d08703647a3492ce6e2d3b741146df58927e
2012-03-28 18:42:30 +09:00
satok 67094f5bde Do not re-calculate primary code in WordComposer
Bug: 4343280
Test: Ib43c0f1d1a19d067ea0

Change-Id: I3393a6099cb7fb824994f4656ccfef884f9c6bc4
2012-03-28 17:23:10 +09:00
satok 9611b281e1 Fix AIOOBE
Bug: 6236912
Change-Id: Ie09e5ef1c23eb48621ac3f2f2dc28dc2e46ca288
2012-03-28 13:02:14 +09:00
satok 01ab7c8b59 ongoing cleanup 2
Change-Id: I66b61cbe491cf8375144e834390beae3209a777d
2012-03-27 16:28:48 +09:00
satok 8980bd4a25 Merge "Cleanup jni 1" 2012-03-23 03:24:08 -07:00
satok 9df4a4527a Cleanup jni 1
Change-Id: Ieb6af8385356e259720b50f1fe46a694a098b30f
2012-03-23 19:03:20 +09:00
Jean Chalard a492790982 Stop creating useless objects
Man that was bad, it's heavy, it's called quite often, and it's
totally useless

Change-Id: Ia7e23e0e60ff4a929b226f3f4ccabedbc3ea2c06
2012-03-23 17:55:11 +09:00
Jean Chalard 081616cd2f Send correct coordinates for the spell checker
This results in the computation being done in native code
and the correct proximity being used.
Bug: 6181080

Change-Id: I08fa05c781d607e4feca2caeda353ec19c133a3d
2012-03-23 13:02:58 +09:00
satok 728d1c884e Cleanup proximity related code
Bug: 4343280
Change-Id: I57c0f9e20d9d8911009ea97057251a7f7a81512f
2012-03-19 18:33:59 +09:00
satok 1caff47ecd Calculate proximity characters in the native code
Bug: 4343280

Change-Id: I6adaf560f7a4f1f96dcb6ec2f61f20ee3001167e
2012-03-16 17:26:36 +09:00
satok ef08daddea Do not change the proximity orders
Bug: 4343280
Change-Id: I4e2dfb00d9c843a8a285d409ac5ab8fca5fb1694
2012-03-16 12:54:17 +09:00
Tadashi G. Takaoka 723aaa2eeb Remove touch dead zone
KeyDetector should use the distance from the hit box to detect the
key.

Bug: 6174250
Change-Id: Id1745d90222d1d1a10467f194b45307c12449944
2012-03-15 20:16:43 +09:00
satok 853d9020ed Really pass the y - touch correction to the native code
Bug: 4343280

Test:  I11f8518d9ee

Change-Id: I4b90bdffffed9736af223ac83c1a54019add70bb
2012-03-14 21:54:52 +09:00
satok 691f1c174b Fix coordinates sent to native code
Change-Id: I2c8b093b59ad36ffe860c3c4d360d87251d101c4
2012-03-06 16:38:00 +09:00
satok ca7ec2097c Integrate the logic to calculate the proximities
Bug: 4343280

Change-Id: I0f6a7e6912ed4abea07c10d266da4c7ccb0dae76
2012-03-06 15:34:27 +09: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 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
Jean Chalard 9159b9953d Fix the auto-composer to support supplementary chars
Change-Id: I61ff218ae2ca4eb443a370e581b677755258670a
2012-02-08 15:45:51 +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 825e2bbd91 Fix a bug when deleting the last char
And unit test

Change-Id: Ic4fc3626f8b86e10156d770d41cd6deab5d31f39
2012-02-03 13:03:54 +09:00
Jean Chalard 9242a2bcf8 Fix string iterations in a couple places.
Seems I didn't get how to iterate on a String correctly >.>
Talk about a big bug. Anyway, I think it's working now.

Bug: 5955228
Change-Id: I988c900cf2a16c44b9505cfd4f77c7cda7e592f0
2012-02-03 11:15:46 +09:00
satok e05b3f4b3a Support additional proximity characters
Change-Id: Ifbe0d7e4eafea1926bbce968eae4724dd5769689
2012-02-02 16:07:16 +09:00
Jean Chalard 449415c72f Cleanup (A9)
Deactivate the LastComposedWord when the commit was not the right
type, instead of fooling it by passing it a null auto-correction.

Change-Id: I032b477dc691bd151a644ca4b0c9f0a9b5512e45
2012-01-26 20:10:49 +09:00
Jean Chalard 5971a0a0bb Remove a useless member (A8)
It turns out this can be removed entirely.

Change-Id: I6f23703cef1666311989a825285317eef696487f
2012-01-26 20:10:49 +09:00
Jean Chalard be79227dc9 Remove the CharacterStore class (A7)
Remove the now useless WordComposer.CharacterStore class
and merge back its members inside WordComposer. This should
simplify the word composer a bit.

Change-Id: I5fe32418c62a583cd558dce98758a4701559bdf5
2012-01-26 20:03:44 +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 1f8fc62ccb Add useful information to LastComposedWord (A2)
Change-Id: Idf47f2e2bdd1d6394fc4b1ab7df28d64a808da1e
2012-01-26 17:49:55 +09:00
Jean Chalard 267563d1bb Add a class for previously composed data (A1)
Change-Id: I87498799e6a48b8fa65924a098bb0ceb7626dce1
2012-01-26 17:22:52 +09:00
Ken Wakasa 0d0f01da67 Fix a typo. A follow up to I68dd6b8d
Change-Id: I16fa4099c75faac35344b0e4d3c2b866ddac896a
2011-12-21 22:34:08 +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
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 c73c26790f Make the word composer aware of commits.
Change-Id: I04e691fbc9227d4df195429bca89edea93575347
2011-12-16 15:41:10 +09:00
Jean Chalard 27dff63833 Group all input-related info into an inner class.
Currently, these variables hold the info about the composing
word, or maybe some outdated info, and it's not very clear
which it is. LatinIME is maintaining the freshness info in
a separate boolean, and uses it throughout the code for many,
many things, leading to much confusion.
The idea in grouping this info is, it can be saved in another
instance and restored later. It can be tested against to know
whether there is actually outdated but kept info or not, and
it should allow to straighten out what is actually currently
being typed. Ultimately, it will eliminate the need for
LatinIME to keep track of the status of the info in the
word composer.

Change-Id: I00e2c690f303f8320c9be35590a6df4583e9e456
2011-12-15 19:58:04 +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 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 3651220327 Remove a duplicated variable.
This is awesome cleanup.

Change-Id: I35ce8940a13f3084630dc26d6e7e397acfdaac36
2011-12-12 12:06:41 +09:00
Tadashi G. Takaoka e22baaadd3 Get rid of usage of key index
Change-Id: I7596ce3ae52fde436d06c2dd95ae873c7aa5ef7f
2011-11-29 19:07:54 +09:00
Jean Chalard 55042ff977 Merge "Resume suggestion when backspacing to the end of a word" 2011-11-29 01:15:42 -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
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 8fbf29e2d5 Make some private method static
Change-Id: Ia23765268be0ef89d7fe7c3f5372ed32d6615765
2011-10-28 13:31:31 +09:00
Tadashi G. Takaoka 436a645ea8 Fix checking capitalized word code
This is a follow up change of If6c0edef.

Bug: 5328922
Change-Id: Idb415f53f3fea6660c7802577d08b4d89d4e7842
2011-09-16 12:28:13 +09:00
Jean Chalard 5c08151c22 Avoid returning an object that's still used internally
There is no definite path known for this to end up being
touched by other classes, but we could imagine through
some way or some other it ends up shoved in the stringbuilder
pool, leading to catastrophic results.

Hopefully related to
Bug: 5248688

Change-Id: Ib8abfc31263cbf31d515ed607ced5d8253971938
2011-09-15 16:23:03 +09:00
Tadashi G. Takaoka ea843f2a24 Make WordComposer aware of capitalized word
Change-Id: If6c0edef2334f018f2e04c6034f8ce747206f150
2011-09-13 19:11:10 +09:00
satok f733074aae Fix the available input locales and moved Recorrection
Bug: 4409091

Change-Id: I6efd23ebb9528bf1bd35320057a0ea264c187451
2011-05-12 20:26:24 +09:00
satok 9fbfd58773 Move re-correction codes to Recorrection.java
Change-Id: I0641f333bbc7d4ac27361c97252c4591584efb9d
2011-05-10 16:58:27 +09:00
satok 8fbd552292 Add proximity info to native
Bug: 3311719

Change-Id: Ie596304070e321ad23fb67a13bf05e2b6af1b54b
2011-02-23 23:04:00 +09:00
Tadashi G. Takaoka 887f11ee43 Remove next letters frequency handling
Bug: 3428942
Change-Id: Id62f467ce4e50c60a56d59bf96770e799a4659e2
2011-02-17 13:59:41 +09:00
Ken Wakasa 0b4ae1f578 Capitalize the displayed text in the suggestion bar when all of the user typed chars are upper case
bug:3014227
Change-Id: Ic453e2fde57ce51be00f3a506e1c9328103ca99a
2010-09-28 01:15:11 +09:00
Tadashi G. Takaoka d1a8e3088b Fix ArrayIndexOutOfBoundsException in WordComposer
Bug: 3028277
Change-Id: I1c4d8dca4db8a70f851589d1fbd45a16ea1bfc1b
2010-09-23 14:47:26 +09:00
satok 525141a402 Clean up LatinIME java
- remove unused code
- add @Override
- change the inappropriate cast

Change-Id: Ib25b4939e5b4273794ab0f6349776b5b62d89894
2010-08-24 12:40:00 +09:00
satok 979f869096 DO NOT MERGE. Backport LatinIME from master to Gingerbread
TODO: Cleanup will follow.

Change-Id: I4a68ba9f2f55760aa24187f1f13fdfa8a0b70963
2010-08-20 14:37:03 +09:00
Jean-Baptiste Queru 443c360d0a Clarify licensing
-use AOSP copyright instead of Google
-add NOTICE and tag file

Bug: 2548782
Change-Id: If50b2e9e9cc4b4876b0d047fc9f34e2d537a6da4
2010-04-05 09:47:36 -07:00
Amith Yamasani 231cacd080 Fix occasional correction errors in suggesting obvious corrections.
Bug: 2513996

The array of adjacent letters did not have the primary code in the first
position. Swap the codes around to make the primary the first one.

Change-Id: Id753254c88d440d3d76dbc048d123dfc78edf58d
2010-03-14 22:53:16 -07:00
Amith Yamasani 07b1603a3f Don't let the native code target be included twice when unbundling.
Move java code to a different directory so that the unbundled
version doesn't try to compile the native code again.

Change-Id: I05cf9e643824ddc448821f69805ccb0240c5b986
2010-03-09 15:01:09 -08:00