Formerly "Show correction suggestions" had three options, "always
show", "show in portrait mode", and "always hide". The reason behind
"show in portrait mode" was that there may not be enough screen estate
in landscape mode to show suggestions. Because recent phone devices
have relatively large screen, we decide to remove "show in portrait
mode" option.
Bug: 15780939
Change-Id: I896d737452c3893d43ce20bd88127f10c1eb3d83
This reverts commit d941ea18 and builds on it to fix the behavior
of the broken cases.
It also fixes a small, related bug that probably has existed for
a very long time: predictions not displayed when cancelling
double-space-to-period.
Bug: 15148015
Change-Id: I1f9358f8b6f5804f831643611576be347e83999d
This is an overdue refactoring that I have been wanted to
do forever, and that we can at last do now that suggestions
come only from instances of BinaryDictionary instances.
With this, all unit tests and regression tests are
passing again.
Bug: 13667648
Bug: 13665487
Bug: 8636060
Change-Id: Ie23a19f9b7e692edf2ee0b107ddaff2d7db564b6
During recorrection, the cursor position when calling
commitText is not necessarily at the end of the
composing text.
Besides, RichInputConnection assumes the cursor is
always after any composing text. This is not correct,
but in the practice, it seems all code paths work.
We should fix this in the future.
Bug: 13060691
Change-Id: I15f71fff62d36e80cf6e4a022c5e78af634b199d
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
This also includes a fix that allows this code to read surrogate
pairs in this processing.
Bug: 11070482
Change-Id: If5ef8d6863938252f09128b7e99ea07ece6e7019
Most of the failures can be ascribed to the tests not passing the correct
old position of the cursor on a second call to onUpdateSelection() to
LatinIME.
Bug: 7276565
Bug: 7276805
Bug: 7276195
Change-Id: I3f1b52cdcc783ea18838408bed50699b7254eaf4
This fixes the input logic tests that were broken and suppresses
their dependency upon the spell checker proximity. Instead, it
gets the Keyboard instance from Latin IME and uses the actual
coordinates, which results in a test run closer to what actually
happens during typing.
Change-Id: I3a81d249ee7fb3ac6ae6940aa2e8b2421e829e5c
Also fix a typo, and increase the time allowed to load the main
dictionary to 2 secs instead of 1.
Bug: 6114326
Change-Id: I5f70b34fc4277c55977b18466253152aa98a2507