Commit Graph

1717 Commits (bfabac449d0b529ee22887aa198a34fdf04b3beb)

Author SHA1 Message Date
Tadashi G. Takaoka bcd30bf3e7 Suggestion strip honors RTL layout
Bug: 9126496
Change-Id: Ia4a1c52bd2a80ea7fe6b9529f2767fee5f9e8aeb
2014-01-28 15:47:54 +09:00
Jean Chalard 86210c7dc7 [IL96] Inline a method
Bug: 8636060
Change-Id: I517591c484dce74788398cf4a4db9a074d91a6c0
2014-01-28 15:47:04 +09:00
Jean Chalard 90916143b6 [IL95] Inline a method that's always called in sequence
Bug: 8636060
Change-Id: I514cf14596b3fa46eccadcf536342e4bb805708d
2014-01-28 15:47:01 +09:00
Jean Chalard 5b5e877efe [IL94] Remove a function and some reordering
Bug: 8636060
Change-Id: I4baa237c9c7b58a8eb4158c34b9d3f3dfb95c69c
2014-01-27 20:38:45 +09:00
Jean Chalard 37e1cc931f [IL93] Refactor a method inside another
The calls to setAutoCorrectionIndicator with a constant are
always the exact same as mWillAutoCorrect.

Bug: 8636060
Change-Id: I8106919819b978b0a9655af2ef444664fad4c1ad
2014-01-27 20:38:45 +09:00
Jean Chalard 4c6029e530 [IL92] Straighten out showSuggestionStripWithTypedWord
Bug: 8636060
Change-Id: I066ff29c76349f0ab61441ea5f7bc9085d24bdbc
2014-01-27 20:38:45 +09:00
Jean Chalard c6367ee64d [IL91] Call reorder
Bug: 8636060
Change-Id: I3d0ce6dcb3b51cabc424d00a397d243c32360e92
2014-01-27 20:38:43 +09:00
Jean Chalard d38b0468b0 [IL90] Small refactoring
Bug: 8636060
Change-Id: I37844ab1c5c61ea940897e7d72bb79c7b329f743
2014-01-27 18:42:33 +09:00
Jean Chalard 33ff321d6c [IL89] Inline a function
We will then refactor the contents of showSuggestionStripWithTypedWord

Bug: 8636060
Change-Id: I8a2a0d50b79fcc7ad21b01a0060b9fa7e4c1bdd6
2014-01-27 18:42:33 +09:00
Jean Chalard ca819178a1 [IL88] Simple refactoring
With this, the value passed to suggestedWords is never null.

Bug: 8636060
Change-Id: I433dd7e7290125e217e05cc20bee7a4b58fe083f
2014-01-27 18:42:33 +09:00
Jean Chalard d90bdd2187 [IL87] Remove a call to clearSuggestionStrip
The goal is to remove the function completely.

Bug: 8636060
Change-Id: I50b8f0368c8f6506209398ff931881e2235c3d2d
2014-01-27 18:42:33 +09:00
Jean Chalard 07eddf3c43 [IL85] Maybe show punctuations when app completions are null
When the app goes to the trouble of supplying completions,
but supplies null, then we should show punctuations if
settings allow.

Bug: 8636060
Change-Id: I33c32566039c80df61fcca3fab346fd336d96a12
2014-01-27 18:42:32 +09:00
Jean Chalard b2c0388a69 [IL84] Remove a useless call and rename a method
Bug: 8636060
Change-Id: I5cac787953a3c71b6402520c2f5c70619d4a40a8
2014-01-27 18:42:32 +09:00
Jean Chalard eb190ab32f [IL83] Inline a call
The coming string of changes is very complicated, so
I'm going to do things really slowly.

Bug: 8636060
Change-Id: Id8a07a154ac514e9b3307ead22d47c3ae6fa732b
2014-01-27 18:42:32 +09:00
Jean Chalard 17f1528f9e [IL82] Fix a wrong comment
Change-Id: I6e16b4e05010a08f4d1da34145f819c32b3bc79e
2014-01-27 18:42:32 +09:00
Jean Chalard f59487379e [IL79] Some refactoring
Bug: 8636060
Change-Id: I931c553f68a1f15d22711a661dbffd4e5d421979
2014-01-27 18:42:29 +09:00
Jean Chalard 10460441db [IL78] Move most of onUpdateSelection to InputLogic.
Bug: 8636060
Change-Id: I7290250637e37bf6964bab71d2141e19f20a5459
2014-01-27 18:42:04 +09:00
Jean Chalard 68d7291a6b Merge "[IL77] Remove refs to Settings from InputLogic" 2014-01-27 09:29:50 +00:00
Jean Chalard 7bee84095e Merge "[IL75] Move the SubtypeSwitcher out of InputLogic." 2014-01-27 09:24:10 +00:00
Jean Chalard 48df380f78 [IL77] Remove refs to Settings from InputLogic
Bug: 8636060
Change-Id: I4ce5c9b62181ce8593a453ce222ae7d1fdc08f07
2014-01-27 18:18:54 +09:00
Jean Chalard 969c06072d [IL75] Move the SubtypeSwitcher out of InputLogic.
Bug: 8636060
Change-Id: I2a5da27e73cf378e55bd80ab2054c1ba8b13f6ec
2014-01-27 18:18:27 +09:00
Jean Chalard 5cf70a1d44 Merge "[IL74] Remove unused/unwanted arguments to a method." 2014-01-27 08:57:12 +00:00
Jean Chalard 0fd556ceca [IL74] Remove unused/unwanted arguments to a method.
Bug: 8636060
Change-Id: I3c5213cc57b5b5febd25f14d40c197d2da43dfb8
2014-01-27 16:48:17 +09:00
Ken Wakasa 03283b636c Follow up to Ic7d2cbb2c1b2deaa4e735484bdc7413c0b3b1939
some cleanups as well

Change-Id: I92252eb7b13cb70283a79f50429ed77405ea9575
2014-01-27 16:08:27 +09:00
Jean Chalard 1d6e647ac3 [IL69.1] Move a static method to a utility class.
This is a followup to IL69.

Change-Id: Iba154517aa7f75b9f16aa1b808c0da8d84be837f
2014-01-24 11:59:23 +09:00
Jean Chalard 1284e556f4 [IL70] Remove unused arguments
Bug: 8636060
Change-Id: Iec56bce362ebfc52fedab02b127978abb4f3c7f9
2014-01-23 15:33:14 +09:00
Jean Chalard d1f463eacf [IL69] Oust Keyboard from WordComposer#setComposingWord
Bug: 8636060
Change-Id: I624a45500603dfad355ee3b8b794b2d895219c0b
2014-01-23 15:32:59 +09:00
Jean Chalard eb6d41a525 [IL67] Externalize a call to the keyboard switcher
Bug: 8636060
Change-Id: Ib13a54854e30afb79217a0a1f2aeca50a95ba155
2014-01-23 13:10:02 +09:00
Jean Chalard ab80b41a0d [IL66] Remove two accesses to KeyboardSwitcher.
Bug: 8636060
Change-Id: I3b144993e2bcd552f9b292b8f057c9db4216125c
2014-01-23 13:09:58 +09:00
Jean Chalard a91dfff5e5 [IL65] Pull up X,Y processing, step 4
This works because getKey{X,Y} is a no-op on
Constants.NOT_A_COORDINATE.

Bug: 8636060
Change-Id: I2f7dd96b6011f094110f7978f8ff24ef2a6e2585
2014-01-22 14:44:27 +09:00
Jean Chalard 352286a43b [IL64] Pull up X,Y processing, step 3
Bug: 8636060
Change-Id: Ic051e5d5514d270101b0571a2d30e2caa8f85bc1
2014-01-22 14:44:25 +09:00
Tadashi G. Takaoka 3033cc51b8 Refactor logic to retrieve relevant suggestions a bit
Change-Id: Ic7d2cbb2c1b2deaa4e735484bdc7413c0b3b1939
2014-01-20 12:08:25 +09:00
Jean Chalard 17bd129faf [IL59] Rename a method
Um... this is not async ? Remove that from the name

