Commit Graph

2611 Commits (86342fb79718389d12ae98c82d853de952d64a4d)

Author SHA1 Message Date
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