Fix a bug where null would be converted to "null"
It's unclear what the concrete effects of this are, but they are not very strong. This only happens in corner cases, when the input connection is not active - while rotating, for example. Change-Id: I1d22459a6e94a8ecccb53cfcbc2d301b1d502204main
parent
2e3c1106f7
commit
8f02f1a118
|
@ -233,8 +233,10 @@ public final class RichInputConnection {
|
||||||
// getCapsMode should be updated to be able to return a "not enough info" result so that
|
// getCapsMode should be updated to be able to return a "not enough info" result so that
|
||||||
// we can get more context only when needed.
|
// we can get more context only when needed.
|
||||||
if (TextUtils.isEmpty(mCommittedTextBeforeComposingText) && 0 != mExpectedCursorPosition) {
|
if (TextUtils.isEmpty(mCommittedTextBeforeComposingText) && 0 != mExpectedCursorPosition) {
|
||||||
mCommittedTextBeforeComposingText.append(
|
final CharSequence textBeforeCursor = getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE, 0);
|
||||||
getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE, 0));
|
if (!TextUtils.isEmpty(textBeforeCursor)) {
|
||||||
|
mCommittedTextBeforeComposingText.append(textBeforeCursor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// This never calls InputConnection#getCapsMode - in fact, it's a static method that
|
// This never calls InputConnection#getCapsMode - in fact, it's a static method that
|
||||||
// never blocks or initiates IPC.
|
// never blocks or initiates IPC.
|
||||||
|
|
Loading…
Reference in New Issue