Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89490465 authored by Torne (Richard Coles)'s avatar Torne (Richard Coles)
Browse files

Update WebBackForwardList javadoc.

Update javadoc for WebBackForwardList and WebHistoryItem. Remove
references to history items being updated as this no longer occurs, and
clarify in clone() that there's no need to acutally do this any more.

Also remove a bunch of implementation notes about
atomicity/synchronisation that are being rendered attached to the return
value and likely aren't even true any more, let alone relevant to
developers.

Bug: 74593032
Test: make offline-sdk-docs
Change-Id: I4ce33133d2ff18e7376d768c7a2e076ecd2a8b95
parent 4cedfca8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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();
}
+4 −8
Original line number Diff line number Diff line
@@ -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();
}