Bug: 8636060
Change-Id: Ida5f9bd6929eae75103eb2e3fb866ed7468af806
2014-01-17 02:10:56 +09:00
Jean Chalard ac6dfaf80b [IL58] Simplification
No need to test multiple times for this. Let's just never do useless
stuff, and only test for that once.

Bug: 8636060
Change-Id: I50a9e4da769fbec44fbb12eedfed03aad924cc2c
2014-01-17 02:10:51 +09:00
Jean Chalard 4752b68f5a [IL56] Don't erase suggestions when reverting a commit.
Bug: 12297051
Change-Id: Iffa1c98b8fe2b816c3ac6bc171037288107f637d
2014-01-16 03:22:46 +09:00
Jean Chalard 6c24b91601 [IL55] Remove a useless argument.
Change-Id: I0b3a6cdf49038c32194413c21da824784a53f581
2014-01-10 20:28:50 +09:00
Jean Chalard a224aafea3 [IL54.5] Use the cursor pos estimate, not the last value
For edit tasks, the estimate is actually the right thing to use.
This is really dangerous, but it will get rid of pretty much all
race conditions.

Change-Id: I2d5ca3ce45e32f1bd9c8b778421fd54b9c1f6f63
2014-01-10 19:08:47 +09:00
Tadashi G. Takaoka 494e2d6c17 Passing SpacingAndPunctuations to RichInputConnection.getNthPreviousWords
Change-Id: I174c50f509ed6998b755e1a712e7f6c0f82f4425
2014-01-09 18:33:25 +09:00
Keisuke Kuroyanagi 9f1fe87580 Make reloadMainDict() private.
Bug: 8187060
Change-Id: I852a751d748f39512e62c9cd69748dfbe87b2151
2014-01-08 18:59:43 +09:00
Keisuke Kuroyanagi b3c51630a6 Fix: NPE in LatinIME.loadSettnigs().
Change-Id: Icae6c74401a7a8f4da6015737f09f557640c0cca
2014-01-08 12:43:58 +09:00
Tadashi G. Takaoka 385031557b Merge "Separate spacing and punctuation related settings values" 2014-01-08 02:41:51 +00:00
Tadashi G. Takaoka 0b593ce858 Separate spacing and punctuation related settings values
Bug: 12179576
Change-Id: Ibafd824a0ea2251843b388e95dcbd8f9bca92d5c
2014-01-08 10:02:37 +09:00
Keisuke Kuroyanagi c09fd175c3 Prepare using dictionaryFacilitator for amanatto updates.
Bug: 11736529
Change-Id: I0d9d9b1c1108b11064163df7c2089f53e92cd7ad
2014-01-07 18:11:23 +09:00
Keisuke Kuroyanagi 55713e3695 Update personalized dict only when single subtype is used.
Bug: 12424891
Change-Id: If041d1ab45988dbf9b878ae3367fee0fbc8a8988
2014-01-07 18:10:27 +09:00
Jean Chalard 1e50c681af [IL52] Remove a useless method.
This old method doesn't even re-read the old suggestions. It used to
recompute them without the coordinates.
Re-using the recorrection code, which is much more advanced, is
the right thing to do here.

Also, refining the test. It's no use trying to resume suggestion
if we don't have a suggestion strip, since we aren't going to
auto-correct anything anyway.

Not the motivation for this change, but this also fixes
Bug: 11620256
Change-Id: Id49efa32e293c49837c61fdc752c86bbac1d2c88
2013-12-27 22:40:19 +09:00
Jean Chalard 53c320e275 [IL50] Move the InputUpdater out of LatinIME.
...at last

Bug: 8636060
Change-Id: If5e27a9d28ff64d318dd76792f55edfc8a78d2d7
2013-12-27 21:09:41 +09:00
Jean Chalard 81e0ca5fd3 [IL49] Move InputLogic-related init code to InputLogic.
Bug: 8636060
Change-Id: Ie5027512f066d9c530a686ac559e4649a39bf439
2013-12-27 20:06:39 +09:00
Jean Chalard d05ea8bd82 Merge "[IL48] Move onEndBatchInputAsyncInternal to InputLogic." 2013-12-27 08:06:48 +00:00
Jean Chalard af26a44102 Merge "[IL47] Inline getSuggestedWordsGestureLocked" 2013-12-27 08:04:51 +00:00
Jean Chalard 51e79fb4b2 Merge "[IL46] Remove a useless message passing." 2013-12-27 07:56:56 +00:00
Jean Chalard 2fc1cc099f Merge "[IL45] Remove lingering messages" 2013-12-27 07:56:44 +00:00
Jean Chalard c654fe57b1 [IL48] Move onEndBatchInputAsyncInternal to InputLogic.
Bug: 8636060
Change-Id: Idfabf7231a80e21786ce1910b5140bb3dddcac7d
2013-12-27 16:50:08 +09:00
Jean Chalard 4a144b9b4d [IL47] Inline getSuggestedWordsGestureLocked
This method is confusing with the *Locked convention, and
the two-step call creates a useless callback object. This is
better inlined both for readability and for performance.

Bug: 8636060
Change-Id: I7c427c3ca4e831388a6d54de6728b32206a45d80
2013-12-27 16:50:08 +09:00
Jean Chalard 71a3e96382 [IL46] Remove a useless message passing.
The only point of this message is to send the processing on another
thread. However, this will be accomplished later.
Here is the exact call graph:
0. onUpdateBatchInput
1. -> MSG_UPDATE_GESTURE_PREVIEW_AND_SUGGESTION_STRIP
2. -> updateBatchInputSync
3. -> getSuggestedWordsGestureLocked
4. -> MSG_GET_SUGGESTED_WORDS
5. -> LatinIME#getSuggestedWords

The point of both step 1. and step 4. is to make sure the processing
is happening on the InputUpdater thread. Thus, it's useless to do
it twice.

Bug: 11326092
Bug: 8636060
Change-Id: Iceebb9e8879a8f15b73c987f5fd3489f27699be4
2013-12-27 16:50:06 +09:00
Jean Chalard 0d21223521 Merge "[IL44] Some factorization" 2013-12-27 06:58:12 +00:00
Jean Chalard 31ff2a4335 [IL45] Remove lingering messages
Bug: 8636060
And possibly bug: 12085864

Change-Id: I867036bc3d8bd255dc8ceebdd30e28b4b3dc4b2d
2013-12-27 15:34:30 +09:00
Jean Chalard 69e7a0d24d [IL44] Some factorization
This sheds some light on what's happening here. Some
comments were at least misleading, maybe indicating something
is not sequenced as intended.

Bug: 8636060
Change-Id: Ia74feb457a39fe4a672c27fe4203264fda940f04
2013-12-27 15:34:26 +09:00
Keisuke Kuroyanagi c197b9ed90 Merge "Make setAdditionalDictionaries private." 2013-12-27 06:22:18 +00:00
Keisuke Kuroyanagi abc3d0eb56 Make setAdditionalDictionaries private.
Bug: 8187060
Change-Id: I17be7b77ff89972d3ca6823b087b7bf35105af56
2013-12-27 14:49:32 +09:00
Jean Chalard f441047fad [IL43] Small cleanup
All calls are already passing this

Bug: 8636060
Change-Id: I13accefd7c17039dc5ec12dc9e8133ebc86451ad
2013-12-26 22:12:24 +09:00
Jean Chalard c28f02880c [IL42] Inline getSuggestedWordsOrOlderSuggestionsAsync
Bug: 8636060
Change-Id: I5c47370a3ea5962caff4d40db2faa62accfc7147
2013-12-26 22:12:22 +09:00
Jean Chalard 70433efc41 [IL41] Remove a useless call and trampoline.
No point in calling maybeRetrieveOlderSuggestions now that the
same work is done right here. The callback is also useless now.

