Merge "Try to compensate for a race condition."

This commit is contained in:
Jean Chalard 2011-08-01 04:17:22 -07:00 committed by Android (Google) Code Review
commit cb1cc0d0de

View File

@ -789,7 +789,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final boolean selectionChanged = (newSelStart != candidatesEnd
|| newSelEnd != candidatesEnd) && mLastSelectionStart != newSelStart;
final boolean candidatesCleared = candidatesStart == -1 && candidatesEnd == -1;
if (((mComposingStringBuilder.length() > 0 && mHasUncommittedTypedChars)
if (!mExpectingUpdateSelection
&& ((mComposingStringBuilder.length() > 0 && mHasUncommittedTypedChars)
|| mVoiceProxy.isVoiceInputHighlighted())
&& (selectionChanged || candidatesCleared)) {
if (candidatesCleared) {