Commit Graph

2834 Commits (cff28c5d5db3e0c3e97149519a3f705150aeb224)

Author SHA1 Message Date
Yuichiro Hanada e55b644aef Add new binary dictionary format.
Change-Id: Ia99411d4009857d5e420ca87ef8acf1f1826d3ed
2012-09-10 13:05:46 +09:00
Ken Wakasa 60af4f03a8 Fix dicttool_aosp build
Change-Id: Iabcf420b4120e3d275fdbcb23939a0ab6052ddf0
2012-09-10 12:56:10 +09:00
Yuichiro Hanada eae7b293e4 Check the length of the word when add to FusionDictionary.
Change-Id: Id98d18e90a8b83b597507728b467f56888c8fd12
2012-09-10 12:35:53 +09:00
Yuichiro Hanada be5db53a09 Add tests for readDictionaryBinary with byte array.
Change-Id: I2c2815e9d4867687fb3f5b0c661e6162b88c0a0c
2012-09-06 20:35:33 +09:00
Yuichiro Hanada 83dfe0fd8c Add FormatOptions.
Change-Id: Ibad05a5f9143de1156b2c897593ec89b0a0b07e7
2012-09-05 18:05:43 +09:00
Jean Chalard ac25fcac71 Display punctuation suggestions on cursor move
...if punctuation suggestions are requested.

Fixes the symptom, but not the root cause of
Bug: 6981089

Change-Id: I683a7451c99457829cb4e5a762f43548ff89a535
2012-09-04 19:54:55 +09:00
Ken Wakasa 2e4713a54e Merge "Check the length of the word when add to userhistory." into jb-mr1-dev 2012-09-04 02:36:35 -07:00
Tadashi G. Takaoka 848331222e Use string-array resource to define predefined-subtypes
Bug: 6809603
Change-Id: Icafe4652ec17844838b28c04977deb88bcb9aa8f
2012-09-04 17:18:39 +09:00
Yuichiro Hanada dd435b305e Check the length of the word when add to userhistory.
Change-Id: I7f2fe1771eed6b610704892b24f8a0283a779162
2012-09-04 15:34:41 +09:00
Ken Wakasa f2789819bd Cosmetic fixes and a bug fix in UnigramDictionary::testCharGroupForContinuedLikeness().
This change has actually been extracted from a change work in progress I4fe423834b8131fb122251892c98228a6e08ba25

Change-Id: I52568fa09da2ea22be7f8bfe9676b7cd73c31fa4
2012-09-04 14:23:37 +09:00
Jean Chalard 8251036616 Match calls in I8a70e43b for Icbe60bdf
Change-Id: I3a9eaaa018cd338ca8d9aa09c0fa58800b637e19
2012-09-03 11:58:23 +09:00
Jean Chalard 2035b946a3 Merge "Reinstate the shortcut-only attribute" into jb-mr1-dev 2012-09-02 19:28:01 -07:00
Jean Chalard 72b1c93941 Reinstate the shortcut-only attribute
Also add the blacklist attribute

Bug: 7005742
Bug: 2704000
Change-Id: Icbe60bdf25bfb098d9e3f20870be30d6aef07c9d
2012-08-31 22:11:52 +09:00
Yuichiro Hanada 666a433802 add UserHistoryDictIOUtils.
Change-Id: I8a70e43b23f65b5fd5f0ee0b30a94ad8f5ef8a8a
2012-08-31 15:08:57 +09:00
Kurt Partridge 9bbc7ec052 Merge changes Ifb983c35,I0b947421 into jb-mr1-dev
* changes:
  ResearchLogger clean up splash screen
  ResearchLogger no longer offers option to disable logging
2012-08-30 22:56:53 -07:00
Kurt Partridge 58eb4d9f27 ResearchLogger no longer offers option to disable logging
Bug: 6188932
Change-Id: I0b9474216080f3820438c09f89b0b6c6c102c69d
2012-08-30 22:51:56 -07:00
Yuichiro Hanada b2a43a2ed4 add readUnigramsAndBigramsBinary.
Change-Id: I7967f11211221d4877bf0a0c30183af885f45390
2012-08-31 14:39:19 +09:00
Tadashi G. Takaoka 35ff94547c Separate inner classes of keyboard package out under internal package
Change-Id: Ia3969bd5ddec5aa5d81d05ad4cf676d818587922
2012-08-30 15:37:55 +09:00
Jean Chalard ded498d4a4 Merge "add readHeader." into jb-mr1-dev 2012-08-29 22:32:14 -07:00
Yuichiro Hanada 62ed901100 add readHeader.
Change-Id: I5be5d62a63ca897e36fe93200ffdca6befb363aa
2012-08-30 14:17:50 +09:00
Tadashi G. Takaoka 61bc66b324 Revert "Revert "Fix key letter size of 5-rows Thai keyboard""
This reverts commit 7a5ca9982f.
Depends: Ia4fa5046b3106e2710b9d5df1a6cc5f2cf995ec7

Change-Id: I0b9d0125380efe898943dc26ae884378145c44a3
2012-08-30 11:30:13 +09:00
Tadashi G. Takaoka b590d69e1f Merge "Revert "Revert "Move resource related methods to ResourceUtils""" into jb-mr1-dev 2012-08-29 19:29:37 -07:00
Ken Wakasa d2a81ab9bd Merge "Add FusionDictionaryBufferInterface." into jb-mr1-dev 2012-08-29 18:49:03 -07:00
Tadashi G. Takaoka 92821614fd Revert "Revert "Move resource related methods to ResourceUtils""
This reverts commit bfc02a7005.

Change-Id: Ife4c0312ea3260211b1b5ee39b239e8e9d7db67e
Depends: I3d862515568be36d5aa80d12e7e5c0a9bf4d06a6
2012-08-29 22:30:55 +09:00
Ken Wakasa bfc02a7005 Revert "Move resource related methods to ResourceUtils"
This reverts commit 160dc0f98e

Change-Id: Ic5a3d9c70b8f6f2993d8455799945ec2633cad66
2012-08-29 04:33:39 -07:00
Yuichiro Hanada f5c4ff4817 Add FusionDictionaryBufferInterface.
Change-Id: I8640c994231d5f46bc6e074ce8a5bf5344fed0aa
2012-08-29 19:27:49 +09:00
Tadashi G. Takaoka 160dc0f98e Move resource related methods to ResourceUtils
Change-Id: I14535b030e58363315dd2daecaaef4edd6990cd9
2012-08-29 17:51:07 +09:00
Tadashi G. Takaoka 1e11c44d1b Make utility classes final
Change-Id: Ic4f69b4c8da33c9fca50d6829724179310c2f875
2012-08-29 17:38:08 +09:00
Jean Chalard 4fa01ee570 Merge "Allow Latin IME to cancel smiley-auto-correct consistenly" into jb-mr1-dev 2012-08-29 01:18:15 -07:00
Jean Chalard a05a0f2077 Allow Latin IME to cancel smiley-auto-correct consistenly
This change makes Latin IME behave consistently with regards
to other auto-correction cancellations in cases of auto-correction
cancellation after smiley-triggered auto-correction. That is,
pressing the smiley key when the keyboard signals it's about to
auto-correct will get the auto-correction there plus a smiley,
and pressing backspace will cancel the auto-correction, and
pressing backspace again will delete the smiley.