Bug: 8636060
Change-Id: Ic14849cb6f6e6293a42cfe068f5c6b18b7677bc0
2013-12-26 21:58:41 +09:00
Keisuke Kuroyanagi a374482719 Extract dict operations from Suggest to a new class.
Bug: 8187060
Change-Id: I77775aa50763158d99753c2312fa11fe14267aef
2013-12-26 20:48:19 +09:00
Jean Chalard 5c45ff1214 [IL39] Change a test.
I don't see why we would want to remove other suggestions just because
the only suggestion happens to be a dictionary word. That's just
inconsistent.

Bug: 8636060
Change-Id: Ie2d990e5785273d625e6e5518026364165a8f2df
2013-12-26 18:44:17 +09:00
Jean Chalard 98140faac3 [IL38] Fix a wrong double call
This only gives bad results if a gesture results in only one suggestion.

Change-Id: I5a2f27f83f6901a5a9ecf22f02bdfc9cca6d9f1d
2013-12-26 18:43:47 +09:00
Jean Chalard 30a72da42c [IL37] Small simplification
Bug: 8636060
Change-Id: I08a6c04986a0bd86ce4c232893e804766ebeebb9
2013-12-26 13:51:09 +09:00
Jean Chalard c08119e5c1 [IL36] Inline setAutoCorrection
There are far too many one-use methods.

Bug: 8636060
Change-Id: I84e0669b8d2cc5a2817c42b089e874dc60e84769
2013-12-26 13:18:36 +09:00
Jean Chalard 52a2682b99 [IL35] Preparative cleanup
Bug: 8636060
Change-Id: Id6791085816891c78289b0223bf0807db2da6300
2013-12-25 22:25:49 +09:00
Keisuke Kuroyanagi bb39518bd7 Use SettingsValues instead of Settings in Suggest.
Bug: 8187060
Change-Id: Idba1e708d67c036072b728949d17f8bd98ae0115
2013-12-25 18:53:04 +09:00
Keisuke Kuroyanagi eea7122e5b Move dict operations to Suggest.
Bug: 8187060

Change-Id: Iabe13abcd43b381360f7080b3f4ee0533f246160
2013-12-25 15:26:50 +09:00
Keisuke Kuroyanagi f1457e7a22 Remove personalized dicts when the option is turned off.
Bug: 11757851

Change-Id: I94f32859d862fe41e39845ab2bfc2d396c6aea0f
2013-12-25 11:44:16 +09:00
Jean Chalard 8476c2e788 [IL33] Opportunistically remove some KeyboardSwitcher
Bug: 8636060
Change-Id: I0480ac03b9902e940f566b5558b8499647983968
2013-12-24 15:11:35 +09:00
Jean Chalard 1587be6977 [IL31] Move *BatchInput to InputLogic
Bug: 8636060
Change-Id: If0309be038518a71d735108b78ac9efbfe38c82b
2013-12-20 21:24:27 +09:00
Jean Chalard 059f4c2f39 [IL30] Minor refactoring
Change-Id: I8a8aa9f703c6fca5e25ec573b41f325680ac92dc
2013-12-20 20:47:44 +09:00
Jean Chalard 0547b33130 [IL29] Move retryResetCaches and tryFixLyingCursorPosition
Bug: 8636060
Change-Id: I45b322e4844f023e91b80f9c2e0f7fa0166bcc59
2013-12-20 20:47:29 +09:00
Jean Chalard 81e8d16031 [IL28] Remove useless code
I don't understand why this was checked in. The tests are completely
useless, that makes the variables write-only, and the only side effect
is useless as the keyboard commits suicide upon exiting debug
settings.

Change-Id: I4eb25295183f43a2e947a6a0467ea168d023c18a
2013-12-20 19:48:05 +09:00
Jean Chalard 55ce2cc2d5 [IL27] Some refactoring
Bug: 8636060
Change-Id: Iedfdf71350f5fe3ab451fc5ec6e3c9901f71e50f
2013-12-20 19:24:38 +09:00
Jean Chalard 221df9e59a [IL26] Move restartSuggestionsOnWordTouchedByCursor
Bug: 8636060
Change-Id: I373874585f4fa663b4207b9a02d751805259eb36
2013-12-20 19:09:36 +09:00
Jean Chalard ec4b6e7bb3 [IL25] Inline handleClose
Only ever used here.

Bug: 8636060
Change-Id: Ia98c8bbe1c63ad4d057efe1cee87829b06124479
2013-12-20 18:44:13 +09:00
Jean Chalard aa161eb371 [IL24] Move mDisplayOrientation to SettingsValues.
Bug: 8636060
Change-Id: Id57ced0cca9dc9e5e85c3a53683588feb28c1402
2013-12-20 18:44:09 +09:00
Jean Chalard 11730aa224 [IL22] Move onTextInput to InputLogic.
Also pull the TLD specific processing

Bug: 8636060
Change-Id: I20931ac6fc6c55a05aa8f8b97b0210c07d230ea2
2013-12-20 16:50:14 +09:00
Jean Chalard 1404c1af85 [IL21] Move the workaround utils to a better place.
Bug: 8636060
Change-Id: I566f9e109ebcabe3a6a778118434ce79d02d1113
2013-12-20 16:48:54 +09:00
Jean Chalard 8a390023e1 [IL20] Remove some useless processing.
If we have the same text field, then the target app is
necessarily the same. No need to re-evaluate it.

Bug: 8636060
Change-Id: I66eb194c4cd08a6c1d47b26b99bd7f420130097e
2013-12-20 16:02:07 +09:00
Jean Chalard 4487a30e0d [IL19] Resolve a TODO.
Bug: 8636060
Change-Id: Iec7c1001c46cf8e9a44422e3f9008e437cc5cab6
2013-12-20 16:02:03 +09:00
Jean Chalard 2a6de7903c [IL18] Move and rename updateSuggestionStrip
Bug: 8636060
Change-Id: I3d00095cd0e83d1ee3834b37ff188b5aa9806fcb
2013-12-20 15:46:34 +09:00
Jean Chalard 1c0374da49 [IL17] Move commitChosenWord to InputLogic.
Also not-cache a value whose documentation says not to cache
it. That makes it write only, so remove it.

Bug: 8636060
Change-Id: I39798a039cebf79ad78a41fe457c9d9764a3f275
2013-12-20 15:13:48 +09:00
Jean Chalard a905fcec00 [IL16] Improve getTextWithSuggestionSpan
Dynamically test for the presence of main dict suggestions. This
is much more potent and more accurate than the vaguely defined
boolean.
Also, resolve a TODO and avoid creating an object uselessly.

Not directly related, but helpful with:
Bug: 8636060

Change-Id: Ib1745f77ee6d9ec7cd8bbfa5a548652ec84ec902
2013-12-20 15:13:48 +09:00
Jean Chalard 5c9e677c2a [IL15] Some small refactoring
Bug: 8636060
Change-Id: I4bfdf1628c9b55a79bd2d88ee30bf10b08a49232
2013-12-20 11:24:45 +09:00
Jean Chalard 48ba1f25ff [IL14] Move getCurrent*Caps* to InputLogic
Bug: 8636060
Change-Id: I6338dcee0f7a80f2181ba0369f71350cb21d231a
2013-12-20 11:24:42 +09:00
Jean Chalard bbe40835a9 [IL12] move restartSuggestions* to InputLogic
Bug: 8636060
Change-Id: I99474248e8fa35eb3053b5520abc8716805fdfb4
2013-12-19 20:30:41 +09:00
Jean Chalard 10755af97b [IL11] Cleanup
Make some methods private and add comments.

