Make sure the icon database is created in the UI thread.

The monkey can launch the activity before the icon database has been created. If
getInstance() is called in a different thread, a looper will not exist.

I thought about forcing WebIconDatabase to use the main looper but that would
limit the use of WebIconDatabase to the main thread.

Bug: 2524758
Change-Id: Iebc1bb6021b084e643e9b180602f999b0ee30a5d
diff --git a/src/com/android/browser/CombinedBookmarkHistoryActivity.java b/src/com/android/browser/CombinedBookmarkHistoryActivity.java
index dd29121..a079cce 100644
--- a/src/com/android/browser/CombinedBookmarkHistoryActivity.java
+++ b/src/com/android/browser/CombinedBookmarkHistoryActivity.java
@@ -125,6 +125,9 @@
             getTabHost().setCurrentTab(2);
         }
 
+        // XXX: Must do this before launching the AsyncTask to avoid a
+        // potential crash if the icon database has not been created.
+        WebIconDatabase.getInstance();
         // Do this every time we launch the activity in case a new favicon was
         // added to the webkit db.
         (new AsyncTask<Void, Void, Void>() {