Commit Graph

1248 Commits (dc22b7226a61bb7fa5adbecee23999f8cbf902e3)

Author SHA1 Message Date
Jean Chalard 05ea7c5d02 am 167ba345: am 89fe1f50: Add a method to work around apps broken by recorrection
* commit '167ba3459b0ce02b9add12ade9388bd2b1e6eb62':
  Add a method to work around apps broken by recorrection
2013-05-20 21:10:07 -07:00
Jean Chalard 0013f97ddd am 5906b05b: am 7058b02a: Extract a new class for app-specific workarounds.
* commit '5906b05bb50c0a67bd4f03fcfae41db3daefe0bc':
  Extract a new class for app-specific workarounds.
2013-05-20 19:50:46 -07:00
Jean Chalard 89fe1f5088 Add a method to work around apps broken by recorrection
Bug: 8944307
Change-Id: I8986622554f30aaf4f595099c4ab5652b75c972c
2013-05-21 07:53:31 +09:00
Jean Chalard 7058b02a9c Extract a new class for app-specific workarounds.
Bug: 8944307
Change-Id: Iaff9dd03d3d856a6bdaa2b16c4e71e95cd2b6349
2013-05-21 07:53:28 +09:00
Kurt Partridge 500dea6ad4 Fix punctuation logging
Punctuation is currently put into the same LogUnit as the
following word.  This is counter-intuitive and makes
post-processing more complicated.

This change causes punctuation to be put into its own
LogUnit.

A tricky case is the phantom space.  A phantom space is
inserted right before other text, whose MotionEvents have
already been collected and inserted into mCurrentLogBuffer.
Phantom spaces are handled by creating their own LogUnit and
inserting it into the LogBuffer right before
mCurrentLogBuffer is shifted in.

Change-Id: I102d7cd93982ad37ba0abb6c1ac0f66b85b5f95d
2013-05-17 09:47:40 -07:00
Kurt Partridge 17b63ba588 Merge "Remove unnecessary commit/uncommit" 2013-05-15 23:52:43 +00:00
Jean Chalard b1e37e4a47 am f1dcf725: Merge "Don\'t process recorrection or resets when not shown"
* commit 'f1dcf725061b3e61e40540566a5385cf4934f424':
  Don't process recorrection or resets when not shown
2013-05-15 07:58:27 -07:00
Jean Chalard c9aaba1253 Don't process recorrection or resets when not shown
Bug: 8954116
Change-Id: Ica27dbfc570643bb81e6cdf34cc7c796ea080d71
2013-05-15 20:20:20 +09:00
Kurt Partridge 993acbaaa2 Remove unnecessary commit/uncommit
When the user reverts a commit, this causes the committed
word to be changed. The user usually then goes back to edit
that word.  Going back to edit causes an uncommit, so that
the editing actions are added onto the LogUnit containing
the operations used to construct the word.

But currently, reverting also involves its own
commit/uncommit pair, with the caller performing the
uncommit, and the commit happening inside the revert
command.  This may have been necessary in the past, when
revert was called in different situations, but is
unnecessary now.  Furthermore, the guarding conditions are
currently such that the uncommit doesn't always undo the
effects of the commit, corrupting the log output.

Change-Id: I74af41f4f1db2fcabfa496dcc4a2d7bd0af19b3a
2013-05-14 12:20:27 -07:00
Ken Wakasa d6d70e7325 Merge "Revert "Fix isSuggestionsStripVisible when keyboard hidden"" 2013-05-14 11:46:04 +00:00
Ken Wakasa 3efa36f6aa Revert "Fix isSuggestionsStripVisible when keyboard hidden"
This reverts commit cb0d1c4c58

Change-Id: Ie2c8e01c25bd051b6157e8f32ab84392a0c7252a
bug: 8954116
2013-05-14 11:44:22 +00:00
Tadashi G. Takaoka 41016acacf Back to previous keyboard layout by canceling sliding input
Bug: 8915171
Change-Id: Iabdeb7920f67f89246087c3ee06240406ecfbc3d
2013-05-14 20:28:03 +09:00
Jean Chalard cb0d1c4c58 Fix isSuggestionsStripVisible when keyboard hidden
When the keyboard is hidden, the suggestion strip is
never visible.

Bug: 8954116
Change-Id: I9f242d07b49ad60b625a22429bb013251e814905
2013-05-14 15:19:19 +09:00
Jean Chalard 9f9cc03277 Optimizations and safeguards.
- Don't call finishComposingText when useless.
- Add safeguards against calling setComposingRegion when the
  data returned by the editor is inconsistent.