Bug: 8636060
Change-Id: I6c7d13dca8a22dd1a6f110e8b18d52864429579f
2013-12-19 20:13:14 +09:00
Jean Chalard 060e292628 [IL10] Move revertCommit to InputLogic
Bug: 8636060
Change-Id: Ia5788b365f05ae880bad957cbef00ecc93abb5d1
2013-12-19 19:30:26 +09:00
Jean Chalard 69a57bcdcd [IL9] Move commitCurrentAutoCorrection to InputLogic
Bug: 8636060
Change-Id: I405c4a537858a6d5ab0b29502a2792e8c3b2564e
2013-12-19 19:30:20 +09:00
Jean Chalard 035e3885ac [IL8] Move handleNonSeparator to InputLogic
Also move getActualCapsMode and getNthPreviousWordForSuggestion

Bug: 8636060
Change-Id: I1ee9162d0b7a517070c4b7420b084c973f061533
2013-12-19 18:32:51 +09:00
Jean Chalard d85e49bf8c [IL7] Move performRecapitalization to InputLogic
Bug: 8636060
Change-Id: I5bf2b1fa2f9338fe28151e66eac1ceda6dbd4a7f
2013-12-19 18:20:41 +09:00
Jean Chalard 40b42b7d84 [IL6] Move handleSeparator to InputLogic
Also move swapSwapperAndSpace, maybeDoubleSpacePeriod,
maybeStripSpace, promotePhantomSpace and canBeFollowedByDoubleSpacePeriod

Bug: 8636060
Change-Id: I864053d21c4b3d51ee7a3cd79053ca602337f6f8
2013-12-19 17:39:01 +09:00
Jean Chalard c8dfaab783 [IL5] Some renaming
Bug: 8636060
Change-Id: Id76889f8405458bcacb9c7c694cb193b27b842f3
2013-12-19 17:38:55 +09:00
Jean Chalard 37d3f1bd02 [IL4] Move handleNonSpecialCharacter to InputLogic.
Bug: 8636060
Change-Id: I9c6869c85db49d7f87e95a421389eaf47ae3ab2e
2013-12-19 16:46:57 +09:00
Jean Chalard 0e82fa273d [IL3] Move handleBackspace to InputLogic.
Also move resetEntireInputState, resetComposingState,
sendDownUpKeyEvent, sendKeyCodePoint and getTextWithUnderline

Bug: 8636060
Change-Id: Ic4c270ac49769ffba41dc3f12d16ac3aa938717f
2013-12-19 16:46:54 +09:00
Jean Chalard cddf4f9d78 [IL2] Move onCodeInput to InputLogic.
Bug: 8636060
Change-Id: I8c5c028d81183adb0167b2034ee01de8048edafb
2013-12-19 16:24:45 +09:00
Jean Chalard 7bd2a75ca1 Start separating the input logic from LatinIME.
Create an InputEngine class and start moving the relevant
variables to it.

Bug: 8636060
Change-Id: I64adef4ac01e665c19bb7c5b93517a0cbd03d817
2013-12-19 14:48:43 +09:00
Jean Chalard dfbe2bfe08 Add some info to test crashes to help diagnose flakiness
Bug: 11142685
Change-Id: Ic3a5d452f6c325248ac4e1bfa37774c58586f359
2013-12-18 18:10:56 +09:00
Keisuke Kuroyanagi 1f5a3faf76 Merge "Enable Personalized dictionaries based on the setting." 2013-12-17 10:40:29 +00:00
Keisuke Kuroyanagi 8732f9c5f9 Enable Personalized dictionaries based on the setting.
Bug: 11757851
Change-Id: I83e484195f036e35cbae21fe63148bc9c22bfad7
2013-12-17 19:36:19 +09:00
Jean Chalard 7cd7cf73f4 Fix a bug with languages without spaces and predictions
This is simpler and more correct.

Change-Id: I41806d2fc12b4ca25f76e32972b38f91f3d05c2b
2013-12-16 23:16:02 +09:00
Jean Chalard dc06ee85ef A simplification.
This does the same thing, but simpler and faster.
Was noticed while investigating bug#12164555

Change-Id: If9926e4da8a53a65489da55197ac87122c44fe7c
2013-12-16 21:38:31 +09:00
Jean Chalard 7a904514fb Merge "Don't use the previous word after a non-whitespace separator" 2013-12-13 11:53:30 +00:00
Jean Chalard 0b51fac907 Merge "Only update shift state if left in auto mode." 2013-12-13 11:52:13 +00:00
Jean Chalard fae1ba767c Don't use the previous word after a non-whitespace separator
Bug: 12101276
Change-Id: Icf36d55ec171194e5561b946021bcf648782ddd4
2013-12-13 20:51:28 +09:00
Jean Chalard 28bd6e2297 Only update shift state if left in auto mode.
Bug: 12100417
Change-Id: I7bc2b19332e142a257b0399f2e5d128caf01fc7c
2013-12-13 20:47:25 +09:00
Keisuke Kuroyanagi cc8c544ee2 Remove code for forgetting curve in Java side.
Change-Id: I294ed179c642ff52452b5884326c1083477e1bce
2013-12-13 18:40:58 +09:00
Ken Wakasa 2fa3693c26 Reset to 9bd6dac470
The bulk merge from -bayo to klp-dev should not have been merged to master.

Change-Id: I527a03a76f5247e4939a672f27c314dc11cbb854
2013-12-13 17:13:32 +09:00
Tadashi G. Takaoka ea8f8da1ac Fix unusual NPE after onDestroy
Bug: 11673978
Change-Id: I4d5268312911685ff1ca9483a62442a1a9686c62
2013-11-22 17:26:42 -08:00
Tadashi G. Takaoka db86a6f271 Add keyboard color switch option
Bug: 11622614
Change-Id: I25aa1ff7376fe72fd94ab2cb7190c61d7a98a1af
2013-11-22 17:26:33 -08:00
Ken Wakasa 87cd39124a handleBackspace should always send KEYCODE_DEL for InputType.TYPE_NULL
This is a fix only for the Bayo branch because this part in master has
been changed.

The corresponding fix in master is I295eeb5f9f0f1f07e919bf54122d003be150a174

bug: 11797053
Change-Id: I779be039ebf992de5d246c7a9d9509623fc3c120
2013-11-21 17:47:05 +09:00
Jean Chalard 3a9b2430a5 Fix many small nits.
...the interaction of which results in a very bad bug.

Bug: 11648854
Change-Id: I774489e384388f187e72b9ac091ab387c5e1a79a
2013-11-12 22:44:59 -08:00
Jean Chalard e4022137ee Remove an out-of-place check
Bug: 11584525
Change-Id: I76cc3e4ee21d62fbd56042adcf085efd5cafb53f
2013-11-12 22:44:58 -08:00
Jean Chalard c130be8779 Add a sequence number to SuggestedWords.
This allows testing for suggestion freshness in an asynchronous
suggestions world.

In-advance cherrypick of Ic76cd17568598d8534aec81e037f9e37f52eb6b4
because there's a merge conflict.

Bug: 11301597
Change-Id: I4aec765a975298fcac30a48dede73d2622224fe5
2013-10-22 13:19:16 +09:00
Ken Wakasa b044047227 mExpectingUpdateSelection was out of sync when nothing to delete.
cherripick of I9c6a948331726a821bd3ccec9c1d02dec2c4703a
(forward cherrypicking this because the automerger is stuck now.)

This bug was leading to corrupted rendering of surrogate pairs in the following
scenario.

1. Type some emojis
2. Move the cursor at the beginning of the text field
3. Hit backspace even though there's nothing to delete
4. Move the cursor after some emoji
5. Hit backspace

