summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/browser/TitleBarXLarge.java7
-rw-r--r--src/com/android/browser/autocomplete/SuggestiveAutoCompleteTextView.java14
2 files changed, 21 insertions, 0 deletions
diff --git a/src/com/android/browser/TitleBarXLarge.java b/src/com/android/browser/TitleBarXLarge.java
index a786fd7..9fce511 100644
--- a/src/com/android/browser/TitleBarXLarge.java
+++ b/src/com/android/browser/TitleBarXLarge.java
@@ -267,6 +267,13 @@ public class TitleBarXLarge extends TitleBarBase
if (mUseQuickControls) {
mUi.hideTitleBar();
}
+
+ if (mUrlInput.getText().length() == 0) {
+ Tab currentTab = mUiController.getTabControl().getCurrentTab();
+ if (currentTab != null) {
+ mUrlInput.setText(currentTab.getUrl(), false);
+ }
+ }
}
mUrlInput.clearNeedsUpdate();
}
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;
}
}