Bug: 7067593
Change-Id: Ia7eef70a5d06b8b9afa1f1fbb0ed1dbc21a3059f
2012-08-29 16:49:39 +09:00
Tadashi G. Takaoka 9879f65651 Add ResourceUtils
Change-Id: Ia198f8d95eae8c007623cd52d73cc1528d22fee9
2012-08-29 16:36:00 +09:00
Tadashi G. Takaoka 95c486cdf3 Merge "Move some methods from Utils to LocaleUtils class" into jb-mr1-dev 2012-08-29 00:35:27 -07:00
Tadashi G. Takaoka 0023a57eea Move some methods from Utils to LocaleUtils class
Change-Id: I4a834549c2ea96ac30d7e2cb692d69af219cab1a
2012-08-29 16:24:53 +09:00
Tadashi G. Takaoka 237f5e4f9b Remove unused methods from Utils class
Change-Id: I209b75f1cca381610f25cd219f35ea62b9762be2
2012-08-29 16:10:16 +09:00
Jean Chalard 43d3f0fa3b Merge "Auto-correct after smileys and gestures." into jb-mr1-dev 2012-08-28 01:59:20 -07:00
Tadashi G. Takaoka ef2bfad590 Use TypedArray.getFraction to read percentile values in resource
Change-Id: Ifc8b024d190efba4cd536fd639621e841eb9970e
2012-08-28 15:18:40 +09:00
Jean Chalard 6c70b92003 Auto-correct after smileys and gestures.
Bug: 6936790
Bug: 6965241
Change-Id: I1f61327eb5591960c280e425df9cd86b9c52f5d6
2012-08-27 18:54:05 +09:00
Jean Chalard 5cc596160a Merge "Use ByteBuffer when reading FusionDictionary from file." into jb-mr1-dev 2012-08-23 21:56:02 -07:00
Yuichiro Hanada d4fe7fda30 Use ByteBuffer when reading FusionDictionary from file.
Change-Id: Ia71561648e17f846d277c22309ac37c21c67a537
2012-08-24 13:31:08 +09:00
Tadashi G. Takaoka 64a26b4389 Fix bug in InputPointers.append
Change-Id: I39825757bbae32b66c4b61cb6c4fbcaa2e0c9c47
2012-08-23 17:59:08 +09:00
Tadashi G. Takaoka 64ee096100 Add toString method to InputPointers and ResizableIntArray
Change-Id: I835ee131855bef8233cf2672e2fb288b939148a6
2012-08-23 17:29:36 +09:00
Kurt Partridge d573bad5bd Merge "ResearchLogging capture full n-gram data" into jb-mr1-dev 2012-08-22 10:41:10 -07:00
Tadashi G. Takaoka 50e7501722 Merge "Fix SubtypeSwitcher initialization path" into jb-mr1-dev 2012-08-22 01:02:04 -07:00
Tadashi G. Takaoka 9fc6af325e Fix SubtypeSwitcher initialization path
This change also removes the reference of LatinIME from
SubtypeSwitcher.

Bug: 7026856
Change-Id: I78a266f3682b11f09b49bbcdcdb6aee713e6af37
2012-08-22 16:05:34 +09:00
Kurt Partridge bf653996ea ResearchLogging capture full n-gram data
- Captures complete motion data for all words in an n-gram.
- Also filters n-grams properly; if any word in the n-gram is not
  in the dictionary, it is not included.
- Simplify ResearchLog to not require explicit state
- Added LogBuffer class MainLogBuffer class to allow n-gram-level decisions
  about privacy.
- Moved LogUnit out from ResearchLogger

multi-project change with Ic70ccb6c2e11eb02d887821434b44daa3eb7a3e2

Bug: 6188932
Change-Id: I731d6cff6539e997874f723b68bdb0d9b651b937
2012-08-21 22:37:33 -07:00
Tadashi G. Takaoka ecfbf4625c Add static construct method for SparseArray
Change-Id: I6da97f6ea23578318f403bb5d64c30b1663c69ee
2012-08-22 14:22:20 +09:00
Tadashi G. Takaoka 1f05cf6dab Remove GCUtils utility class
Change-Id: Ia666aeb10c155d69763faf7f01ceca113b9b4653
2012-08-22 12:34:22 +09:00
Tadashi G. Takaoka f852891437 Merge "Remove KeyboardSwitcher reference from ResearchLogger" into jb-mr1-dev 2012-08-21 20:22:57 -07:00
Jean Chalard 07d485d705 Merge "Fix a silly bug." into jb-mr1-dev 2012-08-21 20:16:28 -07:00
Tadashi G. Takaoka c3f78c9057 Remove KeyboardSwitcher reference from ResearchLogger
Change-Id: I671a83c19977fda358c8e8a730e22ee155f65512
2012-08-22 12:14:52 +09:00
Jean Chalard 32f6503a27 Fix a silly bug.
This would prevent user history to work at all.

Bug: 7023638
Change-Id: I5d8867a07fb8859325d274e956ae667c094d0ac1
2012-08-22 12:09:24 +09:00
Tadashi G. Takaoka 5f282ea9e4 Add CollectionUtils class to create generic collection easily
Change-Id: I6b4de9187e122298e5e9cd8ddc9070d062df6a89
2012-08-22 10:21:38 +09:00
Kurt Partridge 94e7f4bef9 ResearchLogger log RichInputConnection
Move many ResearchLogger data collection points to RichInputConnection.
By collecting data here, developers do not have to remember to keep the
ResearchLog consistent with calls to the RichInputConnection.

In addition, some unnecessary log points were removed, and the ResearchLogger
is now independent of LatinImeLogger.

multi-project change with I05496cfd762e9a41c42c50099143f1efc0a3d8a2

Bug: 6188932
Change-Id: I424abb2e437901262a9620255493916b7c3ff74b
2012-08-21 17:13:36 -07:00
Jean Chalard 8b6b5592cb Merge "Treat all caps for gesture input." into jb-mr1-dev 2012-08-21 04:39:04 -07:00
Jean Chalard 324cc1dbe6 Merge "Tell the shift mode to the word composer." into jb-mr1-dev 2012-08-21 04:38:27 -07:00
Jean Chalard 1eba97d92f Treat all caps for gesture input.
Bug: 6950087
Change-Id: I9f2271780600572c9befa96c7ad98494c554dd2b
2012-08-21 20:29:53 +09:00
Jean Chalard adbd9ae105 Tell the shift mode to the word composer.
Bug: 6950087
Change-Id: Ifab9d6d075af398c6468d081216488712f8a53fb
2012-08-21 20:27:42 +09:00
Tadashi G. Takaoka ac78633be2 Rename and consolidate some constants
Change-Id: I7863936cca18b28bf0117afcbcf544a5fd7f185d
2012-08-21 17:54:53 +09:00
Tadashi G. Takaoka 6785b90727 Remove touch coordinate from pickSuggestionManually
Change-Id: I33b1b4bc6fdfd263c4b2bb7125c07b4bddcf3c9f
2012-08-21 17:13:45 +09:00
Kurt Partridge 48643b0e0d Merge "Revert "ResearchLogger log RichInputConnection"" into jb-mr1-dev 2012-08-20 10:18:40 -07:00
Kurt Partridge adb591e75b Merge "Revert "ResearchLogging capture full n-gram data"" into jb-mr1-dev 2012-08-20 10:18:30 -07:00
Kurt Partridge 35c11842a7 Revert "ResearchLogger log RichInputConnection"
This reverts commit 1964ffb3f4

Change-Id: Ie43e7ac828faa91e1824a255bb3ecf6c8222d4e8
2012-08-20 10:17:45 -07:00
Kurt Partridge 3d35908749 Revert "ResearchLogging capture full n-gram data"
This reverts commit 221e756fd7

Change-Id: Iefc4e4e27ddc925d4a4634627b0467bd4ee2a66e
2012-08-20 10:17:40 -07:00
Kurt Partridge 752c53760c Merge changes I568c90d4,I4667f8f6 into jb-mr1-dev
* changes:
  ResearchLogging capture full n-gram data
  ResearchLogger to track simple statistics
2012-08-20 08:47:45 -07:00
Kurt Partridge 461f1942f9 Merge "ResearchLogger log RichInputConnection" into jb-mr1-dev 2012-08-20 08:47:33 -07:00
Tadashi G. Takaoka cb2362cee1 Merge "Make some usages of SparseArray thread-safe" into jb-mr1-dev 2012-08-19 23:23:08 -07:00
Tadashi G. Takaoka 8ce351a827 Make some usages of SparseArray thread-safe
This is a follow up of I39d9bf1a7c272eb16d6ed4698f52457579b40f10.

Change-Id: Ic3288e491175f9a85679a21064093f9db5a65466
2012-08-20 15:00:26 +09:00
Jean Chalard 1aed102d4c Merge "Fix capitalization, part 1" into jb-mr1-dev 2012-08-19 22:29:59 -07:00
Jean Chalard 4c6db0592e Merge "Remove the whitelist dictionary." into jb-mr1-dev 2012-08-19 22:13:15 -07:00
Jean Chalard 04d6649d29 Merge "Remove access to the whitelist class." into jb-mr1-dev 2012-08-19 22:12:36 -07:00
Jean Chalard 13822d2b05 Hack to skip reading an outdated binary file.
Bug: 7005813
Change-Id: Ie0d8d4b2d5eb147838ca23bdd5ec1cecd4f01151
2012-08-20 13:56:52 +09:00
Jean Chalard fb087a95f9 Fix capitalization, part 1
The case this fixes is typing "Ah.\n" in gmail for example

Bug: 6950087
Change-Id: Ia4bf3a57dde49b9c9d47d315e9f85b7ffc7ee6e3
2012-08-20 13:51:27 +09:00
Kurt Partridge 221e756fd7 ResearchLogging capture full n-gram data
DO NOT MERGE

- Captures complete motion data for all words in an n-gram.
- Also filters n-grams properly; if any word in the n-gram is not
  in the dictionary, it is not included.