The root cause of this issue was the out-of-sync mExpectingUpdateSelection if
handleBackspace() gets called when the cursor reaches at the beginning of the
TextView. In such case, mExpectingUpdateSelection shouldn't be set true because
there's nothing to delete, so there will be no onUpdateSelection() calls associated
with it. Due to this bug, the cache in RichInputConnection could get stale at step 4
described above. Then the following handleBackspace() that should delete a surrogate
pair was not working correctly because of the stale cache.

bug: 11181913
Change-Id: I1cbf444d8d105416e7de75c16d80b3797f470495
2013-10-15 14:05:34 +09:00
Ken Wakasa cf5dfd2464 am 3a3bbf4a: am eed74b81: am c8383eda: Fix wrong commitText parameter in sendKeyCodePoint()
* commit '3a3bbf4a38870ecc42b7f6fbd3a7cae20fe020a7':
  Fix wrong commitText parameter in sendKeyCodePoint()
2013-10-14 10:52:40 -07:00
Ken Wakasa c8383eda8b Fix wrong commitText parameter in sendKeyCodePoint()
Small optimization on generating a String instance from a single code
point too.

bug: 11181913

Change-Id: I0f905e4dc6ec7841092bb4d3d940daf3b2303f5b
2013-10-13 10:56:10 +09:00
Ken Wakasa fe97ff4083 am 60fb5865: am 06e1bdaa: am 3e35e072: Merge "Make emoji separators" into klp-dev
* commit '60fb58654e33448651fea191ba22cfdc87e37466':
  Make emoji separators
2013-10-11 05:10:21 -07:00
Satoshi Kataoka eb7fa4dc6d am 40506273: am ac6d0c65: am 6d915037: Merge "Fix a bug where emojis would remove the suggestion strip." into klp-dev
* commit '405062733cfe066c4b9af719bfc36a9a516c9dd3':
  Fix a bug where emojis would remove the suggestion strip.
2013-10-11 05:10:19 -07:00
Ken Wakasa 3e35e0727c Merge "Make emoji separators" into klp-dev 2013-10-11 11:57:07 +00:00
Jean Chalard 6fc15b9fc4 Fix a bug where emojis would remove the suggestion strip.
Bug: 11163495
Change-Id: I23d12c430125cc2a66a6e00715a4c609bb9e2bb1
2013-10-11 20:51:13 +09:00
Jean Chalard 401fb908f0 Make emoji separators
Bug: 11163495
Change-Id: I3247b8d1bbd3406b29a30a25aebd932c63431943
2013-10-11 20:00:38 +09:00
Jean Chalard 7e6ac9d727 Allow double-space-to-period after percent
Bug: 11158604
Change-Id: If8c94ef91ed58bb5028f51be7c8d9beb677436a4
2013-10-10 21:26:08 +09:00
Jean Chalard f178685c11 Always call finishComposingText before recapitalization
Workaround for framework bug:
Bug: 10792236

Change-Id: I3706b9eed5223889791840e30660f8d17625cb70
2013-10-09 12:15:21 +09:00
Jean Chalard 27d78643e8 Remove a useless IPC call.
This is not useful because we're going to call setSelection again
with different values on the connection right away.

Also a preliminary change for
Bug: 10792236

Change-Id: I46c6ef1fbb3624086099bf81afddb0ef5ae85661
2013-10-09 12:11:28 +09:00
Satoshi Kataoka a701501cb6 Merge "Reduce memory of emoji palette" 2013-10-08 11:22:21 +00:00
Satoshi Kataoka 0e01df9baf Reduce memory of emoji palette
Bug: 10902556
Change-Id: I3c8da35a601de2bfb248292c7b59235fc1120988
2013-10-08 20:11:35 +09:00
Jean Chalard 482aa129e4 Show the keyboard earlier when rotating.
Bug: 11107229
Change-Id: I0b36341d60b634a860eb13fafd0dc69fe734bdeb
2013-10-08 16:33:27 +09:00
Jean Chalard 10581e68af Make the sentence separator a resource.
This will help handing correctly the armenian full stop.

Bug: 10082781
Change-Id: Id7bb219ebd89daba203216eab362d1cc26a65a36
2013-10-08 15:28:43 +09:00
Jean Chalard 3c4e8cb693 Call loadKeyboard later if it can't be called right away
Since loadKeyboard relies on the input connection being
available to give it the auto-caps state, but also can't
be called twice in a row because it needs to save and
restore its state and invalidates it after the restore,
we need to wait until we know we have a valid input
connection to call it.

Bug: 11107229
Change-Id: I1c7baf3215682df6f6ceb357bd37254f9e7418c7
2013-10-07 22:57:59 +09:00
Satoshi Kataoka 4be5f221e6 Clear the cache of subtypes in onStartInputViewInternal
Bug: 11077905
Change-Id: I9495f13a20edca0e6153cd1a7a0ac6891f707c59
2013-10-07 20:10:58 +09:00
Jean Chalard 423921ca13 Merge "Fallback on empty locales." 2013-10-04 13:44:44 +00:00
Jean Chalard 43a8a0c527 Fallback on empty locales.
This is a very rare corner case.

Bug: 11072132
Change-Id: Iad2aa69511f7dc99105284a049c63f2f997b8ef0
2013-10-04 22:04:59 +09:00
Jean Chalard 8142fd83a6 Accept double-space-period after emoji.
This also includes a fix that allows this code to read surrogate
pairs in this processing.

Bug: 11070482
Change-Id: If5ef8d6863938252f09128b7e99ea07ece6e7019
2013-10-04 22:01:36 +09:00
Keisuke Kuroyanagi d25cd26f1a Merge "Try decaying user history at hourly intervals." 2013-10-02 09:44:03 +00:00
Keisuke Kuroyanagi f36a97ab3a Try decaying user history at hourly intervals.
Bug: 6669677

Change-Id: Ib465fa7e1a7f289a07843535ba89d0dd5259e803
2013-10-02 18:06:08 +09:00
Jean Chalard f735117d36 Fix a pernicious bug with caps.
What's happening here is, setAlphabetKeyboard sets the
keyboard to AUTOMATIC_SHIFTED and updates the keyboard, then
restoring the keyboard old state sets it back to UNSHIFTED without
updating it. When we finally know what the correct value is,
we try to set it to UNSHIFTED, but since that's already the currently
recorded state, it skips updating the keyboard forever.

The solution is to avoid setting the shift state without updating the
keyboard.

Bug: 10948582
Change-Id: Ic8670401e378f8284e851281f91a9ad93eac8e90
2013-10-02 16:57:36 +09:00
Alan Viverette 458fb52b98 Merge "Speak auto-corrections for accessibility" 2013-09-30 18:14:13 +00:00
Keisuke Kuroyanagi 1cf4789ba6 Merge "Set header attributes for ExpandableBinaryDictionary." 2013-09-29 05:14:22 +00:00
Keisuke Kuroyanagi 5ed30a7660 Set header attributes for ExpandableBinaryDictionary.
Bug: 6669677

Change-Id: I2462777eaa07600f1c774226adfc4f351882f523
2013-09-28 12:50:09 +09:00
Alan Viverette 67319f92f3 Speak auto-corrections for accessibility
BUG: 8669376
Change-Id: Id71b2c2835daa7a8c9d6c92c57a7e302551c289d
2013-09-27 14:15:53 -07:00
Jean Chalard de814ec0ec Send backspace as an event when TYPE_NULL.
This is not enough to really fix behavior with TYPE_NULL,
but it does make things a bit better.

Bug: 10949594
Change-Id: Ia359f781cdd76a2e2c5a4c9f166025d81b931174
2013-09-27 16:55:12 +09:00
Jean Chalard 8f23c6f78b Merge "Detect cases where rotation messes with initialization" 2013-09-24 05:38:44 +00:00
Jean Chalard f1d8aa46f9 Detect cases where rotation messes with initialization
...and do a best effort to fix it.

