diff options
Diffstat (limited to 'src/com/android/browser/autocomplete')
-rw-r--r-- | src/com/android/browser/autocomplete/SuggestiveAutoCompleteTextView.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/browser/autocomplete/SuggestiveAutoCompleteTextView.java b/src/com/android/browser/autocomplete/SuggestiveAutoCompleteTextView.java index 07c88e8..e51a629 100644 --- a/src/com/android/browser/autocomplete/SuggestiveAutoCompleteTextView.java +++ b/src/com/android/browser/autocomplete/SuggestiveAutoCompleteTextView.java @@ -791,7 +791,21 @@ public class SuggestiveAutoCompleteTextView extends EditText implements Filter.F setText(text); } else { mBlockCompletion = true; + // If cursor movement handling was suspended (the view is + // not in focus), resume it and apply the pending change. + // Since we don't want to perform any filtering, this change + // is safe. + boolean wasSuspended = false; + if (mController.isCursorHandlingSuspended()) { + mController.resumeCursorMovementHandlingAndApplyChanges(); + wasSuspended = true; + } + setText(text); + + if (wasSuspended) { + mController.suspendCursorMovementHandling(); + } mBlockCompletion = false; } } |