am 17100ad8: am 8435acd7: am f7f786d8: am d9c04a6b: am 6456af0e: am ecea8551: Fix a bug with no suggestions flag
* commit '17100ad8eacc3d4905a8239c57e5661339f4c91d': Fix a bug with no suggestions flagmain
commit
e63780ecba
|
@ -1075,7 +1075,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// with cursor movement when we have a hardware keyboard since we are not in charge.
|
// with cursor movement when we have a hardware keyboard since we are not in charge.
|
||||||
final SettingsValues settingsValues = mSettings.getCurrent();
|
final SettingsValues settingsValues = mSettings.getCurrent();
|
||||||
if ((!settingsValues.mHasHardwareKeyboard || ProductionFlags.IS_HARDWARE_KEYBOARD_SUPPORTED)
|
if ((!settingsValues.mHasHardwareKeyboard || ProductionFlags.IS_HARDWARE_KEYBOARD_SUPPORTED)
|
||||||
&& mInputLogic.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd)) {
|
&& mInputLogic.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd,
|
||||||
|
settingsValues)) {
|
||||||
mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(),
|
mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(),
|
||||||
getCurrentRecapitalizeState());
|
getCurrentRecapitalizeState());
|
||||||
}
|
}
|
||||||
|
|
|
@ -371,10 +371,11 @@ public final class InputLogic {
|
||||||
* @param oldSelEnd old selection end
|
* @param oldSelEnd old selection end
|
||||||
* @param newSelStart new selection start
|
* @param newSelStart new selection start
|
||||||
* @param newSelEnd new selection end
|
* @param newSelEnd new selection end
|
||||||
|
* @param settingsValues the current values of the settings.
|
||||||
* @return whether the cursor has moved as a result of user interaction.
|
* @return whether the cursor has moved as a result of user interaction.
|
||||||
*/
|
*/
|
||||||
public boolean onUpdateSelection(final int oldSelStart, final int oldSelEnd,
|
public boolean onUpdateSelection(final int oldSelStart, final int oldSelEnd,
|
||||||
final int newSelStart, final int newSelEnd) {
|
final int newSelStart, final int newSelEnd, final SettingsValues settingsValues) {
|
||||||
if (mConnection.isBelatedExpectedUpdate(oldSelStart, newSelStart, oldSelEnd, newSelEnd)) {
|
if (mConnection.isBelatedExpectedUpdate(oldSelStart, newSelStart, oldSelEnd, newSelEnd)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -399,8 +400,9 @@ public final class InputLogic {
|
||||||
// should be true, but that is if the framework had taken that wrong cursor position
|
// should be true, but that is if the framework had taken that wrong cursor position
|
||||||
// into account, which means we have to reset the entire composing state whenever there
|
// into account, which means we have to reset the entire composing state whenever there
|
||||||
// is or was a selection regardless of whether it changed or not.
|
// is or was a selection regardless of whether it changed or not.
|
||||||
if (hasOrHadSelection || (selectionChangedOrSafeToReset
|
if (hasOrHadSelection || !settingsValues.needsToLookupSuggestions()
|
||||||
&& !mWordComposer.moveCursorByAndReturnIfInsideComposingWord(moveAmount))) {
|
|| (selectionChangedOrSafeToReset
|
||||||
|
&& !mWordComposer.moveCursorByAndReturnIfInsideComposingWord(moveAmount))) {
|
||||||
// If we are composing a word and moving the cursor, we would want to set a
|
// If we are composing a word and moving the cursor, we would want to set a
|
||||||
// suggestion span for recorrection to work correctly. Unfortunately, that
|
// suggestion span for recorrection to work correctly. Unfortunately, that
|
||||||
// would involve the keyboard committing some new text, which would move the
|
// would involve the keyboard committing some new text, which would move the
|
||||||
|
|
Loading…
Reference in New Issue