Bug: 10323080
Bug: 10252066
Change-Id: Icb3c9fe85005406bdfce0b7bb143ba0a910a0ddb
2013-09-20 22:21:28 +09:00
Jean Chalard be3be424a3 Fix a bug that happens upon a race condition
Bug: 10848621
Change-Id: If5ff7f001e69af005a5ff9ab3e9f630b88a0a858
2013-09-20 18:21:10 +09:00
Yuichiro Hanada a469743e33 Add showSuggestionStripWithTypedWord.
Bug: 10814472
Change-Id: I3a150124baf7a9b7889b033089a859ff9c11e206
2013-09-19 20:52:28 +09:00
Jean Chalard 08bc97f86f Merge "Allow double-space-to-period after a plus char" 2013-09-18 12:40:29 +00:00
Jean Chalard ba99d8cd0b Allow double-space-to-period after a plus char
Bug: 10704936
Change-Id: I30fdaea648605ef7e7fea6c093581ed5c6de03f3
2013-09-18 21:04:25 +09:00
Jean Chalard f71e1db2da Don't resume suggestion on digits.
Bug: 10780016
Change-Id: I94fad06e4c71eddc96bdda1765925f98bed160f3
2013-09-18 11:37:19 +09:00
Jean Chalard b1e98c2f4f [AC8] Restrict the suggestion strip to the correct part
...for phrase gesture.

Bug: 9059617
Change-Id: Ic5c0616f28af4ba45ca72a5721d1926029adc1c5
2013-09-17 18:43:12 +09:00
Keisuke Kuroyanagi e8754aba1c [AC7] Actually auto-commit.
Bug: 9059617
Change-Id: I7e5d89a9037b9181a0a6456c12043b4bfda8fe4b
2013-09-17 16:44:50 +09:00
Jean Chalard 41aaff6cdf Merge "[AC4] Add native methods necessary for auto-commit" 2013-09-13 11:41:55 +00:00
Jean Chalard 24aad5a4d5 [AC4] Add native methods necessary for auto-commit
Bug: 9059617
Change-Id: I7a47b0675446fc4f39628c60d16de9aea90d1b4d
2013-09-13 20:15:15 +09:00
Satoshi Kataoka 898dbe3c29 Fix emoji keyboard insets
Bug: 10541453
Change-Id: I16dd72c8c55cb5d21ad61a3307c0f3c5f16f460c
2013-09-13 14:21:40 +09:00
Jean Chalard ce96d0d12f Avoid recorrection in ex-password fields.
Bug: 10115839
Change-Id: I1f1025c9f28adfb6f5a63d5ba86e359f30c0963e
2013-09-12 21:20:07 +09:00
Jean Chalard 87472f0038 Remove changing a word when added to the dictionary
This code is now useless.
I thought it affected 9902905, but it seems it actually does not.
Still, it's dead code.

Bug: 9902905
Change-Id: Id9c90fbf88f015af47b2368b90d173c481647093
2013-09-12 15:10:10 +09:00
Yuichiro Hanada e193c5255d Revert Ida230ca42 and I6adf7d08f.
Change-Id: I2ddb250d5a473ea955a5171656974de7288a13f7
2013-09-10 19:08:43 +09:00
Yuichiro Hanada acdabb25f4 Add AsyncResultHolder.
Change-Id: Icfa685bcda2f5c74f5649f09098d00b4bd321c5a
2013-09-10 15:48:06 +09:00
Yuichiro Hanada cc2751ba03 Make commitCurrentAutoCorrection asynchronous.
Change-Id: Ida230ca4243347fb3ab9fda7de3a9a18f886cd1c
2013-09-09 14:47:26 +09:00
Yuichiro Hanada b1af47c8fe Add a callback to the arguments of commitCurrentAutoCorrection.
Change-Id: I6adf7d08fdc4382233a63304743207368db8058a
2013-09-05 20:00:40 +09:00
Yuichiro Hanada 648088aa9e Change GET_SUGGESTED_WORDS_TIMEOUT to 200.
Change-Id: Ia5aa0b7af16d7ad45c98d0c5a7dcabba76d19b67
2013-09-03 18:52:53 +09:00
Yuichiro Hanada d6c947ef7b Change GET_SUGGESTED_WORDS_TIMEOUT to 50.
Change-Id: I4d495a782ed1dea1c377837c6579ce5ff74086b5
2013-09-03 17:39:47 +09:00
Yuichiro Hanada 908fc4f1c3 Call getSuggestedWords asynchronously.
Change-Id: Ia8a21b53f4d12b759d9ef5a5181ed04875e4d198
2013-09-03 15:12:49 +09:00
Yuichiro Hanada 8616e4c03d Remove typedWord from the arguments of showSuggestionStrip.
Change-Id: Iddf33227982e65705b49c6a527286d8695878c90
2013-09-02 22:31:43 +09:00
Yuichiro Hanada 9666a22815 Revert "Revert "Add onGetSuggestedWordsCallback.""
This reverts commit 78f707a142.
Change-Id: I5dd4f2d40314002736226886477563f29a25079c
2013-09-02 14:09:53 +09:00
Ken Wakasa acc886eeb4 Merge "Revert "Add onGetSuggestedWordsCallback."" 2013-08-30 14:07:18 +00:00
Ken Wakasa 78f707a142 Revert "Add onGetSuggestedWordsCallback."
This reverts commit 820c290a61.

Change-Id: I5c50731ff9f330c05c5841b8c65f16e28e67422c
2013-08-30 14:06:19 +00:00
Ken Wakasa 56e1b7e4f1 Fix emoji view insets calculation
bug: 10541453
Change-Id: I605e657c94686c4974d162657a5e820798d20e8f
2013-08-30 21:18:36 +09:00
Satoshi Kataoka 5169937dd4 Revert "Revert "Support Emoji keyboard""
Window resizing junkiness is addressed in I605e657c9468

This reverts commit aabc972338.

Change-Id: I0bc0f1ad9a90799e643fe9ec35f5b4bbe94eee0d
2013-08-30 19:46:10 +09:00
Ken Wakasa 9f79cf6de4 Merge "Add onGetSuggestedWordsCallback." 2013-08-30 07:52:57 +00:00
Ken Wakasa 2f95baaaf0 Merge "Revert "Remove key preview backing view"" 2013-08-30 07:51:29 +00:00
Ken Wakasa c160a3932f Revert "Remove key preview backing view"
This reverts commit 2dfcfc5013.

Change-Id: I96c691b2e9c92be456420196cd7361d03ea4f3e9
bug: 10541453
2013-08-30 07:50:37 +00:00
Ken Wakasa aabc972338 Revert "Support Emoji keyboard"
This reverts commit d7791a93b0.

Change-Id: I5ca4c0227f97540e8a22b487b5056dfa3611082b
2013-08-30 07:23:42 +00:00
Yuichiro Hanada 820c290a61 Add onGetSuggestedWordsCallback.
Change-Id: Ib527d31f9c2dd6dc385cb2f767cd90d9d28a1b1b
2013-08-30 16:08:13 +09:00
Tadashi G. Takaoka d7791a93b0 Support Emoji keyboard
Bug: 6370846
Change-Id: I33ce8f952799c89929996a226ac17731a953ec2a
2013-08-29 19:48:34 +09:00
Keisuke Kuroyanagi fe87f5f417 Pass additionalFeaturesOptions for getSuggestions().
This fixes null pointer exceptions that are caused when
getSuggestion() is called from spell checker.