- Simplify ResearchLog to not require explicit state
- Added LogBuffer class MainLogBuffer class to allow n-gram-level decisions
  about privacy.
- Moved LogUnit out from ResearchLogger

multi-project change with Ie2bc79fd7fe6b951b24771e94b8d4ca21989af65

Bug: 6188932
Change-Id: I568c90d4af07e7c759c1e7fc64b716bd8c7b4ae5
2012-08-17 21:44:07 -07:00
Kurt Partridge 1964ffb3f4 ResearchLogger log RichInputConnection
Move many ResearchLogger data collection points to RichInputConnection.
By collecting data here, developers do not have to remember to keep the
ResearchLog consistent with calls to the RichInputConnection.

In addition, some unnecessary log points were removed, and the ResearchLogger
is now independent of LatinImeLogger.

multi-project change with Ib71f841044ec1072610ab5638a5edfce29b7c05b

DO NOT MERGE

Bug: 6188932
Change-Id: I9ec7500a5b18bfe1a5a5bb1e5bf21c43351fc59e
2012-08-17 21:44:06 -07:00
Ken Wakasa e46d12927e Fix NPE in LatinIME.addToUserHistoryDictionary()
bug: 7007063
Change-Id: Ie3e2f77dcbc597dda0c0df9a970336e5aac0edba
2012-08-18 00:04:33 +09:00
Ken Wakasa 72c0f4de1d Merge "add reconstructBigramFrequency" into jb-mr1-dev 2012-08-17 03:19:12 -07:00
Yuichiro Hanada c0a75c8ecb add reconstructBigramFrequency
Change-Id: Iff20dcb9ca0d6064bb118247887fe24b812c0c61
2012-08-17 19:05:16 +09:00
Jean Chalard aa27635a8a Reword a confusing comment
Bug: 7005645
Change-Id: Ifd942b3ce242aeeec512e132e1cee31329e994b1
2012-08-17 17:22:28 +09:00
Jean Chalard 46fc768e54 Remove the whitelist dictionary.
The functionality now lives in the binary dictionary.

This finalizes work on
Bug: 6906525

Change-Id: Id106d871e8afdf9afa886d2a30bea87ff89f2d24
2012-08-17 15:13:10 +09:00
Jean Chalard 3e43e6998e Remove access to the whitelist class.
...which becomes useless. It will be entirely removed in an
upcoming change.

Change-Id: I2f1d27f1eceda79454b01f21e057b98f2953131a
2012-08-17 13:01:25 +09:00
Jean Chalard 228674f6c7 Merge "fix findWordInTree." into jb-mr1-dev 2012-08-16 18:54:24 -07:00
Yuichiro Hanada 0d35c159fe fix findWordInTree.
Change-Id: I8f42df28f76188677db9d4e55885e1fc6a40b53f
2012-08-17 10:23:01 +09:00
Jean Chalard 3083b4b77d Merge "Fix a debug method" into jb-mr1-dev 2012-08-16 17:59:11 -07:00
Jean Chalard cc1062cfd0 Fix a debug method
Change-Id: Icf78fb0d5f7caea78f053fffd1ecd4289629964a
2012-08-17 09:24:45 +09:00
Ken Wakasa bc44ad77e5 Merge "fix findWordInTree." into jb-mr1-dev 2012-08-16 04:26:55 -07:00
Yuichiro Hanada 66f338983b fix findWordInTree.
Change-Id: I9d81c815494a0670afa81219ad7bad82274d997e
2012-08-16 20:21:47 +09:00
Jean Chalard 91c64902b0 Merge "Refresh editor info when the text field attributes changes." into jb-mr1-dev 2012-08-15 02:35:21 -07:00
Jean Chalard e234aed428 Refresh editor info when the text field attributes changes.
For some reason we get a "restarting" flag from the browser
some times when the input field is different. The attributes
however are not the same, so we can detect that and reload
appropriately.

Bug: 6946793
Change-Id: I6762dae6f41db690497b026a707d9cc89c840b34
2012-08-15 18:32:59 +09:00
Jean Chalard cd0e004888 Merge "Ensure #offer always actually offers something." into jb-mr1-dev 2012-08-15 02:16:09 -07:00
Jean Chalard 653dbfb8ed Ensure #offer always actually offers something.
This will allow remaining requests after a call to terminate
correctly.

Bug: 6963142
Change-Id: Iff67058bb8a39f2f1b468d3894861e8125de6659
2012-08-15 18:10:10 +09:00
Satoshi Kataoka 3979f060f0 Step 28-A Introduce the session Id to getSuggestion
Change-Id: I39d9bf1a7c272eb16d6ed4698f52457579b40f10
2012-08-15 15:44:45 +09:00
alanv 0538493309 Fix the build.
Change-Id: I744f6232e81981ab694d3d1e92bab5fd6efa46c0
2012-08-14 15:34:29 -07:00
Charles Chen dd7f79097a Merge "Change accessibility event type for app-driven speech." into jb-mr1-dev 2012-08-14 14:33:32 -07:00
Jean Chalard e30c05800f Preemptive anti-deadlock device
We don't know of any actual bug in the implementation of the
pool that may result in a deadlock, but this still implements
a means out of a deadlock if one ever arises anyway. It's
meant to improve the resilience of the spell checker.

