Commit Graph

1462 Commits (4a144b9b4d9e78bff7662001c97430491f9747a0)

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