Shortcut the TYPED url case
Bug: 4985289
Don't go through the handleIntent route if the user typed
something into the omnibox if we don't need to.
Change-Id: I4de8e18c1ca734a0c6bfbca43c9448417cec2057
diff --git a/src/com/android/browser/TitleBarBase.java b/src/com/android/browser/TitleBarBase.java
index c7fb9c6..ae11038 100644
--- a/src/com/android/browser/TitleBarBase.java
+++ b/src/com/android/browser/TitleBarBase.java
@@ -554,7 +554,15 @@
@Override
public void onAction(String text, String extra, String source) {
mUiController.getCurrentTopWebView().requestFocus();
- mBaseUi.hideTitleBar();
+ if (UrlInputView.TYPED.equals(source)) {
+ String url = UrlUtils.smartUrlFilter(text, false);
+ Tab t = mBaseUi.getActiveTab();
+ if (url != null && t != null) {
+ mUiController.loadUrl(t, url);
+ setDisplayTitle(text);
+ return;
+ }
+ }
Intent i = new Intent();
String action = null;
if (UrlInputView.VOICE.equals(source)) {