summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-06-17 16:26:59 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-17 16:26:59 -0700
commitd81500c9a8cc733da2c916dddd1bfa3c0ba2c05e (patch)
tree9a425328e4a6c7d0d83972369d2f6606f165a0b7 /src/com/android/browser
parent3f1c7b93b87595beb2610b31ed9bbef211bcab40 (diff)
parent67f3363c1fa95aa06b6a90e1f07ad950e4e22a3a (diff)
downloadpackages_apps_Browser-d81500c9a8cc733da2c916dddd1bfa3c0ba2c05e.zip
packages_apps_Browser-d81500c9a8cc733da2c916dddd1bfa3c0ba2c05e.tar.gz
packages_apps_Browser-d81500c9a8cc733da2c916dddd1bfa3c0ba2c05e.tar.bz2
Merge "Omnibox improvements"
Diffstat (limited to 'src/com/android/browser')
-rw-r--r--src/com/android/browser/TitleBarPhone.java25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/com/android/browser/TitleBarPhone.java b/src/com/android/browser/TitleBarPhone.java
index 75b9fb7..de5fb7f 100644
--- a/src/com/android/browser/TitleBarPhone.java
+++ b/src/com/android/browser/TitleBarPhone.java
@@ -72,6 +72,7 @@ public class TitleBarPhone extends TitleBarBase implements OnFocusChangeListener
mStopDrawable = res.getDrawable(R.drawable.ic_stop_holo_dark);
mRefreshDrawable = res.getDrawable(R.drawable.ic_refresh_holo_dark);
setUaSwitcher(mFavicon);
+ mUrlInput.setContainer(this);
}
@Override
@@ -110,16 +111,6 @@ public class TitleBarPhone extends TitleBarBase implements OnFocusChangeListener
}
@Override
- protected void onProgressStarted() {
- setFocusState(mUrlInput.hasFocus());
- }
-
- @Override
- protected void onProgressStopped() {
- setFocusState(mUrlInput.hasFocus());
- }
-
- @Override
void setProgress(int progress) {
super.setProgress(progress);
if (progress == 100) {
@@ -137,13 +128,15 @@ public class TitleBarPhone extends TitleBarBase implements OnFocusChangeListener
*/
@Override
void setDisplayTitle(String title) {
- if (title == null) {
- mUrlInput.setText(R.string.new_tab);
- } else {
- mUrlInput.setText(title);
+ if (!isEditingUrl()) {
+ if (title == null) {
+ mUrlInput.setText(R.string.new_tab);
+ } else {
+ mUrlInput.setText(title);
+ }
+ mUrlInput.setSelection(0);
+ updateNavigationState();
}
- mUrlInput.setSelection(0);
- updateNavigationState();
}
@Override