Use tiles for bookmarks

- Use tile based bitmap for bookmarks and history
- Settings UI cleanup

Change-Id: If959cb0b8f110035b8dd2fefe8106e9c5d30f4f1
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index 884cdc4..a50a7d6 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -657,6 +657,7 @@
 
         String title = null;
         String url = null;
+        mTouchIconUrl = null;
 
         mFakeTitle = (TextView) findViewById(R.id.fake_title);
         if (mMap != null) {
@@ -838,7 +839,7 @@
                 Bookmarks.addBookmark(AddBookmarkPage.this, false, url,
                         title, thumbnail, mCurrentFolder);
                 if (touchIconUrl != null) {
-                    new DownloadTouchIcon(mContext, cr, url).execute(mTouchIconUrl);
+                    new DownloadTouchIcon(mContext, cr, url).execute(touchIconUrl);
                 }
                 mMessage.arg1 = 1;
             } catch (IllegalStateException e) {
@@ -1083,7 +1084,9 @@
             } else {
                 bundle.putParcelable(BrowserContract.Bookmarks.THUMBNAIL, thumbnail);
                 bundle.putBoolean(REMOVE_THUMBNAIL, !urlUnmodified);
-                bundle.putString(TOUCH_ICON_URL, mTouchIconUrl);
+                if (mTouchIconUrl != null) {
+                    bundle.putString(TOUCH_ICON_URL, mTouchIconUrl);
+                }
                 // Post a message to write to the DB.
                 Message msg = Message.obtain(mHandler, SAVE_BOOKMARK);
                 msg.setData(bundle);