Change-Id: Ifc9e7abb900e1a4646e33c91022effde439673e4
2013-08-28 19:24:28 +09:00
Keisuke Kuroyanagi 6e04d65932 Make DynamicPred...Base extend ExpandableBinaryDictionary.
Bug: 6669677
Change-Id: I06afad35d3eb73510c34d10cd4116f5bcf934f7c
2013-08-26 18:50:22 +09:00
Satoshi Kataoka 366c0c5198 Register personalization dictionary
Bug: 9429906
Change-Id: Ic754dd8da67446dfb1ebf44aa3d5ab0804298ca0
2013-08-22 18:06:59 +09:00
Satoshi Kataoka f739807a3f Merge "Add onDestroy to PersonalizationDictionarySessionRegister" 2013-08-21 10:54:08 +00:00
Satoshi Kataoka 3c8f22880f Add onDestroy to PersonalizationDictionarySessionRegister
Bug: 9429906
Change-Id: Ibf8efd7302da2c27ac59e62b0393f1eec03dc136
2013-08-21 17:24:12 +09:00
Jean Chalard 2448159ad4 Don't start composing on dash.
Bug: 10403176
Change-Id: I9f969ab9b772dc5ba2015c494b4f98a8864277c4
2013-08-21 11:59:21 +09:00
Jean Chalard 2c7a3e0405 Merge "[AC3] Start calling the methods for auto-commit." 2013-08-20 11:05:23 +00:00
Jean Chalard c10d76f28c Merge "[AC2] Reference a dict rather than a string in suggestion infos" 2013-08-20 11:05:12 +00:00
Jean Chalard 3f15c41d88 Merge "[AC1] Add a memory of where to cut the first word." 2013-08-20 11:05:09 +00:00
Jean Chalard 66a870cb53 [AC3] Start calling the methods for auto-commit.
Bug: 9059617
Change-Id: I190a4baf2fa831b70e00e129b5dfaa8c9c32b3a0
2013-08-20 19:26:11 +09:00
Jean Chalard e8ef095670 [AC2] Reference a dict rather than a string in suggestion infos
Bug: 9059617
Change-Id: Ic17bc0fd5d812268fd37d7fd35b4e9ebfb95fa5e
2013-08-20 19:18:09 +09:00
Jean Chalard ef1e363016 [AC1] Add a memory of where to cut the first word.
Bug: 9059617
Change-Id: I931b6d1eb49f9f7dd7d5b18956e35751d1b2b631
2013-08-20 18:43:19 +09:00
Satoshi Kataoka d6ddb96ee8 Add a functionality to boost scores of personalization dictionary
Bug: 9429906
Change-Id: I1518c5cbc7d41188e7dc6a35d226da277ed5913f
2013-08-20 17:50:48 +09:00
Jean Chalard c239a34262 Support languages that don't use spaces.
Thai is an example.

Bug: 10138062
Change-Id: Ib9a8264c77ed42b4256432d7c8a60d08575dcdc7
2013-08-16 21:01:08 +09:00
Tadashi G. Takaoka ed5582ec65 Merge "Thin out audio and haptic feedback while key repeat" 2013-08-14 10:11:43 +00:00
Jean Chalard 5fd8b7ebd5 Merge "Add looksValidForDictionaryInsertion" 2013-08-14 09:41:49 +00:00
Jean Chalard af5fbe70ac Add looksValidForDictionaryInsertion
...and test it.

Also at the same time, add a facility to create a SettingsValues for
test, and some minor performance improvement to surrounding
methods.

Change-Id: I13b629ae14755c244af2a9406a7e9b4a4a16090f
2013-08-14 18:39:28 +09:00
Tadashi G. Takaoka ab16237e69 Thin out audio and haptic feedback while key repeat
Bug: 6522943
Change-Id: Id60f256ab0f8741578eda276116817fa48917325
2013-08-14 18:37:58 +09:00
Jean Chalard fdfc8ad2d0 Merge "Re-evaluate auto-caps earlier." 2013-08-14 09:29:48 +00:00
Jean Chalard 4bc74d19ef Merge "Delete surrogate together." 2013-08-14 09:06:07 +00:00
Jean Chalard b2d954cad6 Delete surrogate together.
Stop deleting them one after the other, it makes no sense. We
can know in advance if we should delete two of them, so let's
use that.

Bug: 6526420
Change-Id: Ifa2263cbde8fedc78bb750b84d4acd3f979774ea
2013-08-14 17:53:33 +09:00
Jean Chalard b7e782d868 Re-evaluate auto-caps earlier.
We have all we know to re-evaluate auto-caps in this case.
We don't need to wait until we get the callback from TextView.

Bug: 10287972
Change-Id: I87e4e26cd193a001f91fe852ffc5a8f728db2449
2013-08-14 17:40:23 +09:00
Jean Chalard 1162c0537d Merge "Remove dead code" 2013-08-14 08:35:46 +00:00
Jean Chalard d81b9d0276 Remove dead code
isComposingWord() is actually defined as size > 0, so this test
can never be false.

Change-Id: If71afae6f0b16bff46178f0fae3244597354fecb
2013-08-14 16:38:37 +09:00
Jean Chalard e18fdf804a Merge "Fix a bug with surrogate pairs" 2013-08-14 07:27:54 +00:00
Jean Chalard a74ae9c451 Fix a bug with surrogate pairs
Bug: 10316781
Change-Id: I528c59c8823cda11975cb01b0ae59f12cfadef3b
2013-08-14 16:00:28 +09:00
Tadashi G. Takaoka d1d607287d Remove audio and haptic feedback while key repeating
Bug: 6522943
Change-Id: Iad1b11172e47bfbae2b4129361a56b9d793f8f62
2013-08-13 17:03:26 +09:00
Satoshi Kataoka 8c4fcb108f Add PersionalizationDictionaryRegister
Bug: 9429906
Change-Id: Ibd4d5cedb371c0b4ee1342a3e6d221c9e34c2402
2013-08-12 14:48:45 +09:00
Ken Wakasa 4a2f6a2216 am 25402fd5: am 724db044: Deallocate gesture trail bitmap when unneeded further
* commit '25402fd5309891884a843528d47f6b4646341a3f':
  Deallocate gesture trail bitmap when unneeded further
2013-08-09 15:53:29 -07:00
Ken Wakasa 724db04495 Deallocate gesture trail bitmap when unneeded further
Follow up to I5bc980c4dc41bc304be3c190934c1f7c55c9d244

bug: 8967766
Change-Id: I7b916daa5269cfde359a77555e8ffadf0e4a8f92
2013-08-09 21:07:40 +09:00
Tadashi G. Takaoka 2dfcfc5013 Remove key preview backing view
This change re-origanizes view hierarchy of IME's input view.

Change-Id: I9d0a07692d0f41de3345d207366393bcd5424f7e
2013-08-09 20:25:42 +09:00
Satoshi Kataoka c05b3b56cc Merge "Add a session for the personalization dictionary" 2013-08-07 08:45:19 +00:00
Satoshi Kataoka 80aa7197b4 Add a session for the personalization dictionary
Bug: 9429906
Bug: 4192129

Change-Id: I361ab380edeee5a8a8b364df3f9f4ab202b79105
2013-08-07 16:44:30 +09:00
Tadashi G. Takaoka cc38bfb5d3 Merge "Add emoji icon and code as a groundwork" 2013-08-06 05:35:14 +00:00
Tadashi G. Takaoka b127d88285 Add emoji icon and code as a groundwork
The emoji switching key icon asset should be updated. The icons in
this change are just borrowed from Hangout.

Bug: 10179862
Bug: 6370846
Change-Id: Icea26d2cf2ac6a6df9beb4c98f646dbe309bdcd9
2013-08-06 14:16:15 +09:00
Tadashi G. Takaoka 52d220e71b Remove unnecessary suggestion strip container
Change-Id: I3710e1fe1574c0f69f7f448619e939fb45e9b8d3
2013-08-06 10:57:47 +09:00
Tadashi G. Takaoka c0a732f032 Remove CODE_RESEARCH
Instead of CODE_RESEARCH, special outputText ".research." is used to
invoke a research feedback dialog.

