Commit Graph

7614 Commits (c7387a4fd065ad6782b0705e56f9556ac9cf127f)

Author SHA1 Message Date
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 cc470c78e4 Move an implementation detail to native code (A107)
Java code does not have to know about this implementation detail:
the generic method should do the dispatching, instead of having
the caller call either method.

Change-Id: Ic13727f0cb18f4ced2c356cce2f8d710588c0421
2012-07-12 13:09:44 +09:00
Jean Chalard 6a5d17cd2f Remove a useless parameter (A106)
Change-Id: Ic0ecea22212fd1a098a3a168da460374e446f4a3
2012-07-12 11:28:16 +09:00
Jean Chalard 1a69ad5a10 Remove a constant parameter (A105)
Change-Id: I8a09fa2f0649880c943364699a07652e47dede22
2012-07-12 11:27:55 +09:00
Jean Chalard b7d7c5a369 Make a constant really constant (A104)
Change-Id: Ied1f9f96a574b1e6a8ee0a71bfb1604d9c962e1c
2012-07-12 11:16:30 +09:00
Ying Wang 8f7f04fead Import translations. DO NOT MERGE
Change-Id: I056d8d8d630a2b3576462f7900bc39a7f19f5aa0
Auto-generated-cl: translation import
2012-07-11 15:33:02 -07: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
Tadashi G. Takaoka 91f7086bf5 am 8a961759: (-s ours) am 86ade472: Merge "Initialize SubtypeLocale from Settings (DO NOT MERGE)" into jb-dev
* commit '8a96175936e6f4cc02e4fc3cd3ae6759f0b1f86e':
  Initialize SubtypeLocale from Settings (DO NOT MERGE)
2012-07-10 18:38:41 -07:00
Tadashi G. Takaoka 8a96175936 am 86ade472: Merge "Initialize SubtypeLocale from Settings (DO NOT MERGE)" into jb-dev
* commit '86ade47236f8aac94b7e4378c034e32805d6755b':
  Initialize SubtypeLocale from Settings (DO NOT MERGE)
2012-07-10 18:35:19 -07:00
Tadashi G. Takaoka 86ade47236 Merge "Initialize SubtypeLocale from Settings (DO NOT MERGE)" into jb-dev 2012-07-10 18:32:19 -07:00
Ying Wang 60baf00b3a Import translations. DO NOT MERGE
Change-Id: I0376c38451de66ff8c40b488ed3a8599326755ad
Auto-generated-cl: translation import
2012-07-10 14:20:17 -07:00
Jean Chalard ff730dbd14 Merge "Remove useless member variables (A93)" 2012-07-10 04:33:32 -07:00
Tadashi G. Takaoka 20823b4623 Merge "Register the key when the finger slides off it in multitouch" 2012-07-10 04:19:40 -07:00
Jean Chalard 6f233f7ba1 Remove useless member variables (A93)
Change-Id: Iff0a0e8835f4d630b51a15c0d91881437094e785
2012-07-10 20:18:10 +09:00
Tadashi G. Takaoka 5e06b8534f Register the key when the finger slides off it in multitouch
Moved from jb-dev branch (I807fd6f4).

Bug: 6722867
Change-Id: I9764ac72f726396caaac819675d440372c882981
2012-07-10 20:14:29 +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