add old progress bar to ui

Change-Id: I53023ee54edf17894c51cb3247d7f2f2e2c7c240
diff --git a/src/com/android/browser/TitleBarPhone.java b/src/com/android/browser/TitleBarPhone.java
index d6b5f4d..3edd831 100644
--- a/src/com/android/browser/TitleBarPhone.java
+++ b/src/com/android/browser/TitleBarPhone.java
@@ -42,7 +42,8 @@
         OnClickListener, TextChangeWatcher {
 
     private Activity mActivity;
-    private StopProgressView mStopButton;
+    private ImageView mStopButton;
+    private PageProgressView mProgress;
     private ImageView mVoiceButton;
     private boolean mInLoad;
     private View mContainer;
@@ -60,8 +61,9 @@
         mContainer = findViewById(R.id.taburlbar);
         mLockIcon = (ImageView) findViewById(R.id.lock);
         mFavicon = (ImageView) findViewById(R.id.favicon);
-        mStopButton = (StopProgressView) findViewById(R.id.stop);
+        mStopButton = (ImageView) findViewById(R.id.stop);
         mStopButton.setOnClickListener(this);
+        mProgress = (PageProgressView) findViewById(R.id.progress);
         mVoiceButton = (ImageView) findViewById(R.id.voice);
         mVoiceButton.setOnClickListener(this);
         setFocusState(false);
@@ -119,14 +121,24 @@
      */
     @Override
     void setProgress(int newProgress) {
+        boolean blockvisuals = mUseQuickControls && isEditingUrl();
         if (newProgress >= PROGRESS_MAX) {
             mInLoad = false;
+            if (!blockvisuals) {
+                mProgress.setProgress(PageProgressView.MAX_PROGRESS);
+                mProgress.setVisibility(View.GONE);
+            }
             setFocusState(mUrlInput.hasFocus());
         } else {
             if (!mInLoad) {
                 mInLoad = true;
+                if (!blockvisuals) {
+                    mProgress.setVisibility(View.VISIBLE);
+                }
                 setFocusState(mUrlInput.hasFocus());
             }
+            mProgress.setProgress(newProgress * PageProgressView.MAX_PROGRESS
+                    / PROGRESS_MAX);
         }
     }
 
@@ -200,6 +212,14 @@
         setLayoutParams(makeLayoutParams());
     }
 
+    void setShowProgressOnly(boolean progress) {
+        if (progress && !inAutoLogin()) {
+            mContainer.setVisibility(View.GONE);
+        } else {
+            mContainer.setVisibility(View.VISIBLE);
+        }
+    }
+
     private ViewGroup.LayoutParams makeLayoutParams() {
         if (mUseQuickControls) {
             return new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,