Change-Id: Ic95c956ab4f2b5f0c3f2205c9bbcdcfb67db5d6e
2013-08-05 19:05:07 +09:00
Tadashi G. Takaoka 28a148681e Small cleanup
Change-Id: I7dce7373b371f1ed5a985815f5d43fb6c6ee1f84
2013-08-05 18:46:35 +09:00
Satoshi Kataoka 60586b57cf Connect the personalization dictionary
Bug: 9429906
Bug: 4192129
Change-Id: I9c9f3ed7699f74339ad92be6dcddb8a52c377545
2013-08-01 16:33:20 +09:00
Ken Wakasa c8814e20b7 Deallocate gesture trail bitmap when unneeded
This frees up 1.7MB on Nexus 4 (occam), and 900KB on occam_svelte while
LatinIME goes to background.
The keyboard bring-up speed feels acceptable on both devices.

bug: 8967766
Change-Id: I5bc980c4dc41bc304be3c190934c1f7c55c9d244
2013-07-31 20:39:32 +09:00
Jean Chalard 2d7e927354 Fix inconsistencies with mSuggest.
This should fix some NPEs, but they are so unlikely that we never
see them.

Bug: 10065412
Change-Id: I2aefea1f52024405cc3fda9106fea41a02aaf4d8
2013-07-31 18:59:18 +09:00
Satoshi Kataoka 87d06afc66 Refactor on the user history dictionary
Bug: 9429906
Bug: 4192129
Change-Id: I1a2bfe96e18119d30a72290aa48746f77a021018
2013-07-31 16:48:55 +09:00
Jean Chalard c5c226c424 Fix inconsistency with mutable settings.
Change-Id: I0550044199273cecb6f5713aa2e43ae16319cd47
2013-07-30 14:30:24 +09:00
Jean Chalard 74bcc911ea Fix a problem where settings were not renewed correctly.
Bug: 10065412
Change-Id: Id05284f45466cd5b2697a695c3d1bdfbf3cc1f24
2013-07-30 13:22:05 +09:00
Ken Wakasa b60e65a0cc Rename a variable for SettingsValues
Change-Id: Icb4155532ea8724791c9194e8dc75ce32b6e8b16
2013-07-29 18:53:23 +09:00
Jean Chalard d9f0c1e020 Merge "Fix an NPE" 2013-07-29 09:46:32 +00:00
Jean Chalard 5408fec63a Fix an NPE
Also make mSuggest private for more security.

Bug: 10045657
Change-Id: I712505e4d2a2606efff5d09ba9b4c656f9e7c7a9
2013-07-29 18:09:48 +09:00
Satoshi Kataoka d45e4b6e5b Add personalization dictionary helper
Bug: 9429906
Bug: 4192129

Change-Id: Ic618b0b09a54ed46b20633bd4c1c570d4ac775af
2013-07-29 12:37:27 +09:00
Satoshi Kataoka ffcbbaf127 Refactor on UserHistoryDictionary
Bug: 9429906
Change-Id: I576a91643bdaf5017cc826ac2e07a74a9a275d60
2013-07-26 13:00:19 +09:00
Tadashi G. Takaoka 5c095e59f6 Cancel all ongoing event when onFinishInputView
Bug: 9334755
Change-Id: If0c2ac49a50f4a529aefeca603569f9413367469
2013-07-25 20:05:39 +09:00
Ken Wakasa a7d2fc6bef Move settings related classes to "settings"
Change-Id: Id170dbfe2dcfc93130b7be4a84615940403ec37f
2013-07-22 16:35:44 +09:00
Ken Wakasa b03447e1af Move a couple classes to the utils package
Change-Id: Ia14a2011d79bad7cd02697b9254705f6e2099442
2013-07-19 10:46:46 +09:00
Tadashi G. Takaoka 6455172a70 Distinguish key press in repeat key
Bug: 9859367
Change-Id: Iad643f9785b193e1918a8363de4fefc3b7558bdf
2013-07-16 19:21:16 +09:00
Tadashi G. Takaoka 4be6198cb7 Reorganize Utils class
Change-Id: I7294d1547def5dcfcae9d1d53b277cb3cc9f2d18
2013-07-05 19:24:40 +09:00
Tadashi G. Takaoka f87e8f7ec1 Handling key repeat by emulating key press and code input
This change also eliminates a reference of
AudioAndHapticFeedbackManager from KeyboardSwitcher and MainKeyboard.

Bug: 6522943
Change-Id: Iac42ec8ff00c66deb76a660ffc07477923a58959
2013-07-02 19:50:34 +09:00
Jean Chalard e5a3b77664 Merge "Move Range out of RichInputConnection and rename it." 2013-07-01 07:20:51 +00:00
Jean Chalard 675bcf191c Move Range out of RichInputConnection and rename it.
Range has grown a bit too big to stay an internal class.

Change-Id: Ic3fbc48a5d10776eedd7559c4d696e5926b88288
2013-07-01 15:41:13 +09:00
Jean Chalard f0af452ce2 Do not re-resume suggestion if it's not needed.
This is much better interface-wise. It eliminates all blinking
of the line in the practice.

Bug: 8874148
Bug: 8864306
Change-Id: I87754e44784327c2e9c8b162d598d145e20668e8
2013-07-01 14:40:12 +09:00
Jean Chalard 2bbd78ab0a Merge "Ignore spans that are not the right size." 2013-06-27 03:06:47 +00:00
Jean Chalard 2f7f6257b6 Ignore spans that are not the right size.
Bug: 8839763
Bug: 8862327
Change-Id: I5d49c86edcbc0fc1b2b147856437cfbadd678377
2013-06-26 23:02:50 +09:00
Jean Chalard 6c0e412137 Merge "Resume suggestion at start input" 2013-06-26 10:18:32 +00:00
Jean Chalard fb72890ac6 Readability improvement
Change-Id: I2f350145f333ba1fa4eb20027b0f41107c2df02c
2013-06-26 16:03:40 +09:00
Jean Chalard 7fcf304c97 Fixing follow-up to I548d899b
I548d899b introduced a new method to fix a sync miss between
the cursor position and the cached cursor position, but did not
take into account that it should also update the cached text
before and after the cursor in this case and that there was
already a method for doing this.

Change-Id: I31bd741893207c822827304e77791b1159774e1a
2013-06-26 15:28:42 +09:00
Jean Chalard 2f69348d51 Resume suggestion at start input
Bug: 9568410
Change-Id: I65468268f8613c863fa7f3a497b64656da0a221c
2013-06-25 19:38:31 +09:00
Ken Wakasa 9419e02fd9 Make UserLogRingCharBuffer an external class
Change-Id: I9d506995337d64ec11c72939a8d739423ee46efa
2013-06-25 18:38:13 +09:00
Jean Chalard 10585620bd Merge "Fix a bug in the cached cursor pos, and simplify selection handling" 2013-06-25 05:00:11 +00:00
Jean Chalard cdf774122d Merge "Fix a small bug" 2013-06-24 10:00:05 +00:00
Ken Wakasa bfaf349c35 Load the native lib eagerly
in the hope of avoiding UnsatisfiedLinkError. This is definitely not a
confident fix as we still don't know the root cause of the issue.

bug: 9325110
Change-Id: I1abf8031b98509f63fce6a2d069d497895ea712c
2013-06-24 18:12:04 +09:00
Ken Wakasa bc1813186d Merge "Move util classes to the latin/utils directory" 2013-06-24 08:49:06 +00:00
Jean Chalard ca52e1ca5a Fix a small bug
SpannableStrings are not the only type of Spanned, they are
only the mutable kind. SpannedString is the immutable one.
Spanned is the correct class to use there.

Bug: 8839763
Bug: 8862327
Change-Id: Ic5e6199a51f22368914f2748ac2d0d1ca6a33f78
2013-06-24 17:39:17 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00