Merge changes I3109a482,Ia5e25738
* changes: Final small cleanup. Actually change the place where updateSelection is called
This commit is contained in:
@@ -268,8 +268,9 @@ public class BaseInputConnection implements InputConnection {
|
||||
if (content != null) {
|
||||
beginBatchEdit();
|
||||
removeComposingSpans(content);
|
||||
endBatchEdit();
|
||||
// Note: sendCurrentText does nothing unless mDummyMode is set
|
||||
sendCurrentText();
|
||||
endBatchEdit();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -466,8 +467,9 @@ public class BaseInputConnection implements InputConnection {
|
||||
content.setSpan(COMPOSING, a, b,
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE | Spanned.SPAN_COMPOSING);
|
||||
|
||||
endBatchEdit();
|
||||
// Note: sendCurrentText does nothing unless mDummyMode is set
|
||||
sendCurrentText();
|
||||
endBatchEdit();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1085,9 +1085,12 @@ public class Editor {
|
||||
mTextView.updateAfterEdit();
|
||||
reportExtractedText();
|
||||
} else if (ims.mCursorChanged) {
|
||||
// Cheezy way to get us to report the current cursor location.
|
||||
// Cheesy way to get us to report the current cursor location.
|
||||
mTextView.invalidateCursor();
|
||||
}
|
||||
// sendUpdateSelection knows to avoid sending if the selection did
|
||||
// not actually change.
|
||||
sendUpdateSelection();
|
||||
}
|
||||
|
||||
static final int EXTRACT_NOTHING = -2;
|
||||
@@ -1221,6 +1224,8 @@ public class Editor {
|
||||
candStart = EditableInputConnection.getComposingSpanStart(sp);
|
||||
candEnd = EditableInputConnection.getComposingSpanEnd(sp);
|
||||
}
|
||||
// InputMethodManager#updateSelection skips sending the message if
|
||||
// none of the parameters have changed since the last time we called it.
|
||||
imm.updateSelection(mTextView,
|
||||
selectionStart, selectionEnd, candStart, candEnd);
|
||||
}
|
||||
@@ -1244,11 +1249,6 @@ public class Editor {
|
||||
// input method.
|
||||
reported = reportExtractedText();
|
||||
}
|
||||
if (!reported && highlight != null) {
|
||||
// TODO: stop doing this here, and do it after each change
|
||||
// as needed instead.
|
||||
sendUpdateSelection();
|
||||
}
|
||||
}
|
||||
|
||||
if (imm.isWatchingCursor(mTextView) && highlight != null) {
|
||||
|
||||
Reference in New Issue
Block a user