Bug: 5441027
Change-Id: I689491090792dbb89110ee56631965c5bb2dc712
2012-08-14 17:04:14 +09:00
Jean Chalard 5d6b8e1818 Fix a bug that would prevent spell checking
java.lang.ArrayIndexOutOfBoundsException:
        [I offset=0 length=528 src.length=512
com.android.inputmethod.keyboard.ProximityInfo
        .setProximityInfoNative(Native Method)
com.android.inputmethod.keyboard.ProximityInfo
        .createSpellCheckerProximityInfo(ProximityInfo.java:85)
com.android.inputmethod.latin.spellcheck.AndroidSpellCheckerService
        .createDictAndProximity(AndroidSpellCheckerService.java:411)

The array was too small with respect with the passed size.

Change-Id: I7777d7aecd17375d3fbf82854a66eb7a5a289ce6
2012-08-14 14:45:17 +09:00
Ken Wakasa bcec82de66 Clean up constructors
And, use C++ style casts and use float math functions rather than double ones to save memory space.

Also, stop using FloatMath and NativeUtils as standard Math methods are faster now.
See http://code.google.com/p/android/issues/detail?id=36199 and https://android-review.googlesource.com/40700

multi-project commit with I4259fb5ab8a15ac5760a7f04fc8f4c860529f04a

Change-Id: I0b81cff8c91769f7559a59b9528c75a5aabb4211
2012-08-13 10:48:37 +09:00
satok 847c8dfe17 Fix JNI
Change-Id: If134baf52e78fbe18b78611a23870f5d10c80955
2012-08-11 13:54:01 +09:00
alanv 5f312c9c15 Change accessibility event type for app-driven speech.
Bug: 6614400
Change-Id: I0ef309b7f3f35bf37b4664ea599c9e6ffb1a4ab8
2012-08-10 13:51:17 -07:00
Ken Wakasa f3850e5543 Use JNI Region calls also in getSuggestions()
Change-Id: I9cc0208397c202aeb6f7b5bb5ad59e00c5afbd80
2012-08-10 21:09:23 +09:00
Satoshi Kataoka f6c2200890 Workaround to stop init dict traverse session
Change-Id: I3d46c54a96a9fc0359ef75b9d2f8590b44164a8b
2012-08-10 21:07:53 +09:00
Jean Chalard 7b258e512d Accept whitelisted entries from any source.
...not only the WhitelistDictionary.

Bug: 6906525
Change-Id: I7f181eb6936ec17bbccdc4e736fd09292af24e9c
2012-08-10 19:02:19 +09:00
Jean Chalard caed149b67 Optimization & Simplification
It's useless to do the whitelist lookup twice. Also, putting
this test out of this method will allow whitelist entries to
come from other sources.

Bug: 6906525
Change-Id: I4afe678cae6556d16642d155ce770fbf4e61ad49
2012-08-10 19:02:15 +09:00
Jean Chalard dc2fb6bc6d Merge "Pass the type from native code all the way to Java." into jb-mr1-dev 2012-08-10 01:26:59 -07:00
Jean Chalard 926ef06a1e Pass the type from native code all the way to Java.
Bug: 6906525
Change-Id: I057390d47a223450e22d8338509e22c28fc0d5f6
2012-08-10 15:51:55 +09:00
Satoshi Kataoka e9f3e182e4 Add arguments for dic traverse session
Change-Id: I8776ad528eeea9a5fc4dcf394ca13bb80c04fb6d
2012-08-10 12:34:00 +09:00
Ken Wakasa 5bb4206275 Use more JNI Region calls
Change-Id: I371db517ff4749c0b7e5bdb4362e6310c91a24dc
2012-08-10 00:46:20 +09:00
Satoshi Kataoka 9d29871605 Add reset method for dic travserse session
Change-Id: Ia3dd924f92549da2cf8302ef77c629902d4f275b
2012-08-09 17:49:19 +09:00
Tadashi G. Takaoka 2be2d77664 Update dictionary availability at onStartInputView
This is a follow up of I7901c0f9489b4deb79314c2c903b138611bfd78e

Change-Id: I38c22e886db247c402a964e3ddd10b09a461151c
2012-08-09 16:09:54 +09:00
Tadashi G. Takaoka 9abea49dd4 Merge "Fix NPE and don't call UI API from non-UI thread" into jb-mr1-dev 2012-08-08 20:00:19 -07:00
Tadashi G. Takaoka 8335c59ea7 Fix NPE and don't call UI API from non-UI thread
This change also reverts I29ec3e9f10484f30288fac76f0c45b3707bc2259

Bug: 6956969
Bug: 6891020
Bug: 6947253
Change-Id: I7901c0f9489b4deb79314c2c903b138611bfd78e
2012-08-09 11:55:41 +09:00
Satoshi Kataoka 60d4961f34 Merge "Pass traverse session" into jb-mr1-dev 2012-08-08 07:50:44 -07:00
Satoshi Kataoka 9127811493 Pass traverse session
Change-Id: I84bfaaa406e3f51421c08a7ee8f9576ebdba54d4
2012-08-08 23:30:31 +09:00
Satoshi Kataoka 181567f9c7 Merge "Add traverse session" into jb-mr1-dev 2012-08-08 04:40:36 -07:00
Satoshi Kataoka c4e4dfe17d Add traverse session
Bug: 6942265

Change-Id: I384cf701f5ee44c4b1037e5b8ddfa3d570286f55
2012-08-08 20:39:43 +09:00
Tadashi G. Takaoka 79eefda0d3 Add SuggestInitializationListener to BinaryDictionary.resetMainDict()
Change-Id: I4c01f172ddb2ca60fa6e604384610c90b76e5457
2012-08-08 15:55:26 +09:00
Tadashi G. Takaoka 27e48447a4 Lingering gesture floating preview text a bit
Bug: 6936095
Change-Id: I873343e9aa6afdf6bdb223795f03232509b012a7
2012-08-07 13:54:42 +09:00
Tadashi G. Takaoka 7a13975700 Cleanup unused import and dead code
Change-Id: Ife877620561d29a8f25602916420741186104617
2012-08-06 17:28:33 +09:00
Tadashi G. Takaoka dba77186f7 Fix duplicate getSuggestions() call for main dictionary
Change-Id: I092480063452505cdf03dbd83b9c64e535822931
2012-08-06 17:08:38 +09:00
Tadashi G. Takaoka b27959741a Fix Utils.getStackTrace()
Change-Id: Iaf160af32bb77b3ad5929cb5ee8eccd01165bdf6
2012-08-06 16:50:43 +09:00
Tadashi G. Takaoka 0a524de3df Separate updateSuggestionStrip from commitTyped
The commitTyped() called updateSuggestionStrip(), and that led to call
Suggest.getSuggestedWordsForTypingInput() even after a batch input was
started because WordComposer.commitWord() reset the batch input state.

Bug: 6932442
Change-Id: If645b1ef0343aa1e21ca71a9275b40c6c3be13df
2012-08-06 14:31:01 +09:00
Jean Chalard 15b28432ba Merge "Cleanup unused code" into jb-mr1-dev 2012-08-03 09:32:27 -07:00
Jean Chalard 8ee4b35c70 Cleanup unused code
The Italian dictionary has been amended to contain words that
include apostrophes, and accordingly the apostrophe is now
excluded from word separators in Italian.
This code was only used for Italian, and in the general case
it does the wrong thing; it was only needed by limitations of
the old dictionary.

Bug: 6929108
Change-Id: I7ff4615e01899a1cebed2c4c51679cd0746740fe
2012-08-04 01:15:04 +09:00
Jean Chalard 54e84a00fc Make a makedict command for dicttool (A3)
This behaves exactly as the old makedict command. Further
changes will redirect the calls to makedict to this, so as
to consolidate similar code.

Groundwork for
Bug: 6429606

Change-Id: Ibeadbf48bec70f988a15ca36ebf5d1ce3b5b54ea
2012-08-04 01:11:46 +09:00
Jean Chalard 3f80541844 Merge "Fix an OOB exception" into jb-mr1-dev 2012-08-03 07:17:37 -07:00
Jean Chalard 4c976aceee Fix an OOB exception
Not sure exactly how this can happen, but at least this should
prevent us from crashing.

Bug: 6920884
Change-Id: I451864756b48c5cb5e98b06edee917d88766d77f
2012-08-03 23:10:47 +09:00
Tadashi G. Takaoka 622d6a5b1b Using hardware accelerated drawing
When Canvas has been hardware accelerated, don't use offscreen bitmap.

Bug: 6872994
Change-Id: I1121f76377991692bc29ebeedbfbfa1b2a12dbb7
2012-08-03 20:46:10 +09:00
Ken Wakasa fb955693d4 Enable hardware accelerated drawing for SoftInputWindow of LatinIME
Taking advantage of Ib6a8bda46223ce1153f32834daf02a820d16136e

bug: 6872994
Change-Id: I799b25b6509980dd9f039bead9bc926b42cbb040
2012-08-02 15:11:31 +09:00
Jean Chalard f68fe7a9c9 Don't forward phantom space state on stripper input
Bug: 6890540
Change-Id: I923b24e3bc17e7b923be4940ad739b58dca24a1f
2012-07-31 01:48:10 +09:00
Tadashi G. Takaoka ca57f5ba40 Move gesture preview parameters to KeyboardView attributes
Change-Id: Iff9d6b485e202656fc869f3ff4d94575ad2c186f
2012-07-30 20:10:48 +09:00
Tadashi G. Takaoka 47e2bf3298 Add advanced options to turn on/off the gesture trail and text preview
Bug: 6883053
Change-Id: I601718afb37289108b45ef68626c7c315edca35d
2012-07-30 15:54:27 +09:00
Jean Chalard 79d4c70b93 Merge "Don't auto-correct when there are digits." into jb-mr1-dev 2012-07-27 09:12:01 -07:00
Jean Chalard e7c471a52f Don't auto-correct when there are digits.
Bug: 6667462
Change-Id: I796655f57c71c9f50ae6e38dd08b71df3998dbcf
2012-07-28 00:15:54 +09:00
Jean Chalard 6fc72cae20 Fix a bug with autocaps
Port of Iece016f4

Bug: 6886405
Change-Id: I148c296d8a3841c40b6748e73ed2b0fff473b627
2012-07-27 21:09:25 +09:00
Jean Chalard aa906c36aa Handle correctly the restarting argument
Bug: 6851364
Change-Id: Ie939a43b8527a76aec213b702d3d850717f22a81
2012-07-26 21:57:15 +09:00
Tadashi G. Takaoka 941f222c21 Merge "Remove unused setProximityCorrectionEnabled() methods" 2012-07-25 19:54:40 -07:00
Ken Wakasa e55d78ab0c Stop swallowing an UnsatisfiedLinkError
Change-Id: I37d61274e1527229befabae2c392fd78e279b807
2012-07-26 09:15:39 +09:00
Tadashi G. Takaoka c4376db0f0 Remove unused setProximityCorrectionEnabled() methods
Change-Id: I03aa6608ee435b36377de41684162b303740f571
2012-07-25 20:37:36 +09:00
Tom Ouyang 2f81757c3a Add dynamic floating preview for incremental gesture recognition.
Change-Id: I7ba7ac24aa96a0ff19267997c5b58853079bc6dc
2012-07-25 19:40:55 +09:00
Tadashi G. Takaoka 0657b9698a Update gesture mode state when dictionary gets available
Bug: 6860204
Change-Id: I840b7bf1983ab92fa4e0b180129176539e96409f
2012-07-25 16:11:53 +09:00
Tadashi G. Takaoka 369e54cc33 Add Suggest initialization finish listener
Bug: 6860204
Change-Id: I1e4c03c99415cd9bdea5a8556ff4093c33f0f508
2012-07-25 09:55:22 +09:00
Tadashi G. Takaoka 506259396f Merge "Update gesture suggestions even when suggestions strip is off" 2012-07-23 03:45:21 -07:00
Tadashi G. Takaoka 7575ac7054 Update gesture suggestions even when suggestions strip is off
Bug: 6852483
Change-Id: I873ae0f2e3bc863e989629f8bc0cc90ee33a4920
2012-07-23 19:37:00 +09:00
Jean Chalard c0f0ceeccf Merge "Fix a bug with the 'add to dict' hint popping up too much" 2012-07-23 03:20:01 -07:00
Jean Chalard 491d451e38 Fix a bug with the 'add to dict' hint popping up too much
Not having a main dictionary is not sufficient reason to display
the hint. If the user already added the word to the dictionary then
we shouldn't be displaying it again, even if we don't have a main
dictionary for the current language.

Bug: 6829798
Change-Id: I6b081f51c82ef395fe2e394fd3167363e743ea6f
2012-07-23 18:32:13 +09:00
Tadashi G. Takaoka 259905ba90 Rename suggestion strip related methods
Change-Id: I942692bbc2e577482f353d875405c4658a1102fc
2012-07-23 18:04:02 +09:00
Tadashi G. Takaoka 4702671ea4 Rename SuggestionsView to SuggestionStripView 2012-07-23 15:37:43 +09:00
Tadashi G. Takaoka c8e45ddb03 Rename LatinKeyboardView to MainKeyboardView
Change-Id: I8f3123b8d727c7beb72e226f80c17794f89c8b60
2012-07-23 12:11:43 +09:00
Kurt Partridge 3c233bf1a5 ResearchLogger feedback form
- also cleaned up RLog menu

multi-project commit with If0fd4fef89d390073e6939d5188ed5696866cb33

Bug: 6188932
Change-Id: I4f66f13bd366b4e8bde742ccd0704f812c6d33f9
2012-07-22 18:36:24 -07:00
Kurt Partridge 6b966160ac ResearchLog refactor
- new package: com.android.inputmethod.research

multi-project commit with Ic0a5744f3160d13218addd589890623c0d120ffc

Bug: 6188932

Change-Id: Icf8d4a40a5725401799be6e209a640d99a5f34c4
2012-07-20 15:06:51 -07:00
Tadashi G. Takaoka 7519091f7c Use ResizableIntArray in GestureStroke
Change-Id: I034e80df03c7c6c0895fdf2c03763627d410d425
2012-07-20 19:32:28 +09:00
Tadashi G. Takaoka 62b8dddb6d Add gesture input enable settings
Bug: 6845325
Change-Id: I3165465b0b280e32a9288da16abb75baa67288dc
2012-07-20 19:26:36 +09:00
Tom Ouyang 528738341d Merge "Add gesture trail feedback." 2012-07-20 01:26:30 -07:00
Tom Ouyang 4daf32b6c0 Add gesture trail feedback.
Change-Id: I32709fac0dec3165678a052aa286e2fb3d90721b
2012-07-20 17:09:23 +09:00
Tadashi G. Takaoka 2f6a90ac31 Merge "Implement ResizableIntArray.fill" 2012-07-20 00:33:07 -07:00
Tadashi G. Takaoka 7abdcf1ed3 Implement ResizableIntArray.fill
Change-Id: I570641bc2f32d016c247db6c065a138d8235ab8c
2012-07-20 16:05:37 +09:00
Tadashi G. Takaoka 732edc1ff1 Merge "Fix NPE where the current subtype is null" 2012-07-19 22:57:39 -07:00
Tadashi G. Takaoka d6a18cdedb Fix NPE where the current subtype is null
Bug: 6847999
2012-07-20 14:51:41 +09:00
Kurt Partridge 48ded4e3b1 Merge "ResearchLogger: make logging more reliable (esp on startup)" 2012-07-19 21:31:41 -07:00
Tadashi G. Takaoka c49c85f835 Implement ResizableIntArray.setLength and .get
This change revises ResizableIntArrayTests as well.
2012-07-20 12:02:38 +09:00
Kurt Partridge 0df487678e ResearchLogger: make logging more reliable (esp on startup)
Bug: 6188932
Change-Id: I692e427ba2e6da7bb15f48208304c4a034392a22
2012-07-19 09:00:21 -07:00
Tadashi G. Takaoka 9370ab9ada Make ScalableIntArray public as ResizableIntArray
Change-Id: Ibbbc117214912ffa192c694bde5b7d55154f40c4
2012-07-19 20:37:53 +09:00
Tadashi G. Takaoka 57f7de0ba6 Add default capacity parameter to InputPointers' constructor
Change-Id: I02f23096f0682d30effe4dfc1ca57881a1e4aedc
2012-07-19 12:06:00 +09:00
Tadashi G. Takaoka 9580c467f9 Consolidate GestureTracker into PointerTracker
Change-Id: Ib28fae10493a9142ba4dff6cf57f52c59766b209
2012-07-18 20:11:06 +09:00
Tadashi G. Takaoka 10102f02af Change the batch input methods of KeyboardActionListener
This change also removes the reference of SuggestedWords from
GestureTracker and KeyboardActionListener.

Change-Id: I25ef8756007986abf99a931afd665bbfe6fa387f
2012-07-18 18:53:36 +09:00
Kurt Partridge 5e53542489 Merge "delete old ResearchLog files" 2012-07-16 09:41:10 -07:00
Kurt Partridge 81dae8d015 delete old ResearchLog files
cleans out the local directory of files that may have persisted
accidentally because of system crashes, etc.  default lifetime is
curently 1 day.

Bug: 6188932
Change-Id: I4b51169d6dd0eddb6bf8b661165f88e63782ce7d
2012-07-13 20:25:38 -07:00
Kurt Partridge 73c5dbd9d2 researchLog records versionCode, versionName
Bug: 6188932
Change-Id: I3d8502a5397035be5287ea720599e3fda4c669d6
2012-07-13 20:21:18 -07:00
Tom Ouyang eea34598bf Merging minimal gesture input
Change-Id: Iee6ae48bb6309c2867b5d2e344fe7d86dfabd654
2012-07-13 19:32:18 +09:00
Jean Chalard e9808694fe Fix a bug where the word composer is not correctly reset
...upon commit

Change-Id: I1fea87cb4c133a0884329eb9b61bf3053c36cd1b
2012-07-13 13:31:27 +09:00
Tadashi G. Takaoka 7247bff6d6 Fix InputPointers.append
Change-Id: I6995f9b2ed00b9f948e1299e576a5e24725d58f8
2012-07-13 11:46:03 +09:00
Jean Chalard c7387a4fd0 Add values for suggestion types (A120)
Also, use it in getBigrams.

Change-Id: Ia0be9b57d1b7effcd8a936e01e957d1195b39c68
2012-07-12 19:21:44 +09:00
Jean Chalard 6931df9c17 Pass an array to output suggestion types (A119a)
This needs the matching A119b change to not break the build.
The array is passed, but not used yet.

Bug: 6166228
Change-Id: Ia91d658461d989ee8c94e9b31bb06f4a36f4c5b6
2012-07-12 19:21:42 +09:00
Jean Chalard 2c5cf744e5 Increase encapsulation (A118)
showSuggestions is only ever called by updateSuggestionsOrPredictions.
It only feels natural that, when called with a 0-sized or null
suggestion list, it clears the suggestions.

Change-Id: I5b52bc9151afca1bb6c6f0a7f81e3255add92177
2012-07-12 15:58:16 +09:00
Jean Chalard 1343d27de3 Readability improvement (A117)
Change-Id: I6f8bb05a23edb40a079da60b7136170ec9043282
2012-07-12 15:58:16 +09:00
Jean Chalard 24a63b5537 Simplification (A116)
Change-Id: I97cf92a7b0dabc251dd241b24978ea00d1e5f047
2012-07-12 15:58:16 +09:00
Jean Chalard f5b55cb70c Compute variables closer to where they are used (A115)
This improves locality, it's better for readability/performance

Change-Id: Ibb1efaf86e362dd2c9398722d0da2144df96b333
2012-07-12 15:58:09 +09:00
Jean Chalard 2549b4978e Cleanup (A114)
Change-Id: I7e24e0aeae7c004cae310ae9f46cf90dac2d4d14
2012-07-12 15:09:57 +09:00
Jean Chalard 02f1c1534c Cleanup (A113)
If not composing a word, then consideredWord is always the empty
string.
Hence, it's never whitelisted, but it's also always "NotAWord",
so isWhitelistedOrNotAWord returns always true, so
allowsToBeAutoCorrected is always true. Which means that
isPrediction implies allowsToBeAutoCorrected == true.
Thus, !isPrediction && !allowsToBeAutoCorrected is strictly
equivalent to !allowsToBeAutocorrected.

Change-Id: I4ad7a7c3447851c539646d97cf55ff065e6ee115
2012-07-12 15:09:48 +09:00
Jean Chalard ae13061245 Simplification (A112)
If we are not composing a word, that isFirstCharCapitalized
and isAllUpperCase are guaranteed to return false.

Change-Id: Ic4a0be9574acf4653c729a9594f963f5bcf0c757
2012-07-12 14:30:33 +09:00
Jean Chalard d8afa2fbe1 Remove the ultimate code duplication (A111)
Change-Id: I7c76613df8f148feb02765f187db3ca6dc577977
2012-07-12 14:30:33 +09:00
Jean Chalard 3b57631b60 Resolve a TODO: bury some implementation detail in native (A110)
The fact that prediction does not accept a null argument is an
implementation detail, it should not be visible to Java code.

Change-Id: I3a156b323b6db9353de898d33f3f7c81751cecb1
2012-07-12 14:30:30 +09:00
Jean Chalard 18d76afa91 Remove an unused method (A109)
Change-Id: Ib785b7e8c554d030395e2c0ca92edb44eb2b245f
2012-07-12 14:30:03 +09:00
Jean Chalard 251f302985 Stop using a redundant method (A108)
Change-Id: Iffc0bae0a273419e7c50d69526c0c8e402c6461c
2012-07-12 14:30:00 +09:00
Jean Chalard 6a5d17cd2f Remove a useless parameter (A106)
Change-Id: Ic0ecea22212fd1a098a3a168da460374e446f4a3
2012-07-12 11:28:16 +09:00
Jean Chalard b7d7c5a369 Make a constant really constant (A104)
Change-Id: Ied1f9f96a574b1e6a8ee0a71bfb1604d9c962e1c
2012-07-12 11:16:30 +09:00
Jean Chalard e4e7e5fc82 Cleanup (A103)
Change-Id: Ib5ebddfdb87ef71a2f8d859fb45d3ac78040e97a
2012-07-11 16:14:58 +09:00
Tadashi Takaoka 5e21ea1a35 Revert "Workaround to avoid a bug in the batch input bigram dictionary lookup"
This reverts commit 1250cdeab2
2012-07-11 00:07:08 -07:00
Tadashi G. Takaoka 1250cdeab2 Workaround to avoid a bug in the batch input bigram dictionary lookup
Change-Id: I8a5641c88c45918d6bed81a0b03efdcff0b380c5
2012-07-11 15:38:13 +09:00
Jean Chalard 9c09fd02eb Inline a method to be able to factorize code (A102)
Change-Id: I121071f80c8af3c1053968dc76aaeca3352ca9a8
2012-07-11 14:57:51 +09:00
Jean Chalard d6c610400e Inline a wrapper method (A101)
Change-Id: I6ce856ff49a8f8c696851b2487590704010fc758
2012-07-11 14:57:51 +09:00
Tadashi G. Takaoka eb1443883f Support batch input
Change-Id: Ibe63212fe71cdebb5b897bc5018ae75b2a87555a
2012-07-11 14:53:20 +09:00
Jean Chalard 21e5759e8e Merge "Small readability improvement (A100)" 2012-07-10 22:49:25 -07:00
Jean Chalard 27207eaa04 Merge "Pull up some common code again (A99)" 2012-07-10 22:49:06 -07:00
Jean Chalard 722b00275d Merge "Pull up some identical code (A98)" 2012-07-10 22:48:58 -07:00
Jean Chalard 8b166465b0 Merge "Inline a method to avoid confusion (A97)" 2012-07-10 22:48:52 -07:00
Jean Chalard fd9b485111 Merge "Remove parameters for easier inlining (A96)" 2012-07-10 22:48:44 -07:00
Jean Chalard 0b329fd0d1 Merge "Pull up some more common code (A95)" 2012-07-10 22:48:38 -07:00
Jean Chalard a5acd68caa Merge "Pull up common code in the caller (A94)" 2012-07-10 22:48:33 -07:00
Kurt Partridge 0d54692ce4 Merge "intentional logging" 2012-07-10 21:20:47 -07:00
Jean Chalard 82d5ed6fcd Small readability improvement (A100)
Change-Id: I6340748654a95d203ed43ceb9a7e6468b5b8ab1c
2012-07-11 11:19:50 +09:00
Jean Chalard 860a9f85ff Pull up some common code again (A99)
Change-Id: I9e9f5664bb12bb25d74c8a076a6ee1024c708145
2012-07-11 11:19:50 +09:00
Jean Chalard 8eaeb60e7f Pull up some identical code (A98)
Change-Id: I6c265956394cf49e74b0256dfa5af06fe6b30467
2012-07-11 11:19:33 +09:00
Jean Chalard e77f2996ea Inline a method to avoid confusion (A97)
Change-Id: I3c3ffcd3d40493f4bfa0f6596f923b3430e605aa
2012-07-11 11:19:18 +09:00
Jean Chalard cfae32c610 Remove parameters for easier inlining (A96)
Change-Id: Ied2e291393609300173681e26e82b7dd36b41bd0
2012-07-11 11:16:22 +09:00
Jean Chalard ea98e026f1 Pull up some more common code (A95)
Change-Id: I3ac7ee823471a6d1da8031e064bce38b0e5a8f5c
2012-07-11 11:15:18 +09:00
Jean Chalard b4b93dbf3e Pull up common code in the caller (A94)
Change-Id: I84b97886280eca75d5f2b7546f20f8b1bced55bc
2012-07-11 11:13:56 +09:00
Kurt Partridge 223d671ffc intentional logging
- separate ResearchLog from ResearchLogger
- fix abort menu to explicitly indicate re-enabling of logging
- auto flush entries every 5s
- conform to new suggestedWords class

multi-project change with I9fe1f8fe59d5891daa4ca84af157f36fb1bb17dc

Bug: 6188932

Change-Id: I7e99390f934481c6ed9cea2b259944583edda5bb
2012-07-10 18:44:18 -07:00
Jean Chalard 6f233f7ba1 Remove useless member variables (A93)
Change-Id: Iff0a0e8835f4d630b51a15c0d91881437094e785
2012-07-10 20:18:10 +09:00
Jean Chalard 2ae75ed56b Start converging two identical methods (A92)
Change-Id: I3c85a80610fde664a328f5606d0724f00d445ebe
2012-07-10 20:13:54 +09:00
Tadashi G. Takaoka d82dcdc924 Add batch input dictionary lookup
Change-Id: I4da3c976838e8eb56c9ec80aafaaf54d759b7981
2012-07-10 20:01:28 +09:00
Jean Chalard 5e573a1f0a Remove a useless parameter (A91A)
Change-Id: I1d1758048649ef337875a5141d825569af7ad38c
2012-07-10 19:31:36 +09:00
Jean Chalard f5943153ad Cleanup old methods (A90)
Change-Id: I5435cef8ac6be523934ffa394952cb120c8e89d6
2012-07-10 19:30:46 +09:00
Jean Chalard b30d2185f2 Implement the common Dictionary interface (A89)
This will de-duplicate a lot of existing code.

Change-Id: Idaffb2fde23b9741f057bcb2ecb3dde9d12ea5c5
2012-07-10 19:30:42 +09:00
Jean Chalard a69f12a246 Reduce method visibility (A88)
Change-Id: I29d6afbcba0998558c9b19287a460d9f0e410994
2012-07-10 19:19:47 +09:00
Jean Chalard 0f57bdc0e5 Factorize code (A87)
Why was this copy-pasted :(

Change-Id: I6a537c56425ad039d7301a5fe1e0485784f07914
2012-07-10 19:19:43 +09:00
Jean Chalard 4e42e378fa Move stuff around for readability (A86)
Change-Id: I5f4a18e43f3012acf96978d625325bf7c69c9c80
2012-07-10 18:57:57 +09:00
Jean Chalard 82009901ea Add a consolidated method to the Dictionary interface (A85)
Change-Id: I5d79021e69cc738e3013e31764ab0a59e15decdf
2012-07-10 18:57:12 +09:00
Jean Chalard 2a37fb9d30 Refresh the cached single quotes count on commit
Change-Id: I9df5cf95c14da2e11ac709ca5e32dc7db3b02c37
2012-07-10 18:43:42 +09:00
Jean Chalard a9632d8173 Merge "Enhance behavior consistency (A84)" 2012-07-10 02:31:40 -07:00
Jean Chalard 184c552917 Merge "Refactoring for whitelist (A83)" 2012-07-10 02:24:58 -07:00
Jean Chalard b53e96813c Merge "Refactoring (A82)" 2012-07-10 02:24:47 -07:00
Jean Chalard 50d1b7902f Merge "Fix a bug with suggestion behavior (A81)" 2012-07-10 02:24:36 -07:00
Jean Chalard a4d346c37a Merge "Cleanup visibility in LatinIME (A80)" 2012-07-10 02:21:46 -07:00
Jean Chalard c677b0071d Enhance behavior consistency (A84)
Use the word the same way for suggestion and prediction. It makes
little logical sense that the trailing single quotes be removed
for suggestion lookup but not for prediction lookup.

Change-Id: I0de4b5f7c5b4c1b4ba1817ff9653d7c03967146d
2012-07-10 18:05:20 +09:00
Jean Chalard 1c6693a219 Refactoring for whitelist (A83)
Avoid special casing the whitelist dictionary by having it implement
the interface it pretends it implements

Change-Id: I8b873cb0f3fe13cefd32c8cb756a25c8ae16a2b4
2012-07-10 18:05:20 +09:00
Jean Chalard fb6eeeb35a Refactoring (A82)
The user history dictionary should be the one knowing it does not suggest words
beyond 2 characters, not Suggest.

Change-Id: Ie85ec6116eb495e0c7f51108e4620c5ae536f4bf
2012-07-10 18:05:20 +09:00
Jean Chalard 966efe4889 Fix a bug with suggestion behavior (A81)
Bug: 6788235
Change-Id: I5a4212872e0fd3f9e80168fd3abd5c2b3bc4110f
2012-07-10 18:05:19 +09:00
Jean Chalard a5bb353de9 Cleanup visibility in LatinIME (A80)
Many methods were public but could have been private: change them
to private. Also, add a comment above public methods that don't
come from the IMF to make it clearer why they are necessary.

Change-Id: I574154b015d09c0f8542b81763f497691afdc3c1
2012-07-10 18:05:15 +09:00
Satoshi Kataoka 7fcad7b9b6 Separate ICS-dependent code from the spell checker service
Bug: 6789576
Change-Id: Ia768258f6fa121c7a7757093eb8a20e665580865
2012-07-10 17:45:26 +09:00
Jean Chalard b98414f8fd Merge "Remove useless code (A79)" 2012-07-10 00:47:56 -07:00
Jean Chalard 29540b25f0 Merge "Simplification (A78)" 2012-07-10 00:47:10 -07:00
Jean Chalard 728c0cb251 Remove useless code (A79)
We postUpdateSuggestionStrip right away anyway - this only
makes the suggestion strip blink

Change-Id: I2ebd933e9a4c804ef1e8c62ccdaf4953a98a792e
2012-07-10 16:41:49 +09:00
Jean Chalard 09fdd30e52 Simplification (A78)
Change-Id: I622503af858ef419e94a17f182253cb03da00462
2012-07-10 16:41:47 +09:00
Satoshi Kataoka 74620f449e Merge "Create AndroidSpellCheckerSessionFactory" 2012-07-10 00:26:00 -07:00
Satoshi Kataoka 37b19ffe6c Create AndroidSpellCheckerSessionFactory
Bug: 6789576
Change-Id: I6de1e1aa64cf14f38ecb250579418bc518f0d838
2012-07-10 16:16:53 +09:00
Satoshi Kataoka 759778a751 Merge "Separate SpellCheckerSession from SpellCheckerService" 2012-07-09 23:42:15 -07:00
Satoshi Kataoka 84ed096641 Separate SpellCheckerSession from SpellCheckerService
Bug: 6789576
Change-Id: I7c55d36afad7ef6046353b3c9e849a54a6dc83ae
2012-07-10 15:34:40 +09:00
Jean Chalard fed702a0ad Merge "Move a test (A77)" 2012-07-09 23:01:33 -07:00
Jean Chalard 75e605f7ca Merge "Pull up common code in the consolidated method (A76)" 2012-07-09 22:41:33 -07:00
Jean Chalard c466cd3f99 Move a test (A77)
Change-Id: I417bd5f1318696aaa39fee18f3e750ea5c231f6b
2012-07-10 14:24:33 +09:00
Jean Chalard 32f5384fc9 Pull up common code in the consolidated method (A76)
Change-Id: I3ebecec37b49e139c243cf9da8bfe491e7ddada1
2012-07-10 14:22:12 +09:00
Tadashi G. Takaoka 80973dc76f Merge "A little optimization of InputPointers.copy" 2012-07-09 21:09:13 -07:00
Tadashi G. Takaoka 2ad6d12a30 A little optimization of InputPointers.copy
Change-Id: Id83b34e076ef91e06d7c1dd2b3ee7bb64d01b8cb
2012-07-10 13:05:43 +09:00
Jean Chalard 24e8a06f98 am 949d2ae5: am 4bcf70c9: Fix a bad interaction with mmap
* commit '949d2ae5788977c5e87e35e1bd1770f54ac88f5b':
  Fix a bad interaction with mmap
2012-07-09 20:24:01 -07:00
Tadashi G. Takaoka 7389c601e3 Merge "Add InputPointers.append() method" 2012-07-09 01:39:38 -07:00
Tadashi G. Takaoka 1087c53f5a Add InputPointers.append() method
Change-Id: Id2b0e242f7e9ce0ca888067857f8b64c02fde84e
2012-07-09 17:33:10 +09:00
Jean Chalard e4498929b0 Simple refactoring (A75)
Change-Id: Id19efc5d279616da52667fa70326b86aba70d4a0
2012-07-09 15:06:16 +09:00
Jean Chalard d579f1aefc Consolidate methods that do the same thing (A74)
Change-Id: I6e7c3aba2b40ecefa483c9680978bc806368e96e
2012-07-09 15:06:16 +09:00
Jean Chalard 347a80f793 Tiny refactoring (A73)
If !mWordComposer.isComposingWord(), then mWordComposer.getTypedWord()
will always return an empty string.

Change-Id: Ife66d0abc44c743cbc30d31724e833cda168fd5c
2012-07-09 15:06:16 +09:00
Jean Chalard 7a422a0142 Cleanup again (A72)
Change-Id: Id3765bf9826cc2c7ca70158cda53c75dc58f51c6
2012-07-09 15:06:16 +09:00
Jean Chalard 37eaa24b5a Simplification (A71)
Change-Id: I7a91d84291bea581ecc8ec5b29b9a87ccec76e7d
2012-07-09 15:06:16 +09:00
Jean Chalard dc1b84d96c Defer testing composition to a later time (A70)
This is not exactly the same logically speaking, because it's
theoretically possible that the composing state changed in between
the message enqueueing and it's retrieval. However in the practice,
if the composing state changed the message *must* have been
cancelled and resent, else the behavior breaks. So this actually
is more robust, and removes some obscure requirements on the
calling code.

In the practice, it should also make the cancelUpdateSuggestionStrip
message useless, although this change does not yet remove it.

Change-Id: I75141920ce64e38e2f92e9c02b6c979936eee9a9
2012-07-09 15:06:16 +09:00
Jean Chalard a6757f400a Code simplification (A69)
Change-Id: I2a77e437795fbbea47fd2e604ee6c26f8d0e458a
2012-07-09 15:06:16 +09:00
Jean Chalard 8f9c9377fc Consolidate two methods (A68)
Change-Id: I4b91414190b3786065ebd962a76299b605e5797e
2012-07-09 15:06:15 +09:00
Jean Chalard 146bd2e456 Pass the value we really want to pass to update functions (A67)
Change-Id: Ica9b875d119dea2f8dc237fd63e5b4eaa5e1c400
2012-07-09 15:06:15 +09:00
Jean Chalard 60dbe0be43 Preparative change to pass a boolean with known value (A66)
Change-Id: Iff03fe7c4a8eec17c00a2fe99197e0cf21a0630a
2012-07-09 15:06:15 +09:00
Jean Chalard 853f4221ab Merge "Remove useless processing (A65)" 2012-07-08 23:05:11 -07:00
Tadashi G. Takaoka 6b4ce58fc6 Remove unused WordComposer.init method
Change-Id: I46c6a6e1c1536599cb909bf81297001b238f2ec8
2012-07-06 20:12:14 +09:00
Tadashi G. Takaoka 36311cacd6 Merge "Extend onTextInput to be able to inject suggestions" 2012-07-06 03:40:03 -07:00
Tadashi G. Takaoka 4be03befe3 Extend onTextInput to be able to inject suggestions
Change-Id: I1061da0edfdb05c64c5711717d4ef9fa9681e568
2012-07-06 19:36:11 +09:00
Jean Chalard a3dee0d062 Merge "Fix a bug where spaces would be forgotten" 2012-07-06 02:09:28 -07:00
Jean Chalard 4fde56b818 Fix a bug where spaces would be forgotten
Bug: 6785706
Change-Id: Ic7bf242ef058d116b986d47ad197b6d2802e2342
2012-07-06 17:51:10 +09:00
Jean Chalard 8e36e5102e Remove useless processing (A65)
We just resetted the composing state - updating suggestions
is sure to yield no results. We may as well not call
updateSuggestions at all.
We should however still cancel any lingering timer from a
previous input field, to avoid this useless processing.

Change-Id: Ic1a19d577903d792bb797c837cc517ea8d430e75
2012-07-06 16:28:42 +09:00
Jean Chalard 449be371ae Refinement (A64)
Change-Id: I7c16e28ffce4fe0965b756bf2b00ee63b77dd039
2012-07-06 16:28:42 +09:00
Jean Chalard 43193ad60f Remove useless code (A63)
If the separator is not a space, then we will always call
setPunctuationSuggestions and reset the suggestion strip anyway.
If the separator is a space, then the cursor has a space on
the left, which means isCursorTouchingWord depends only on
whether it touches a word on the right. If we were displaying
the "add to dictionary hint", it means a suggestion was just
chosen, so it had to be displayed, and that requires a composing
word and no non-separator at the right of the cursor.

In the end, if we go through this postUpdateSuggestions call,
we are sure we will reset the suggestions later in this method,
either by calling postUpdateBigramPredictions, or
setPunctuationSuggestions.

Change-Id: I95d5f77a5d0ac6d1a6ced8d67d6ac8f650db4a32
2012-07-06 16:28:42 +09:00
Jean Chalard 8ba33c1a49 Simplification (A62)
Change-Id: I606270a0387787445b7cd6b94e4830bfc144b49e
2012-07-06 16:27:55 +09:00
Jean Chalard 66a2e96fb4 Remove useless code (A61)
Just after this, clear() will be called, removing the suggestion
strip from the screen. It will later be displayed again through
onStartInputView, which will update its content.

Change-Id: I15c23ad2adecab76b0791d7fc222d15b6533f3bd
2012-07-06 13:07:48 +09:00
Jean Chalard b1dc8ad5f2 Simplification (A60)
Change-Id: I99e912d3edfc7dd3f17ee835331d5fcba976750c
2012-07-06 13:07:48 +09:00
Jean Chalard 663dbfd1cc Simplification & UI improvement (A59)
The responsivity is better like this. This does not seem to
feel slow as the previous comment seemed to indicate.

Also remove a stale comment.

Change-Id: I4e7bf9fe28716e112db182e44b3fa88ee4526bb4
2012-07-06 13:07:48 +09:00
Jean Chalard 746e014eb5 Show predictions in the right cases (A58)
After reverting an auto-correct we always have a separator after
the previously inserted word, and the cursor is never touching
a word. Showing predictions is the right thing to do, while
calling postUpdateSuggestions will invariably yield an invariably
blank suggestion strip, which is not very helpful.

Likewise, after we pick a suggestion, we should be showing the
predictions unless showing the addToDictionary hint. There was
a bug here in the corner case that the word would be a candidate
for user dictionary, but the user dictionary provider is not
available: in this case we should be showing predictions, but
we were showing an unhelpful empty suggestion bar.

Change-Id: I287bb5eb4af762bd5a433e85e185fab6d203e91a
2012-07-06 13:07:48 +09:00
Jean Chalard 0e9e7e337d Cleanup (A57)
We stopped cancelling manual picks a few weeks ago. This code
is dead.

Change-Id: I4032fcc3c95e9379f1839fe860a1b8a9bd7d0bc7
2012-07-06 13:07:30 +09:00
Jean Chalard 29eeef75ec Merge "Fix a bug where the caps mode would not be changed" 2012-07-05 19:11:28 -07:00
Jean Chalard f254e3fec7 Fix a bug where the caps mode would not be changed
Bug: 6766059
Change-Id: I378f9d35c4904c4f373260bda5863235d833eb31
2012-07-06 11:08:20 +09:00
Jean Chalard d81e7d24d3 Simplification (A56)
If suggestion and prediction messages both happen to be in
the queue, the latest one will win (update the suggestion strip
later than the other, overwriting any previous suggestions).
So when we enqueue either one, it is always safe to cancel
all messages of both types.

Change-Id: Iad9dd06d08c49f60cac16b88edcc9531a18ec02e
2012-07-05 18:19:51 +09:00
Jean Chalard 414f14436e Remove an unused method (A55)
Change-Id: I9974b88923b85cd6bec74f7607067c660f36f040
2012-07-05 18:10:37 +09:00
Jean Chalard c84f178cd9 Merge "Remove a useless method, rename another. (A54)" 2012-07-05 02:05:50 -07:00
Tadashi G. Takaoka 92d2f7e03b Merge "Initialize SubtypeLocale from Settings" 2012-07-05 02:04:35 -07:00
Jean Chalard 792e7ddc24 Merge "Remove a redundant test (A53)" 2012-07-05 01:57:04 -07:00
Jean Chalard 9636735c0a Merge "Small simplification (A52)" 2012-07-05 01:56:55 -07:00
Jean Chalard 21524c755c Merge "Put some more code in common (A51)" 2012-07-05 01:50:44 -07:00
Jean Chalard 71d7fc91b7 Merge "Pull up a common variable into the wrapping method (A50)" 2012-07-05 01:47:59 -07:00
Jean Chalard ac3ad6ef9f Merge "Factorize some common code (A49)" 2012-07-05 01:45:08 -07:00
Tadashi G. Takaoka d6ac0443f0 Initialize SubtypeLocale from Settings
Bug: 6781106
Change-Id: I22f04af4fabf93346ab6f72c1841f096afaccb96
2012-07-05 17:39:30 +09:00
Tadashi G. Takaoka 15d3532170 Merge "Fix tab key's navigation behavior" 2012-07-05 01:24:00 -07:00
Jean Chalard 3d8e7a62fc Remove a useless method, rename another. (A54)
Change-Id: If36b5375b04f68deeb72bcece3cb8d37aed57f59
2012-07-05 17:22:15 +09:00
Jean Chalard 0783366036 Remove a redundant test (A53)
Change-Id: If711074fdcb586e35d02e421c845f2c9024ca718
2012-07-05 17:22:04 +09:00
Jean Chalard 4cba560dbb Small simplification (A52)
Change-Id: I56bc5b9b584de5a14b41fc32c19f7fefb3b12e88
2012-07-05 17:22:00 +09:00
Jean Chalard ea80794dd4 Put some more code in common (A51)
Change-Id: If1589e29728df20713c75e08df7f47f0de9202d4
2012-07-05 17:21:55 +09:00
Jean Chalard cbfd2e1fdb Pull up a common variable into the wrapping method (A50)
Change-Id: I0b62098308169b5c44ced25ffb902766e3732fbf
2012-07-05 17:21:51 +09:00
Jean Chalard 7ed22f1f72 Factorize some common code (A49)
Also add some comment to clarify what's happening inside those
methods

Change-Id: I5b9b1e105b3145f0b050f35d12c5b6ca6e4a4d8c
2012-07-05 17:21:44 +09:00
Tadashi G. Takaoka b28934adac Fix tab key's navigation behavior
Bug: 6435484
Change-Id: Iffe459c117ad438e96ec6f5c7e64fb80b32d227e
2012-07-05 16:57:14 +09:00
Jean Chalard e47c728dd5 Add a wrapper to updateSuggestions / Predictions (A48)
The goal is to have those converge, as they contain almost 100%
duplicated code.

Change-Id: I6921791d47efce9fb396efd9626839d706664a91
2012-07-05 11:10:04 +09:00
Jean Chalard 7b40c68277 Refactoring which will help with future changes (A47)
Change-Id: Ibc2d28f9f95966f77d4d7bdf9ae4688baaed5989
2012-07-05 11:10:02 +09:00
Jean Chalard e9a86e2cdb Search bigrams for the lower case version of the word (A46)
...if there aren't any for the exact case version.

Bug: 6752830
Change-Id: I2737148b01ba04a64febe009ceb2ef53c265d224
2012-07-04 20:12:58 +09:00
Jean Chalard 4bcf70c931 Fix a bad interaction with mmap
Bug: 6761221
Change-Id: I7e6d98dc9d7cb34a6163c3957e401ff97abb975c
2012-07-04 17:57:06 +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 5c98206dc5 Merge "Use Keyboard.getKey" 2012-07-04 01:12:02 -07:00
Tadashi G. Takaoka adc80eef15 Use Keyboard.getKey
Change-Id: I722b9e981389f660db928b7fd5ced1b82371fbf3
2012-07-04 16:31:57 +09:00
Tadashi G. Takaoka 040aa28ed4 Merge "Get rid of redundant CharSequence member from SuggestedWordInfo" 2012-07-04 00:27:07 -07:00