From f013e1afd1e68af5e3b868c26a653bbfb39538f8 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 17 Dec 2008 18:05:43 -0800 Subject: Code drop from //branches/cupcake/...@124589 --- core/java/android/webkit/WebHistoryItem.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'core/java/android/webkit/WebHistoryItem.java') diff --git a/core/java/android/webkit/WebHistoryItem.java b/core/java/android/webkit/WebHistoryItem.java index 5570af8..a408e06 100644 --- a/core/java/android/webkit/WebHistoryItem.java +++ b/core/java/android/webkit/WebHistoryItem.java @@ -33,6 +33,8 @@ public class WebHistoryItem implements Cloneable { private String mTitle; // The base url of this item. private String mUrl; + // The original requested url of this item. + private String mOriginalUrl; // The favicon for this item. private Bitmap mFavicon; // The pre-flattened data used for saving the state. @@ -95,6 +97,18 @@ public class WebHistoryItem implements Cloneable { } /** + * Return the original url of this history item. This was the requested + * url, the final url may be different as there might have been + * redirects while loading the site. + * @return The original url of this history item. + * + * @hide pending API Council approval + */ + public String getOriginalUrl() { + return mOriginalUrl; + } + + /** * Return the document title of this history item. * @return The document title of this history item. * Note: The VM ensures 32-bit atomic read/write operations so we don't have @@ -154,8 +168,10 @@ public class WebHistoryItem implements Cloneable { private native void inflate(int nativeFrame, byte[] data); /* Called by jni when the item is updated */ - private void update(String url, String title, Bitmap favicon, byte[] data) { + private void update(String url, String originalUrl, String title, + Bitmap favicon, byte[] data) { mUrl = url; + mOriginalUrl = originalUrl; mTitle = title; mFavicon = favicon; mFlattenedData = data; -- cgit v1.1