Bookmarks page UI updates

 Bug: 3248628
 Updates the bookmark page UI based off of the newest UI design
 document.

Change-Id: I26447b7e1c38798b3c229c9d8c10af2565458a7b
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index de256a8..24a8cd5 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -140,44 +140,11 @@
                 LOADER_ID_FOLDER_CONTENTS));
         loader.setUri(uri);
         loader.forceLoad();
-        updateVisible();
         if (mFolderNamer.getVisibility() == View.VISIBLE) {
             completeOrCancelFolderNaming(true);
         }
     }
 
-    /**
-     * Update the views shown to only show the two deepest levels of crumbs.
-     * Note that this method depends on internal knowledge of BreadCrumbView.
-     */
-    private void updateVisible() {
-      if (MAX_CRUMBS_SHOWN > 0) {
-          int invisibleCrumbs = mCrumbs.size() - MAX_CRUMBS_SHOWN;
-          // This class always uses a back button, which is the first child.
-          int childIndex = 1;
-          if (invisibleCrumbs > 0) {
-              int crumbIndex = 0;
-              while (crumbIndex < invisibleCrumbs) {
-                  // Set the crumb to GONE.
-                  mCrumbs.getChildAt(childIndex).setVisibility(View.GONE);
-                  childIndex++;
-                  // Each crumb is followed by a separator (except the last
-                  // one).  Also make it GONE
-                  mCrumbs.getChildAt(childIndex).setVisibility(View.GONE);
-                  childIndex++;
-                  // Move to the next crumb.
-                  crumbIndex++;
-              }
-          }
-          // Make sure the last two are visible.
-          int childCount = mCrumbs.getChildCount();
-          while (childIndex < childCount) {
-              mCrumbs.getChildAt(childIndex).setVisibility(View.VISIBLE);
-              childIndex++;
-          }
-      }
-    }
-
     @Override
     public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
         if (v == mFolderNamer) {
@@ -428,7 +395,6 @@
                     mCrumbs.pushView(thisFolder.Name, thisFolder);
                 }
                 getLoaderManager().stopLoader(LOADER_ID_ALL_FOLDERS);
-                updateVisible();
                 break;
             default:
                 break;
@@ -566,6 +532,7 @@
         mCrumbs.pushView(name, false,
                 new Folder(name, BrowserProvider2.FIXED_ID_ROOT));
         mCrumbHolder = findViewById(R.id.crumb_holder);
+        mCrumbs.setMaxVisible(MAX_CRUMBS_SHOWN);
 
         mAdapter = new FolderAdapter(this);
         mListView = (ListView) findViewById(R.id.list);