Merge "Have double-space-to-period cancel leave a single space"

This commit is contained in:
Jean Chalard 2013-08-08 02:52:23 +00:00 committed by Android (Google) Code Review
commit 4456d1a8c1

View file

@ -654,9 +654,11 @@ public final class RichInputConnection {
+ "\"" + periodSpace + "\" just before the cursor.");
return false;
}
// Double-space results in ". ". A backspace to cancel this should result in a single
// space in the text field, so we replace ". " with a single space.
deleteSurroundingText(2, 0);
final String doubleSpace = " ";
commitText(doubleSpace, 1);
final String singleSpace = " ";
commitText(singleSpace, 1);
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
ResearchLogger.richInputConnection_revertDoubleSpacePeriod();
}