- Cancel pending recorrection messages when new messages arrive.

Bug: 8842941
Bug: 8845001
Change-Id: I939701033cf5c2bbd85871ecf83e329021ddeb91
2013-05-08 18:47:10 +09:00
Jean Chalard e8b9b35471 Unify space-adding on gestures.
This is much simpler, and more correct.

Bug: 8808497
Change-Id: I7a56bf9d6d9fb481f898b7a9f5898a86c11b34c0
2013-05-07 20:38:09 +09:00
Jean Chalard 2dbb5957e3 Pass blockOffensiveWords as a parameter
Bug: 8773353
Change-Id: Ic1019742ce7ff6e4f7fff4d2729f8ab52d841488
2013-05-01 20:47:35 +09:00
Jean Chalard aa3a96f3a1 Don't do recorrection when suggestions are off.
Bug: 8767981
Change-Id: If5c775e488b91ae03ecce2673c99918ac8134928
2013-05-01 10:17:28 +09:00
Jean Chalard 758c74fe82 Merge "Fix an NPE in recorrection" into jb-mr2-dev 2013-04-19 07:03:19 +00:00
Jean Chalard 77226ed006 Merge "Fix an NPE in recapitalize" into jb-mr2-dev 2013-04-19 07:01:10 +00:00
Jean Chalard ae7d1530b4 Fix an NPE in recorrection
Also, theoretically, we don't want to retrieve older suggestions if
there are no results for a recorrection - that would look random.
This bug addresses this too.

Bug: 8657919
Change-Id: I44f36d34a708a968ab71fa0592da57f4c97d4b7f
2013-04-19 15:53:33 +09:00
Jean Chalard 3bdf341ea0 Fix an NPE in recapitalize
Bug: 8657736
Change-Id: I459d1c200826c1c394f8207475ecf60a4f356793
2013-04-19 15:44:20 +09:00
Jean Chalard d91268ad9f Initialize dictionaries at onStartInputView
Bug: 8344402
Change-Id: I41b8440f0d72a66fde3f6feb0db8239c9bb10ea3
2013-04-18 14:48:42 +09:00
Jean Chalard 73ec85b8ad Don't insert automatic spaces when text looks like a URL
This is about as ad-hoc as it gets, but then again, what we want
is probably as ad-hoc as it gets.
All URL boxes I know of double as search bars, and not adding
automatic spaces there sucks (e.g. in Chrome URL bar).
And in other boxes actually you don't want to add a space if
it looks like a URL. QSB isn't even a search box, and it behaves
like this.

So I think this is actually the right answer to the problem.

Bug: 7062925
Change-Id: Ib09472b34644fd5bf2dc84bb97cedeeba28bcd02
2013-04-16 18:03:49 +09:00
Jean Chalard 78d658734d Merge "Don't recapitalize on shift while on symbol layout" 2013-04-16 05:31:43 +00:00
Jean Chalard 1f52364630 Don't recapitalize on shift while on symbol layout
Change-Id: Ibf2cdedf510c296561bb5eeb6ff18c3414d6d6f4
2013-04-16 14:29:02 +09:00
Jean Chalard 8094bf45d7 Match the keyboard state to the recapitalize state.
Bug: 7657025
Change-Id: I2f8fe7fc4596a498322ba5ccabbd0c18a2bc36cf
2013-04-16 14:25:03 +09:00
Jean Chalard e259b9f57d Merge "Clean up RecapitalizeStatus" 2013-04-16 04:57:35 +00:00
Jean Chalard fd15686ae9 Merge "Fix an NPE" 2013-04-16 04:12:18 +00:00
Jean Chalard b794e904a3 Clean up RecapitalizeStatus
Change-Id: Ib4d002f90cd3a0e9ad4c04b883b0c1f05ada3ccf
2013-04-16 13:11:18 +09:00
Jean Chalard a024ac6b20 Merge "Fix an NPE" 2013-04-16 03:43:06 +00:00
Jean Chalard 2b42ad0eaa Fix an NPE
Bug: 8620678
Change-Id: Ia91761f33518a010b2844d34523cadece261c67e
2013-04-16 12:20:10 +09:00
Jean Chalard 7be3ca2ccf Fix an NPE
Bug: 8620758
Change-Id: I39f07939ebb6148a48aae5b915ee807002a5b02d
2013-04-16 12:17:22 +09:00
Jean Chalard 1e5bbe4ce8 Small performance improvement / minor bugfix
The only place where it's used is checked for nullity.
Also, it's possible, also difficult, to match a different
recapitalize with the old code, triggering a bug that
this fixes.

