diff --git a/core/java/android/webkit/WebBackForwardList.java b/core/java/android/webkit/WebBackForwardList.java index 0c34e3c16ac6b..4d3bbe475920b 100644 --- a/core/java/android/webkit/WebBackForwardList.java +++ b/core/java/android/webkit/WebBackForwardList.java @@ -57,7 +57,8 @@ public abstract class WebBackForwardList implements Cloneable, Serializable { /** * Clone the entire object to be used in the UI thread by clients of * WebView. This creates a copy that should never be modified by any of the - * webkit package classes. + * webkit package classes. On Android 4.4 and later there is no need to use + * this, as the object is already a read-only copy of the internal state. */ protected abstract WebBackForwardList clone(); } diff --git a/core/java/android/webkit/WebHistoryItem.java b/core/java/android/webkit/WebHistoryItem.java index 74db039e015d7..b9e704285f841 100644 --- a/core/java/android/webkit/WebHistoryItem.java +++ b/core/java/android/webkit/WebHistoryItem.java @@ -23,7 +23,7 @@ import android.graphics.Bitmap; /** * A convenience class for accessing fields in an entry in the back/forward list * of a WebView. Each WebHistoryItem is a snapshot of the requested history - * item. Each history item may be updated during the load of a page. + * item. * @see WebBackForwardList */ public abstract class WebHistoryItem implements Cloneable { @@ -44,8 +44,6 @@ public abstract class WebHistoryItem implements Cloneable { * history item. See getTargetUrl() for the url that is the actual target of * this history item. * @return The base url of this history item. - * Note: The VM ensures 32-bit atomic read/write operations so we don't have - * to synchronize this method. */ public abstract String getUrl(); @@ -60,22 +58,20 @@ public abstract class WebHistoryItem implements Cloneable { /** * 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 - * to synchronize this method. */ public abstract String getTitle(); /** * Return the favicon of this history item or {@code null} if no favicon was found. * @return A Bitmap containing the favicon for this history item or {@code null}. - * Note: The VM ensures 32-bit atomic read/write operations so we don't have - * to synchronize this method. */ @Nullable public abstract Bitmap getFavicon(); /** - * Clone the history item for use by clients of WebView. + * Clone the history item for use by clients of WebView. On Android 4.4 and later + * there is no need to use this, as the object is already a read-only copy of the + * internal state. */ protected abstract WebHistoryItem clone(); }