don't scroll title bar while editing

      Bug: 3405814
      Check if scroll is user initiated and if user is editing url
      before hiding titlebar when scrolling

Change-Id: Icc32ef1cc83018021ebe12402aec016c9555e3a9
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index 4fb3ad4..9da1927 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -262,13 +262,14 @@
     // webview scroll listener
 
     @Override
-    public void onScroll(int visibleTitleHeight) {
+    public void onScroll(int visibleTitleHeight, boolean userInitiated) {
         if (mUseQuickControls) return;
         // isLoading is using the current tab, which initially might not be set yet
         if (mTabControl.getCurrentTab() != null
                 && !isLoading()) {
             if (visibleTitleHeight == 0) {
-                if (!showsTitleBarIndicator()) {
+                if (!showsTitleBarIndicator()
+                        && (!mUi.isEditingUrl() || userInitiated)) {
                     mUi.hideTitleBar();
                     showTitleBarIndicator(true);
                 }
@@ -606,7 +607,7 @@
             WebView webview = tab.getWebView();
             if (webview != null) {
                 int h = webview.getVisibleTitleHeight();
-                onScroll(h);
+                onScroll(h, true);
             }
         }
     }