Update the correct favicon when starting the load.

The WebView's original url and current url are incorrect during the provisional
load. Use the given url instead when updating the favicon.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index f67292a..dc85ec0 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2362,7 +2362,15 @@
     private void updateIcon(WebView view, Bitmap icon) {
         if (icon != null) {
             BrowserBookmarksAdapter.updateBookmarkFavicon(mResolver,
-                    view, icon);
+                    view.getOriginalUrl(), view.getUrl(), icon);
+        }
+        setFavicon(icon);
+    }
+
+    private void updateIcon(String url, Bitmap icon) {
+        if (icon != null) {
+            BrowserBookmarksAdapter.updateBookmarkFavicon(mResolver,
+                    null, url, icon);
         }
         setFavicon(icon);
     }
@@ -2383,7 +2391,7 @@
 
             // Call updateIcon instead of setFavicon so the bookmark
             // database can be updated.
-            updateIcon(view, favicon);
+            updateIcon(url, favicon);
 
             if (mSettings.isTracing()) {
                 String host;
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index bd29166..36af1fc 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -258,18 +258,11 @@
      * Update the bookmark's favicon. This is a convenience method for updating
      * a bookmark favicon for the originalUrl and url of the passed in WebView.
      * @param cr The ContentResolver to use.
-     * @param WebView The WebView containing the url to update.
+     * @param originalUrl The original url before any redirects.
+     * @param url The current url.
      * @param favicon The favicon bitmap to write to the db.
      */
     /* package */ static void updateBookmarkFavicon(ContentResolver cr,
-            WebView view, Bitmap favicon) {
-        if (view != null) {
-            updateBookmarkFavicon(cr, view.getOriginalUrl(), view.getUrl(),
-                    favicon);
-        }
-    }
-
-    private static void updateBookmarkFavicon(ContentResolver cr,
             String originalUrl, String url, Bitmap favicon) {
         final Cursor c = queryBookmarksForUrl(cr, originalUrl, url, true);
         if (c == null) {