diff options
author | Narayan Kamath <narayan@google.com> | 2011-03-15 11:33:52 +0000 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-03-15 09:38:20 -0700 |
commit | c93a2a97d9f64f8ac32c1e4e9c863d3e16021126 (patch) | |
tree | 68656ecfa4a6198f3dec9f9fa377643e8cd3f08a /src/com/android/browser/autocomplete | |
parent | ac7538e0a49911b926eeebb811f61c6996c68ae3 (diff) | |
download | packages_apps_Browser-c93a2a97d9f64f8ac32c1e4e9c863d3e16021126.zip packages_apps_Browser-c93a2a97d9f64f8ac32c1e4e9c863d3e16021126.tar.gz packages_apps_Browser-c93a2a97d9f64f8ac32c1e4e9c863d3e16021126.tar.bz2 |
Set the url input to current page when cleared
Bug: 4099000
Change-Id: I3a96b35a5234089fb76393273c250f3bfe0149eb
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; } } |