OSDN Git Service

Do not use the original url in onReceivedTitle.
authorPatrick Scott <phanna@android.com>
Thu, 4 Jun 2009 15:10:38 +0000 (11:10 -0400)
committerPatrick Scott <phanna@android.com>
Thu, 4 Jun 2009 15:10:38 +0000 (11:10 -0400)
We used to use the original url because that was what was entered into the
history database. Now, with a change in webkit, the correct url will be passed
to updateVisitedHistory if the server sent a redirect. This allows for the
correct url and title to be displayed in the title bar as well as the correct
url and title to be stored in the history.

src/com/android/browser/BrowserActivity.java

index 564620e..e738d6c 100644 (file)
@@ -3460,7 +3460,7 @@ public class BrowserActivity extends Activity
 
         @Override
         public void onReceivedTitle(WebView view, String title) {
-            String url = view.getOriginalUrl();
+            String url = view.getUrl();
 
             // here, if url is null, we want to reset the title
             setUrlTitle(url, title);