Change-Id: I717d6df489025c75d1caca290a9086c3b39a9306
2013-04-15 21:18:50 +09:00
Jean Chalard 033958330d Merge "Have Latin IME re-capitalize a selected string" 2013-04-15 11:29:28 +00:00
Jean Chalard 2995abe7aa Have Latin IME re-capitalize a selected string
Upon pressing Shift, if there is currently a selected string, have
Latin IME change its capitalization.
This does not yet have the keyboard mode follow the mode - the change
is complicated enough as is.

Bug: 7657025
Change-Id: I54fe8485f44e04efd72c71ac9feee5ce21ba06f2
2013-04-15 20:23:01 +09:00
Jean Chalard 0e9ee4d3bf If there are no suggestion span, recompute suggestions.
Bug: 8084810
Change-Id: I1743c09c43ca6835bb2f607684b037bf17d36335
2013-04-15 19:33:23 +09:00
Jean Chalard d40f3f6bc1 Reject a previously user-refused suggestion.
If the user gestures a word, then hits backspace in
disapproval, and gestures about the same thing again,
make sure that we don't suggest the same thing again.

Bug: 7549311
Change-Id: I793bc4df7c3841fa8f2f4146707c26e873f374c1
2013-04-15 16:36:44 +09:00
Jean Chalard 2cd1136b8e Merge "Remove the dialog to insert words to the dictionary." 2013-04-12 12:33:24 +00:00
Jean Chalard 91bcf5eb5d Merge "Restart suggestions when the cursor moves." 2013-04-12 12:27:50 +00:00
Jean Chalard 02ce3dc2d1 Fix a bug with bad application completions
Bug: 8561056
Change-Id: I91fb0ac76dabfc841bafc0e2c0ea9f63e6f604f9
2013-04-12 20:53:06 +09:00
Jean Chalard 6a114fa700 Restart suggestions when the cursor moves.
This uses the old suggestions. It does not try to recompute
new suggestions if there are no old suggestions yet: this is
coming in a later change.
If there are no suggestions, this shows the word itself
as a suggestion.

Bug: 8084810
Change-Id: I4c2e25df0ff3673be1825f57a0c19a9d23d47a48
2013-04-12 20:49:03 +09:00
Jean Chalard 1a51833828 Remove the dialog to insert words to the dictionary.
Bug: 8562529
Change-Id: Ibd853f0cb995e7fb35f8730eafcef73ead58c869
2013-04-12 15:58:50 +09:00
Jean Chalard fb3e805722 Merge "Fix a bug where a space would not be inserted before a gesture" 2013-04-10 11:19:31 +00:00
Jean Chalard 30b8004b56 Fix a bug where a space would not be inserted before a gesture
Bug: 8583675
Change-Id: I14924fef5663f48481994c02c56be45f9f85be65
2013-04-10 20:10:28 +09:00
Tadashi G. Takaoka ce811f50d2 Use private lock object instead of synchronized method
Change-Id: Ifc62bacbd0583a7d102009681a94bdd9ccff7d47
2013-04-10 18:27:11 +09:00
Jean Chalard 19dcd15493 Merge "Offer to add any OOV typed word to the dictionary." 2013-04-09 10:28:47 +00:00
Jean Chalard 9310f42a36 Offer to add any OOV typed word to the dictionary.
That includes gestures, which used not to work.

Bug: 8532637
Change-Id: I04606565d7000faadf954c4a806c39d4d162a2c1
2013-04-09 12:05:54 +09:00
Kurt Partridge d117c1a116 Merge "Do not record log split time when handling separator" 2013-04-09 02:31:48 +00:00
Kurt Partridge 636b8c4231 Do not record log split time when handling separator
Previously handleSeparator() caused the ResearchLogger to mark the time at which a LogUnit should be
broken.  However, this causes the motion data associated with a separator to be associated with the
LogUnit of the previous word.  This change corrects this bug.

Change-Id: I8b4d4fa6de2a013de9e2a28bb668c446a07f1957
2013-04-01 16:48:15 -07:00
Kurt Partridge 0c0ab2b4d9 Merge "Reorder ResearchLogger call" 2013-04-01 15:19:45 +00:00