diff options
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/webkit/CacheManager.java | 86 | ||||
-rw-r--r-- | core/java/android/webkit/CookieManager.java | 51 | ||||
-rwxr-xr-x | core/java/android/webkit/GeolocationPermissions.java | 42 | ||||
-rw-r--r-- | core/java/android/webkit/WebResourceResponse.java | 25 | ||||
-rw-r--r-- | core/java/android/webkit/WebSettings.java | 574 | ||||
-rw-r--r-- | core/java/android/webkit/WebStorage.java | 37 | ||||
-rw-r--r-- | core/java/android/webkit/WebView.java | 613 |
7 files changed, 828 insertions, 600 deletions
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java index 671c064..f0e6ff0 100644 --- a/core/java/android/webkit/CacheManager.java +++ b/core/java/android/webkit/CacheManager.java @@ -56,6 +56,7 @@ public final class CacheManager { * Represents a resource stored in the HTTP cache. Instances of this class * can be obtained by calling * {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>))}. + * * @deprecated Access to the HTTP cache will be removed in a future release. */ @Deprecated @@ -81,7 +82,8 @@ public final class CacheManager { /** * Gets the status code of this cache entry. - * @return The status code of this cache entry + * + * @return the status code of this cache entry */ public int getHttpStatusCode() { return httpStatusCode; @@ -89,7 +91,8 @@ public final class CacheManager { /** * Gets the content length of this cache entry. - * @return The content length of this cache entry + * + * @return the content length of this cache entry */ public long getContentLength() { return contentLength; @@ -99,7 +102,8 @@ public final class CacheManager { * Gets the path of the file used to store the content of this cache * entry, relative to the base directory of the cache. See * {@link CacheManager#getCacheFileBaseDir CacheManager.getCacheFileBaseDir()}. - * @return The path of the file used to store this cache entry + * + * @return the path of the file used to store this cache entry */ public String getLocalPath() { return localPath; @@ -108,7 +112,8 @@ public final class CacheManager { /** * Gets the expiry date of this cache entry, expressed in milliseconds * since midnight, January 1, 1970 UTC. - * @return The expiry date of this cache entry + * + * @return the expiry date of this cache entry */ public long getExpires() { return expires; @@ -116,7 +121,8 @@ public final class CacheManager { /** * Gets the expiry date of this cache entry, expressed as a string. - * @return The expiry date of this cache entry + * + * @return the expiry date of this cache entry * */ public String getExpiresString() { @@ -126,7 +132,8 @@ public final class CacheManager { /** * Gets the date at which this cache entry was last modified, expressed * as a string. - * @return The date at which this cache entry was last modified + * + * @return the date at which this cache entry was last modified */ public String getLastModified() { return lastModified; @@ -134,7 +141,8 @@ public final class CacheManager { /** * Gets the entity tag of this cache entry. - * @return The entity tag of this cache entry + * + * @return the entity tag of this cache entry */ public String getETag() { return etag; @@ -142,7 +150,8 @@ public final class CacheManager { /** * Gets the MIME type of this cache entry. - * @return The MIME type of this cache entry + * + * @return the MIME type of this cache entry */ public String getMimeType() { return mimeType; @@ -151,7 +160,8 @@ public final class CacheManager { /** * Gets the value of the HTTP 'Location' header with which this cache * entry was received. - * @return The HTTP 'Location' header for this cache entry + * + * @return the HTTP 'Location' header for this cache entry */ public String getLocation() { return location; @@ -159,7 +169,8 @@ public final class CacheManager { /** * Gets the encoding of this cache entry. - * @return The encoding of this cache entry + * + * @return the encoding of this cache entry */ public String getEncoding() { return encoding; @@ -168,7 +179,8 @@ public final class CacheManager { /** * Gets the value of the HTTP 'Content-Disposition' header with which * this cache entry was received. - * @return The HTTP 'Content-Disposition' header for this cache entry + * + * @return the HTTP 'Content-Disposition' header for this cache entry * */ public String getContentDisposition() { @@ -179,7 +191,8 @@ public final class CacheManager { * Gets the input stream to the content of this cache entry, to allow * content to be read. See * {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>)}. - * @return An input stream to the content of this cache entry + * + * @return an input stream to the content of this cache entry */ public InputStream getInputStream() { return inStream; @@ -189,7 +202,8 @@ public final class CacheManager { * Gets an output stream to the content of this cache entry, to allow * content to be written. See * {@link CacheManager#saveCacheFile CacheManager.saveCacheFile(String, CacheResult)}. - * @return An output stream to the content of this cache entry + * + * @return an output stream to the content of this cache entry */ // Note that this is always null for objects returned by getCacheFile()! public OutputStream getOutputStream() { @@ -199,7 +213,8 @@ public final class CacheManager { /** * Sets an input stream to the content of this cache entry. - * @param stream An input stream to the content of this cache entry + * + * @param stream an input stream to the content of this cache entry */ public void setInputStream(InputStream stream) { this.inStream = stream; @@ -207,7 +222,8 @@ public final class CacheManager { /** * Sets the encoding of this cache entry. - * @param encoding The encoding of this cache entry + * + * @param encoding the encoding of this cache entry */ public void setEncoding(String encoding) { this.encoding = encoding; @@ -225,7 +241,8 @@ public final class CacheManager { * Initializes the HTTP cache. This method must be called before any * CacheManager methods are used. Note that this is called automatically * when a {@link WebView} is created. - * @param context The application context + * + * @param context the application context */ static void init(Context context) { // This isn't actually where the real cache lives, but where we put files for the @@ -240,7 +257,8 @@ public final class CacheManager { * Gets the base directory in which the files used to store the contents of * cache entries are placed. See * {@link CacheManager.CacheResult#getLocalPath CacheManager.CacheResult.getLocalPath()}. - * @return The base directory of the cache + * + * @return the base directory of the cache * @deprecated Access to the HTTP cache will be removed in a future release. */ @Deprecated @@ -250,7 +268,8 @@ public final class CacheManager { /** * Gets whether the HTTP cache is disabled. - * @return True if the HTTP cache is disabled + * + * @return true if the HTTP cache is disabled * @deprecated Access to the HTTP cache will be removed in a future release. */ @Deprecated @@ -262,8 +281,9 @@ public final class CacheManager { * Starts a cache transaction. Returns true if this is the only running * transaction. Otherwise, this transaction is nested inside currently * running transactions and false is returned. - * @return True if this is the only running transaction - * @deprecated This method no longer has any effect and always returns false + * + * @return true if this is the only running transaction + * @deprecated This method no longer has any effect and always returns false. */ @Deprecated public static boolean startCacheTransaction() { @@ -273,8 +293,9 @@ public final class CacheManager { /** * Ends the innermost cache transaction and returns whether this was the * only running transaction. - * @return True if this was the only running transaction - * @deprecated This method no longer has any effect and always returns false + * + * @return true if this was the only running transaction + * @deprecated This method no longer has any effect and always returns false. */ @Deprecated public static boolean endCacheTransaction() { @@ -287,10 +308,11 @@ public final class CacheManager { * entry needs validation, appropriate headers will be added to the map. * The input stream of the CacheEntry object should be closed by the caller * when access to the underlying file is no longer required. - * @param url The URL for which a cache entry is requested - * @param headers A map from HTTP header name to value, to be populated + * + * @param url the URL for which a cache entry is requested + * @param headers a map from HTTP header name to value, to be populated * for the returned cache entry - * @return The cache entry for the specified URL + * @return the cache entry for the specified URL * @deprecated Access to the HTTP cache will be removed in a future release. */ @Deprecated @@ -345,14 +367,15 @@ public final class CacheManager { } /** - * Given a url and its full headers, returns CacheResult if a local cache + * Given a URL and its full headers, gets a CacheResult if a local cache * can be stored. Otherwise returns null. The mimetype is passed in so that * the function can use the mimetype that will be passed to WebCore which * could be different from the mimetype defined in the headers. * forceCache is for out-of-package callers to force creation of a * CacheResult, and is used to supply surrogate responses for URL * interception. - * @return CacheResult for a given url + * + * @return a CacheResult for a given URL */ static CacheResult createCacheFile(String url, int statusCode, Headers headers, String mimeType, boolean forceCache) { @@ -363,8 +386,9 @@ public final class CacheManager { /** * Adds a cache entry to the HTTP cache for the specicifed URL. Also closes * the cache entry's output stream. - * @param url The URL for which the cache entry should be added - * @param cacheResult The cache entry to add + * + * @param url the URL for which the cache entry should be added + * @param cacheResult the cache entry to add * @deprecated Access to the HTTP cache will be removed in a future release. */ @Deprecated @@ -401,9 +425,9 @@ public final class CacheManager { } /** - * Remove all cache files. + * Removes all cache files. * - * @return Whether the removal succeeded. + * @return whether the removal succeeded */ static boolean removeAllCacheFiles() { // delete cache files in a separate thread to not block UI. diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java index 1e7f38c..30c713e 100644 --- a/core/java/android/webkit/CookieManager.java +++ b/core/java/android/webkit/CookieManager.java @@ -40,7 +40,7 @@ public class CookieManager { * {@link CookieSyncManager#createInstance(Context)} must be called * first. * - * @return The singleton CookieManager instance + * @return the singleton CookieManager instance */ public static synchronized CookieManager getInstance() { return WebViewFactory.getProvider().getCookieManager(); @@ -49,7 +49,8 @@ public class CookieManager { /** * Sets whether the application's {@link WebView} instances should send and * accept cookies. - * @param accept Whether {@link WebView} instances should send and accept + * + * @param accept whether {@link WebView} instances should send and accept * cookies */ public synchronized void setAcceptCookie(boolean accept) { @@ -59,7 +60,8 @@ public class CookieManager { /** * Gets whether the application's {@link WebView} instances send and accept * cookies. - * @return True if {@link WebView} instances send and accept cookies + * + * @return true if {@link WebView} instances send and accept cookies */ public synchronized boolean acceptCookie() { throw new MustOverrideException(); @@ -70,8 +72,9 @@ public class CookieManager { * path and name will be replaced with the new cookie. The cookie being set * must not have expired and must not be a session cookie, otherwise it * will be ignored. - * @param url The URL for which the cookie is set - * @param value The cookie as a string, using the format of the 'Set-Cookie' + * + * @param url the URL for which the cookie is set + * @param value the cookie as a string, using the format of the 'Set-Cookie' * HTTP response header */ public void setCookie(String url, String value) { @@ -80,8 +83,9 @@ public class CookieManager { /** * Gets the cookies for the given URL. - * @param url The URL for which the cookies are requested - * @return value The cookies as a string, using the format of the 'Cookie' + * + * @param url the URL for which the cookies are requested + * @return value the cookies as a string, using the format of the 'Cookie' * HTTP request header */ public String getCookie(String url) { @@ -89,10 +93,11 @@ public class CookieManager { } /** - * See {@link #getCookie(String)} - * @param url The URL for which the cookies are requested - * @param privateBrowsing Whether to use the private browsing cookie jar - * @return value The cookies as a string, using the format of the 'Cookie' + * See {@link #getCookie(String)}. + * + * @param url the URL for which the cookies are requested + * @param privateBrowsing whether to use the private browsing cookie jar + * @return value the cookies as a string, using the format of the 'Cookie' * HTTP request header * @hide Used by Browser, no intention to publish. */ @@ -101,10 +106,11 @@ public class CookieManager { } /** - * Get cookie(s) for a given uri so that it can be set to "cookie:" in http + * Gets cookie(s) for a given uri so that it can be set to "cookie:" in http * request header. - * @param uri The WebAddress for which the cookies are requested - * @return value The cookies as a string, using the format of the 'Cookie' + * + * @param uri the WebAddress for which the cookies are requested + * @return value the cookies as a string, using the format of the 'Cookie' * HTTP request header * @hide Used by RequestHandle, no intention to publish. */ @@ -129,7 +135,8 @@ public class CookieManager { /** * Gets whether there are stored cookies. - * @return True if there are stored cookies. + * + * @return true if there are stored cookies */ public synchronized boolean hasCookies() { throw new MustOverrideException(); @@ -137,7 +144,8 @@ public class CookieManager { /** * See {@link #hasCookies()}. - * @param privateBrowsing Whether to use the private browsing cookie jar + * + * @param privateBrowsing whether to use the private browsing cookie jar * @hide Used by Browser, no intention to publish. */ public synchronized boolean hasCookies(boolean privateBrowsing) { @@ -152,7 +160,7 @@ public class CookieManager { } /** - * Flush all cookies managed by the Chrome HTTP stack to flash. + * Flushes all cookies managed by the Chrome HTTP stack to flash. * * @hide Package level api, called from CookieSyncManager */ @@ -163,7 +171,8 @@ public class CookieManager { /** * Gets whether the application's {@link WebView} instances send and accept * cookies for file scheme URLs. - * @return True if {@link WebView} instances send and accept cookies for + * + * @return true if {@link WebView} instances send and accept cookies for * file scheme URLs */ // Static for backward compatibility. @@ -172,7 +181,8 @@ public class CookieManager { } /** - * Implements {@link #allowFileSchemeCookies()} + * Implements {@link #allowFileSchemeCookies()}. + * * @hide Only for use by WebViewProvider implementations */ protected boolean allowFileSchemeCookiesImpl() { @@ -195,7 +205,8 @@ public class CookieManager { } /** - * Implements {@link #setAcceptFileSchemeCookies(boolean)} + * Implements {@link #setAcceptFileSchemeCookies(boolean)}. + * * @hide Only for use by WebViewProvider implementations */ protected void setAcceptFileSchemeCookiesImpl(boolean accept) { diff --git a/core/java/android/webkit/GeolocationPermissions.java b/core/java/android/webkit/GeolocationPermissions.java index cd5c9d1..9c0f754 100755 --- a/core/java/android/webkit/GeolocationPermissions.java +++ b/core/java/android/webkit/GeolocationPermissions.java @@ -48,28 +48,31 @@ public class GeolocationPermissions { */ public interface Callback { /** - * Set the Geolocation permission state for the supplied origin. - * @param origin The origin for which permissions are set. - * @param allow Whether or not the origin should be allowed to use the - * Geolocation API. - * @param retain Whether the permission should be retained beyond the + * Sets the Geolocation permission state for the supplied origin. + * + * @param origin the origin for which permissions are set + * @param allow whether or not the origin should be allowed to use the + * Geolocation API + * @param retain whether the permission should be retained beyond the * lifetime of a page currently being displayed by a - * WebView. + * WebView */ public void invoke(String origin, boolean allow, boolean retain); }; /** - * Get the singleton instance of this class. - * @return The singleton {@link GeolocationPermissions} instance. + * Gets the singleton instance of this class. + * + * @return the singleton {@link GeolocationPermissions} instance */ public static GeolocationPermissions getInstance() { return WebViewFactory.getProvider().getGeolocationPermissions(); } /** - * Get the set of origins for which Geolocation permissions are stored. - * @param callback A {@link ValueCallback} to receive the result of this + * Gets the set of origins for which Geolocation permissions are stored. + * + * @param callback a {@link ValueCallback} to receive the result of this * request. This object's * {@link ValueCallback#onReceiveValue(T) onReceiveValue()} * method will be invoked asynchronously with a set of @@ -85,9 +88,10 @@ public class GeolocationPermissions { } /** - * Get the Geolocation permission state for the specified origin. - * @param origin The origin for which Geolocation permission is requested. - * @param callback A {@link ValueCallback} to receive the result of this + * Gets the Geolocation permission state for the specified origin. + * + * @param origin the origin for which Geolocation permission is requested + * @param callback a {@link ValueCallback} to receive the result of this * request. This object's * {@link ValueCallback#onReceiveValue(T) onReceiveValue()} * method will be invoked asynchronously with a boolean @@ -99,23 +103,25 @@ public class GeolocationPermissions { } /** - * Clear the Geolocation permission state for the specified origin. - * @param origin The origin for which Geolocation permissions are cleared. + * Clears the Geolocation permission state for the specified origin. + * + * @param origin the origin for which Geolocation permissions are cleared */ public void clear(String origin) { // Must be a no-op for backward compatibility: see the hidden constructor for reason. } /** - * Allow the specified origin to use the Geolocation API. - * @param origin The origin for which Geolocation API use is allowed. + * Allows the specified origin to use the Geolocation API. + * + * @param origin the origin for which Geolocation API use is allowed */ public void allow(String origin) { // Must be a no-op for backward compatibility: see the hidden constructor for reason. } /** - * Clear the Geolocation permission state for all origins. + * Clears the Geolocation permission state for all origins. */ public void clearAll() { // Must be a no-op for backward compatibility: see the hidden constructor for reason. diff --git a/core/java/android/webkit/WebResourceResponse.java b/core/java/android/webkit/WebResourceResponse.java index 650310e..b7171ee 100644 --- a/core/java/android/webkit/WebResourceResponse.java +++ b/core/java/android/webkit/WebResourceResponse.java @@ -36,9 +36,10 @@ public class WebResourceResponse { * input stream. Callers must implement * {@link InputStream#read(byte[]) InputStream.read(byte[])} for the input * stream. - * @param mimeType The resource response's MIME type, for example text/html - * @param encoding The resource response's encoding - * @param data The input stream that provides the resource response's data + * + * @param mimeType the resource response's MIME type, for example text/html + * @param encoding the resource response's encoding + * @param data the input stream that provides the resource response's data */ public WebResourceResponse(String mimeType, String encoding, InputStream data) { @@ -49,7 +50,8 @@ public class WebResourceResponse { /** * Sets the resource response's MIME type, for example text/html. - * @param mimeType The resource response's MIME type + * + * @param mimeType the resource response's MIME type */ public void setMimeType(String mimeType) { mMimeType = mimeType; @@ -57,7 +59,8 @@ public class WebResourceResponse { /** * Gets the resource response's MIME type. - * @return The resource response's MIME type + * + * @return the resource response's MIME type */ public String getMimeType() { return mMimeType; @@ -66,7 +69,8 @@ public class WebResourceResponse { /** * Sets the resource response's encoding, for example UTF-8. This is used * to decode the data from the input stream. - * @param encoding The resource response's encoding + * + * @param encoding the resource response's encoding */ public void setEncoding(String encoding) { mEncoding = encoding; @@ -74,7 +78,8 @@ public class WebResourceResponse { /** * Gets the resource response's encoding. - * @return The resource response's encoding + * + * @return the resource response's encoding */ public String getEncoding() { return mEncoding; @@ -83,7 +88,8 @@ public class WebResourceResponse { /** * Sets the input stream that provides the resource respone's data. Callers * must implement {@link InputStream#read(byte[]) InputStream.read(byte[])}. - * @param data The input stream that provides the resource response's data + * + * @param data the input stream that provides the resource response's data */ public void setData(InputStream data) { mInputStream = data; @@ -91,7 +97,8 @@ public class WebResourceResponse { /** * Gets the input stream that provides the resource respone's data. - * @return The input stream that provides the resource response's data + * + * @return the input stream that provides the resource response's data */ public InputStream getData() { return mInputStream; diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index 1bbf00f..901372b 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -33,10 +33,12 @@ import android.os.Build; public abstract class WebSettings { /** * Enum for controlling the layout of html. - * NORMAL means no rendering changes. - * SINGLE_COLUMN moves all content into one column that is the width of the - * view. - * NARROW_COLUMNS makes all columns no wider than the screen if possible. + * <ul> + * <li>NORMAL means no rendering changes.</li> + * <li>SINGLE_COLUMN moves all content into one column that is the width of the + * view.</li> + * <li>NARROW_COLUMNS makes all columns no wider than the screen if possible.</li> + * </ul> */ // XXX: These must match LayoutAlgorithm in Settings.h in WebCore. public enum LayoutAlgorithm { @@ -51,11 +53,14 @@ public abstract class WebSettings { /** * Enum for specifying the text size. - * SMALLEST is 50% - * SMALLER is 75% - * NORMAL is 100% - * LARGER is 150% - * LARGEST is 200% + * <ul> + * <li>SMALLEST is 50%</li> + * <li>SMALLER is 75%</li> + * <li>NORMAL is 100%</li> + * <li>LARGER is 150%</li> + * <li>LARGEST is 200%</li> + * </ul> + * * @deprecated Use {@link WebSettings#setTextZoom(int)} and {@link WebSettings#getTextZoom()} instead. */ public enum TextSize { @@ -72,9 +77,11 @@ public abstract class WebSettings { /** * Enum for specifying the WebView's desired density. - * FAR makes 100% looking like in 240dpi - * MEDIUM makes 100% looking like in 160dpi - * CLOSE makes 100% looking like in 120dpi + * <ul> + * <li>FAR makes 100% looking like in 240dpi</li> + * <li>MEDIUM makes 100% looking like in 160dpi</li> + * <li>CLOSE makes 100% looking like in 120dpi</li> + * </ul> */ public enum ZoomDensity { FAR(150), // 240dpi @@ -87,24 +94,24 @@ public abstract class WebSettings { } /** - * Default cache usage pattern Use with {@link #setCacheMode}. + * Default cache usage pattern. Use with {@link #setCacheMode}. */ public static final int LOAD_DEFAULT = -1; /** - * Normal cache usage pattern Use with {@link #setCacheMode}. + * Normal cache usage pattern. Use with {@link #setCacheMode}. */ public static final int LOAD_NORMAL = 0; /** - * Use cache if content is there, even if expired (eg, history nav) + * Use cache if content is there, even if expired (eg, history nav). * If it is not in the cache, load from network. * Use with {@link #setCacheMode}. */ public static final int LOAD_CACHE_ELSE_NETWORK = 1; /** - * Don't use the cache, load from network + * Don't use the cache, load from network. * Use with {@link #setCacheMode}. */ public static final int LOAD_NO_CACHE = 2; @@ -139,6 +146,7 @@ public abstract class WebSettings { /** * Hidden constructor to prevent clients from creating a new settings * instance or deriving the class. + * * @hide */ protected WebSettings() { @@ -146,6 +154,7 @@ public abstract class WebSettings { /** * Enables dumping the pages navigation cache to a text file. + * * @deprecated This method is now obsolete. */ @Deprecated @@ -154,7 +163,8 @@ public abstract class WebSettings { } /** - * Returns true if dumping the navigation cache is enabled. + * Gets whether dumping the navigation cache is enabled. + * * @deprecated This method is now obsolete. */ @Deprecated @@ -167,16 +177,19 @@ public abstract class WebSettings { * controls and gestures. The particular zoom mechanisms that should be used * can be set with {@link #setBuiltInZoomControls}. This setting does not * affect zooming performed using the {@link WebView#zoomIn()} and - * {@link WebView#zoomOut()} methods. - * @param support Whether the WebView should support zoom. + * {@link WebView#zoomOut()} methods. The default is true. + * + * @param support whether the WebView should support zoom */ public void setSupportZoom(boolean support) { throw new MustOverrideException(); } /** - * Returns true if the WebView supports zoom. The default is true. - * @return True if the WebView supports zoom. + * Gets whether the WebView supports zoom. + * + * @return true if the WebView supports zoom + * @see #setSupportZoom */ public boolean supportZoom() { throw new MustOverrideException(); @@ -187,11 +200,12 @@ public abstract class WebSettings { * built-in zoom mechanisms comprise on-screen zoom controls, which are * displayed over the WebView's content, and the use of a pinch gesture to * control zooming. Whether or not these on-screen controls are displayed - * can be set with {@link #setDisplayZoomControls}. + * can be set with {@link #setDisplayZoomControls}. The default is false. * <p> * The built-in mechanisms are the only currently supported zoom * mechanisms, so it is recommended that this setting is always enabled. - * @param enabled Whether the WebView should use its built-in zoom mechanisms. + * + * @param enabled whether the WebView should use its built-in zoom mechanisms */ // This method was intended to select between the built-in zoom mechanisms // and the separate zoom controls. The latter were obtained using @@ -201,9 +215,10 @@ public abstract class WebSettings { } /** - * Returns true if the zoom mechanisms built into WebView are being used. - * The default is false. - * @return True if the zoom mechanisms built into WebView are being used. + * Gets whether the zoom mechanisms built into WebView are being used. + * + * @return true if the zoom mechanisms built into WebView are being used + * @see #setBuiltInZoomControls */ public boolean getBuiltInZoomControls() { throw new MustOverrideException(); @@ -212,24 +227,28 @@ public abstract class WebSettings { /** * Sets whether the WebView should display on-screen zoom controls when * using the built-in zoom mechanisms. See {@link #setBuiltInZoomControls}. - * @param enabled Whether the WebView should display on-screen zoom controls. + * The default is true. + * + * @param enabled whether the WebView should display on-screen zoom controls */ public void setDisplayZoomControls(boolean enabled) { throw new MustOverrideException(); } /** - * Returns true if the WebView displays on-screen zoom controls when using - * the built-in zoom mechanisms. The default is true. - * @return True if the WebView displays on-screen zoom controls when using + * Gets whether the WebView displays on-screen zoom controls when using * the built-in zoom mechanisms. + * + * @return true if the WebView displays on-screen zoom controls when using + * the built-in zoom mechanisms + * @see #setDisplayZoomControls */ public boolean getDisplayZoomControls() { throw new MustOverrideException(); } /** - * Enable or disable file access within WebView. File access is enabled by + * Enables or disables file access within WebView. File access is enabled by * default. Note that this enables or disables file system access only. * Assets and resources are still accessible using file:///android_asset and * file:///android_res. @@ -239,44 +258,48 @@ public abstract class WebSettings { } /** - * Returns true if this WebView supports file access. + * Gets whether this WebView supports file access. + * + * @see #setAllowFileAccess */ public boolean getAllowFileAccess() { throw new MustOverrideException(); } /** - * Enable or disable content url access within WebView. Content url access - * allows WebView to load content from a content provider installed in the - * system. The default is enabled. + * Enables or disables content URL access within WebView. Content URL + * access allows WebView to load content from a content provider installed + * in the system. The default is enabled. */ public void setAllowContentAccess(boolean allow) { throw new MustOverrideException(); } /** - * Returns true if this WebView supports content url access. + * Gets whether this WebView supports content URL access. + * + * @see #setAllowContentAccess */ public boolean getAllowContentAccess() { throw new MustOverrideException(); } /** - * Set whether the WebView loads a page with overview mode. + * Sets whether the WebView loads a page with overview mode. */ public void setLoadWithOverviewMode(boolean overview) { throw new MustOverrideException(); } /** - * Returns true if this WebView loads page with overview mode + * Gets whether this WebView loads pages with overview mode. */ public boolean getLoadWithOverviewMode() { throw new MustOverrideException(); } /** - * Set whether the WebView will enable smooth transition while panning or + * Sets whether the WebView will enable smooth transition while panning or * zooming or while the window hosting the WebView does not have focus. * If it is true, WebView will choose a solution to maximize the performance. * e.g. the WebView's content may not be updated during the transition. @@ -285,18 +308,22 @@ public abstract class WebSettings { public void setEnableSmoothTransition(boolean enable) { throw new MustOverrideException(); } + /** - * Returns true if the WebView enables smooth transition while panning or + * Gets whether the WebView enables smooth transition while panning or * zooming. + * + * @see #setEnableSmoothTransition */ public boolean enableSmoothTransition() { throw new MustOverrideException(); } /** - * Set whether the WebView uses its background for over scroll background. + * Sets whether the WebView uses its background for over scroll background. * If true, it will use the WebView's background. If false, it will use an * internal pattern. Default is true. + * * @deprecated This method is now obsolete. */ @Deprecated @@ -305,8 +332,10 @@ public abstract class WebSettings { } /** - * Returns true if this WebView uses WebView's background instead of + * Gets whether this WebView uses WebView's background instead of * internal pattern for over scroll background. + * + * @see #setUseWebViewBackgroundForOverscrollBackground * @deprecated This method is now obsolete. */ @Deprecated @@ -315,77 +344,82 @@ public abstract class WebSettings { } /** - * Store whether the WebView is saving form data. + * Sets whether the WebView is saving form data. */ public void setSaveFormData(boolean save) { throw new MustOverrideException(); } /** - * Return whether the WebView is saving form data and displaying prior - * entries/autofill++. Always false in private browsing mode. + * Gets whether the WebView is saving form data and displaying prior + * entries/autofill++. Always false in private browsing mode. */ public boolean getSaveFormData() { throw new MustOverrideException(); } /** - * Store whether the WebView is saving password. + * Stores whether the WebView is saving password. */ public void setSavePassword(boolean save) { throw new MustOverrideException(); } /** - * Return whether the WebView is saving password. + * Gets whether the WebView is saving password. */ public boolean getSavePassword() { throw new MustOverrideException(); } /** - * Set the text zoom of the page in percent. Default is 100. - * @param textZoom A percent value for increasing or decreasing the text. + * Sets the text zoom of the page in percent. Default is 100. + * + * @param textZoom the percent value for increasing or decreasing the text */ public synchronized void setTextZoom(int textZoom) { throw new MustOverrideException(); } /** - * Get the text zoom of the page in percent. - * @return A percent value describing the text zoom. - * @see setTextSizeZoom + * Gets the text zoom of the page in percent. + * + * @return a percent value describing the text zoom + * @see #setTextSizeZoom */ public synchronized int getTextZoom() { throw new MustOverrideException(); } /** - * Set the text size of the page. - * @param t A TextSize value for increasing or decreasing the text. + * Sets the text size of the page. + * + * @param t the TextSize value for increasing or decreasing the text * @see WebSettings.TextSize - * @deprecated Use {@link #setTextZoom(int)} instead + * @deprecated Use {@link #setTextZoom(int)} instead. */ public synchronized void setTextSize(TextSize t) { throw new MustOverrideException(); } /** - * Get the text size of the page. If the text size was previously specified + * Gets the text size of the page. If the text size was previously specified * in percent using {@link #setTextZoom(int)}, this will return * the closest matching {@link TextSize}. - * @return A TextSize enum value describing the text size. + * + * @return a TextSize enum value describing the text size * @see WebSettings.TextSize - * @deprecated Use {@link #getTextZoom()} instead + * @deprecated Use {@link #getTextZoom()} instead. */ public synchronized TextSize getTextSize() { throw new MustOverrideException(); } /** - * Set the default zoom density of the page. This should be called from UI + * Sets the default zoom density of the page. This should be called from UI * thread. - * @param zoom A ZoomDensity value + * + * @param zoom a ZoomDensity value * @see WebSettings.ZoomDensity */ public void setDefaultZoom(ZoomDensity zoom) { @@ -393,9 +427,9 @@ public abstract class WebSettings { } /** - * Get the default zoom density of the page. This should be called from UI + * Gets the default zoom density of the page. This should be called from UI * thread. - * @return A ZoomDensity value + * @return a ZoomDensity value * @see WebSettings.ZoomDensity */ public ZoomDensity getDefaultZoom() { @@ -410,15 +444,17 @@ public abstract class WebSettings { } /** - * Returns true if light touches are enabled. + * Gets whether light touches are enabled. */ public boolean getLightTouchEnabled() { throw new MustOverrideException(); } /** - * @deprecated This setting controlled a rendering optimization - * that is no longer present. Setting it now has no effect. + * Controlled a rendering optimization that is no longer present. Setting + * it now has no effect. + * + * @deprecated This setting now has no effect. */ @Deprecated public synchronized void setUseDoubleTree(boolean use) { @@ -426,8 +462,10 @@ public abstract class WebSettings { } /** - * @deprecated This setting controlled a rendering optimization - * that is no longer present. Setting it now has no effect. + * Controlled a rendering optimization that is no longer present. Setting + * it now has no effect. + * + * @deprecated This setting now has no effect. */ @Deprecated public synchronized boolean getUseDoubleTree() { @@ -436,10 +474,10 @@ public abstract class WebSettings { } /** - * Tell the WebView about user-agent string. - * @param ua 0 if the WebView should use an Android user-agent string, - * 1 if the WebView should use a desktop user-agent string. + * Tells the WebView about user-agent string. * + * @param ua 0 if the WebView should use an Android user-agent string, + * 1 if the WebView should use a desktop user-agent string * @deprecated Please use setUserAgentString instead. */ @Deprecated @@ -448,11 +486,11 @@ public abstract class WebSettings { } /** - * Return user-agent as int - * @return int 0 if the WebView is using an Android user-agent string. - * 1 if the WebView is using a desktop user-agent string. - * -1 if the WebView is using user defined user-agent string. + * Gets the user-agent as an int. * + * @return 0 if the WebView is using an Android user-agent string, + * 1 if the WebView is using a desktop user-agent string, + * -1 if the WebView is using user defined user-agent string * @deprecated Please use getUserAgentString instead. */ @Deprecated @@ -461,30 +499,34 @@ public abstract class WebSettings { } /** - * Tell the WebView to use the wide viewport + * Tells the WebView to use the wide viewport. */ public synchronized void setUseWideViewPort(boolean use) { throw new MustOverrideException(); } /** - * @return True if the WebView is using a wide viewport + * Gets whether the WebView is using a wide viewport. + * + * @return true if the WebView is using a wide viewport */ public synchronized boolean getUseWideViewPort() { throw new MustOverrideException(); } /** - * Tell the WebView whether it supports multiple windows. TRUE means - * that {@link WebChromeClient#onCreateWindow(WebView, boolean, - * boolean, Message)} is implemented by the host application. + * Tells the WebView whether it supports multiple windows. TRUE means + * that {@link WebChromeClient#onCreateWindow(WebView, boolean, + * boolean, Message)} is implemented by the host application. */ public synchronized void setSupportMultipleWindows(boolean support) { throw new MustOverrideException(); } /** - * @return True if the WebView is supporting multiple windows. This means + * Gets whether the WebView is supporting multiple windows. + * + * @return true if the WebView is supporting multiple windows. This means * that {@link WebChromeClient#onCreateWindow(WebView, boolean, * boolean, Message)} is implemented by the host application. */ @@ -493,9 +535,10 @@ public abstract class WebSettings { } /** - * Set the underlying layout algorithm. This will cause a relayout of the - * WebView. - * @param l A LayoutAlgorithm enum specifying the algorithm to use. + * Sets the underlying layout algorithm. This will cause a relayout of the + * WebView. The default is NARROW_COLUMNS. + * + * @param l a LayoutAlgorithm enum specifying the algorithm to use * @see WebSettings.LayoutAlgorithm */ public synchronized void setLayoutAlgorithm(LayoutAlgorithm l) { @@ -503,9 +546,11 @@ public abstract class WebSettings { } /** - * Return the current layout algorithm. The default is NARROW_COLUMNS. - * @return LayoutAlgorithm enum value describing the layout algorithm - * being used. + * Gets the current layout algorithm. + * + * @return a LayoutAlgorithm enum value describing the layout algorithm + * being used + * @see #setLayoutAlgorithm * @see WebSettings.LayoutAlgorithm */ public synchronized LayoutAlgorithm getLayoutAlgorithm() { @@ -513,164 +558,193 @@ public abstract class WebSettings { } /** - * Set the standard font family name. - * @param font A font family name. + * Sets the standard font family name. The default is "sans-serif". + * + * @param font a font family name */ public synchronized void setStandardFontFamily(String font) { throw new MustOverrideException(); } /** - * Get the standard font family name. The default is "sans-serif". - * @return The standard font family name as a string. + * Gets the standard font family name. + * + * @return the standard font family name as a string + * @see #setStandardFontFamily */ public synchronized String getStandardFontFamily() { throw new MustOverrideException(); } /** - * Set the fixed font family name. - * @param font A font family name. + * Sets the fixed font family name. The default is "monospace". + * + * @param font a font family name */ public synchronized void setFixedFontFamily(String font) { throw new MustOverrideException(); } /** - * Get the fixed font family name. The default is "monospace". - * @return The fixed font family name as a string. + * Gets the fixed font family name. + * + * @return the fixed font family name as a string + * @see #setFixedFontFamily */ public synchronized String getFixedFontFamily() { throw new MustOverrideException(); } /** - * Set the sans-serif font family name. - * @param font A font family name. + * Sets the sans-serif font family name. + * + * @param font a font family name */ public synchronized void setSansSerifFontFamily(String font) { throw new MustOverrideException(); } /** - * Get the sans-serif font family name. - * @return The sans-serif font family name as a string. + * Gets the sans-serif font family name. + * + * @return the sans-serif font family name as a string */ public synchronized String getSansSerifFontFamily() { throw new MustOverrideException(); } /** - * Set the serif font family name. The default is "sans-serif". - * @param font A font family name. + * Sets the serif font family name. The default is "sans-serif". + * + * @param font a font family name */ public synchronized void setSerifFontFamily(String font) { throw new MustOverrideException(); } /** - * Get the serif font family name. The default is "serif". - * @return The serif font family name as a string. + * Gets the serif font family name. The default is "serif". + * + * @return the serif font family name as a string + * @see #setSerifFontFamily */ public synchronized String getSerifFontFamily() { throw new MustOverrideException(); } /** - * Set the cursive font family name. - * @param font A font family name. + * Sets the cursive font family name. The default is "cursive". + * + * @param font a font family name */ public synchronized void setCursiveFontFamily(String font) { throw new MustOverrideException(); } /** - * Get the cursive font family name. The default is "cursive". - * @return The cursive font family name as a string. + * Gets the cursive font family name. + * + * @return the cursive font family name as a string + * @see #setCursiveFontFamily */ public synchronized String getCursiveFontFamily() { throw new MustOverrideException(); } /** - * Set the fantasy font family name. - * @param font A font family name. + * Sets the fantasy font family name. The default is "fantasy". + * + * @param font a font family name */ public synchronized void setFantasyFontFamily(String font) { throw new MustOverrideException(); } /** - * Get the fantasy font family name. The default is "fantasy". - * @return The fantasy font family name as a string. + * Gets the fantasy font family name. + * + * @return the fantasy font family name as a string + * @see #setFantasyFontFamily */ public synchronized String getFantasyFontFamily() { throw new MustOverrideException(); } /** - * Set the minimum font size. - * @param size A non-negative integer between 1 and 72. - * Any number outside the specified range will be pinned. + * Sets the minimum font size. The default is 8. + * + * @param size a non-negative integer between 1 and 72. Any number outside + * the specified range will be pinned. */ public synchronized void setMinimumFontSize(int size) { throw new MustOverrideException(); } /** - * Get the minimum font size. The default is 8. - * @return A non-negative integer between 1 and 72. + * Gets the minimum font size. + * + * @return a non-negative integer between 1 and 72 + * @see #setMinimumFontSize */ public synchronized int getMinimumFontSize() { throw new MustOverrideException(); } /** - * Set the minimum logical font size. - * @param size A non-negative integer between 1 and 72. - * Any number outside the specified range will be pinned. + * Sets the minimum logical font size. The default is 8. + * + * @param size a non-negative integer between 1 and 72. Any number outside + * the specified range will be pinned. */ public synchronized void setMinimumLogicalFontSize(int size) { throw new MustOverrideException(); } /** - * Get the minimum logical font size. The default is 8. - * @return A non-negative integer between 1 and 72. + * Gets the minimum logical font size. + * + * @return a non-negative integer between 1 and 72 + * @see #setMinimumLogicalFontSize */ public synchronized int getMinimumLogicalFontSize() { throw new MustOverrideException(); } /** - * Set the default font size. - * @param size A non-negative integer between 1 and 72. - * Any number outside the specified range will be pinned. + * Sets the default font size. The default is 16. + * + * @param size a non-negative integer between 1 and 72. Any number outside + * the specified range will be pinned. */ public synchronized void setDefaultFontSize(int size) { throw new MustOverrideException(); } /** - * Get the default font size. The default is 16. - * @return A non-negative integer between 1 and 72. + * Gets the default font size. + * + * @return a non-negative integer between 1 and 72 + * @see #setDefaultFontSize */ public synchronized int getDefaultFontSize() { throw new MustOverrideException(); } /** - * Set the default fixed font size. - * @param size A non-negative integer between 1 and 72. - * Any number outside the specified range will be pinned. + * Sets the default fixed font size. The default is 16. + * + * @param size a non-negative integer between 1 and 72. Any number outside + * the specified range will be pinned. */ public synchronized void setDefaultFixedFontSize(int size) { throw new MustOverrideException(); } /** - * Get the default fixed font size. The default is 16. - * @return A non-negative integer between 1 and 72. + * Gets the default fixed font size. + * + * @return a non-negative integer between 1 and 72 + * @see #setDefaultFixedFontSize */ public synchronized int getDefaultFixedFontSize() { throw new MustOverrideException(); @@ -683,16 +757,20 @@ public abstract class WebSettings { * of images specified using network URI schemes. Note that if the value of this * setting is changed from false to true, all images resources referenced * by content currently displayed by the WebView are loaded automatically. - * @param flag Whether the WebView should load image resources. + * The default is true. + * + * @param flag whether the WebView should load image resources */ public synchronized void setLoadsImagesAutomatically(boolean flag) { throw new MustOverrideException(); } /** - * Returns true if the WebView loads image resources. This includes - * images embedded using the data URI scheme. The default is true. - * @return True if the WebView loads image resources. + * Gets whether the WebView loads image resources. This includes + * images embedded using the data URI scheme. + * + * @return true if the WebView loads image resources + * @see #setLoadsImagesAutomatically */ public synchronized boolean getLoadsImagesAutomatically() { throw new MustOverrideException(); @@ -707,9 +785,10 @@ public abstract class WebSettings { * will also prevent network images from loading, even if this flag is set * to false. When the value of this setting is changed from true to false, * network images resources referenced by content currently displayed by - * the WebView are fetched automatically. - * @param flag Whether the WebView should not load image resources from - * the network. + * the WebView are fetched automatically. The default is false. + * + * @param flag whether the WebView should not load image resources from the + * network * @see #setBlockNetworkLoads */ public synchronized void setBlockNetworkImage(boolean flag) { @@ -717,9 +796,10 @@ public abstract class WebSettings { } /** - * Returns true if the WebView does not load image resources from the network. - * The default is false. - * @return True if the WebView does not load image resources from the network. + * Gets whether the WebView does not load image resources from the network. + * + * @return true if the WebView does not load image resources from the network + * @see #setBlockNetworkImage */ public synchronized boolean getBlockNetworkImage() { throw new MustOverrideException(); @@ -735,9 +815,12 @@ public abstract class WebSettings { * If the application does not have the * {@link android.Manifest.permission#INTERNET} permission, attempts to set * a value of false will cause a {@link java.lang.SecurityException} - * to be thrown. - * @param flag Whether the WebView should not load any resources - * from the network. + * to be thrown. The default value is false if the application has the + * {@link android.Manifest.permission#INTERNET} permission, otherwise it is + * true. + * + * @param flag whether the WebView should not load any resources from the + * network * @see android.webkit.WebView#reload */ public synchronized void setBlockNetworkLoads(boolean flag) { @@ -745,50 +828,52 @@ public abstract class WebSettings { } /** - * Returns true if the WebView does not load any resources from the network. - * The default value is false if the application has the - * {@link android.Manifest.permission#INTERNET} permission, otherwise it is - * true. - * @return True if the WebView does not load any resources from the network. + * Gets whether the WebView does not load any resources from the network. + * + * @return true if the WebView does not load any resources from the network + * @see #setBlockNetworkLoads */ public synchronized boolean getBlockNetworkLoads() { throw new MustOverrideException(); } /** - * Tell the WebView to enable javascript execution. - * @param flag True if the WebView should execute javascript. + * Tells the WebView to enable JavaScript execution. + * <b>The default is false.</b> + * + * @param flag true if the WebView should execute JavaScript */ public synchronized void setJavaScriptEnabled(boolean flag) { throw new MustOverrideException(); } /** - * Configure scripting (such as XmlHttpRequest) access from file scheme URLs + * Configures scripting (such as XmlHttpRequest) access from file scheme URLs * to any origin. Note, calling this method with a true argument value also * implies calling setAllowFileAccessFromFileURLs with a true. The default * value is false for API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN} * and higher and true otherwise. * - . * @param flag True if the WebView should allow scripting access from file - * scheme URLs to any origin + * @param flag true if the WebView should allow scripting access from file + * scheme URLs to any origin */ public abstract void setAllowUniversalAccessFromFileURLs(boolean flag); /** - * Configure scripting (such as XmlHttpRequest) access from file scheme URLs + * Configures scripting (such as XmlHttpRequest) access from file scheme URLs * to file origin. The default value is false for API level * {@link android.os.Build.VERSION_CODES#JELLY_BEAN} and higher and true * otherwise. * - * @param flag True if the WebView should allow scripting access from file - * scheme URLs to file origin + * @param flag true if the WebView should allow scripting access from file + * scheme URLs to file origin */ public abstract void setAllowFileAccessFromFileURLs(boolean flag); /** - * Tell the WebView to enable plugins. - * @param flag True if the WebView should load plugins. + * Tells the WebView to enable plugins. + * + * @param flag true if the WebView should load plugins * @deprecated This method has been deprecated in favor of * {@link #setPluginState} */ @@ -798,22 +883,24 @@ public abstract class WebSettings { } /** - * Tell the WebView to enable, disable, or have plugins on demand. On + * Tells the WebView to enable, disable, or have plugins on demand. On * demand mode means that if a plugin exists that can handle the embedded * content, a placeholder icon will be shown instead of the plugin. When * the placeholder is clicked, the plugin will be enabled. - * @param state One of the PluginState values. + * + * @param state a PluginState value */ public synchronized void setPluginState(PluginState state) { throw new MustOverrideException(); } /** - * Set a custom path to plugins used by the WebView. This method is + * Sets a custom path to plugins used by the WebView. This method is * obsolete since each plugin is now loaded from its own package. - * @param pluginsPath String path to the directory containing plugins. + * + * @param pluginsPath a String path to the directory containing plugins * @deprecated This method is no longer used as plugins are loaded from - * their own APK via the system's package manager. + * their own APK via the system's package manager. */ @Deprecated public synchronized void setPluginsPath(String pluginsPath) { @@ -821,91 +908,101 @@ public abstract class WebSettings { } /** - * Set the path to where database storage API databases should be saved. - * Nota that the WebCore Database Tracker only allows the path to be set once. - * This will update WebCore when the Sync runs in the C++ side. - * @param databasePath String path to the directory where databases should - * be saved. May be the empty string but should never be null. + * Sets the path to where database storage API databases should be saved. + * Note that the WebCore Database Tracker only allows the path to be set once. + * + * @param databasePath a String path to the directory where databases should + * be saved. May be the empty string but should never + * be null. */ + // This will update WebCore when the Sync runs in the C++ side. public synchronized void setDatabasePath(String databasePath) { throw new MustOverrideException(); } /** - * Set the path where the Geolocation permissions database should be saved. - * This will update WebCore when the Sync runs in the C++ side. - * @param databasePath String path to the directory where the Geolocation - * permissions database should be saved. May be the empty string but - * should never be null. + * Sets the path where the Geolocation permissions database should be saved. + * + * @param databasePath a String path to the directory where the Geolocation + * permissions database should be saved. May be the + * empty string but should never be null. */ + // This will update WebCore when the Sync runs in the C++ side. public synchronized void setGeolocationDatabasePath(String databasePath) { throw new MustOverrideException(); } /** - * Tell the WebView to enable Application Caches API. - * @param flag True if the WebView should enable Application Caches. + * Tells the WebView to enable Application Caches API. + * + * @param flag true if the WebView should enable Application Caches */ public synchronized void setAppCacheEnabled(boolean flag) { throw new MustOverrideException(); } /** - * Set a custom path to the Application Caches files. The client + * Sets a custom path to the Application Caches files. The client * must ensure it exists before this call. - * @param appCachePath String path to the directory containing Application - * Caches files. The appCache path can be the empty string but should not - * be null. Passing null for this parameter will result in a no-op. + * + * @param appCachePath a String path to the directory containing + * Application Caches files. The appCache path can be + * the empty string but should not be null. Passing + * null for this parameter will result in a no-op. */ public synchronized void setAppCachePath(String appCachePath) { throw new MustOverrideException(); } /** - * Set the maximum size for the Application Caches content. - * @param appCacheMaxSize the maximum size in bytes. + * Sets the maximum size for the Application Caches content. + * + * @param appCacheMaxSize the maximum size in bytes */ public synchronized void setAppCacheMaxSize(long appCacheMaxSize) { throw new MustOverrideException(); } /** - * Set whether the database storage API is enabled. - * @param flag boolean True if the WebView should use the database storage - * API. + * Sets whether the database storage API is enabled. + * + * @param flag true if the WebView should use the database storage API */ public synchronized void setDatabaseEnabled(boolean flag) { throw new MustOverrideException(); } /** - * Set whether the DOM storage API is enabled. - * @param flag boolean True if the WebView should use the DOM storage - * API. + * Sets whether the DOM storage API is enabled. + * + * @param flag true if the WebView should use the DOM storage API */ public synchronized void setDomStorageEnabled(boolean flag) { throw new MustOverrideException(); } /** - * Returns true if the DOM Storage API's are enabled. - * @return True if the DOM Storage API's are enabled. + * Gets whether the DOM Storage APIs are enabled. + * + * @return true if the DOM Storage APIs are enabled */ public synchronized boolean getDomStorageEnabled() { throw new MustOverrideException(); } /** - * Return the path to where database storage API databases are saved for + * Gets the path to where database storage API databases are saved for * the current WebView. - * @return the String path to the database storage API databases. + * + * @return the String path to the database storage API databases */ public synchronized String getDatabasePath() { throw new MustOverrideException(); } /** - * Returns true if database storage API is enabled. - * @return True if the database storage API is enabled. + * Gets whether the database storage API is enabled. + * + * @return true if the database storage API is enabled */ public synchronized boolean getDatabaseEnabled() { throw new MustOverrideException(); @@ -913,43 +1010,47 @@ public abstract class WebSettings { /** * Sets whether Geolocation is enabled. - * @param flag Whether Geolocation should be enabled. + * + * @param flag whether Geolocation should be enabled */ public synchronized void setGeolocationEnabled(boolean flag) { throw new MustOverrideException(); } /** - * Return true if javascript is enabled. <b>Note: The default is false.</b> - * @return True if javascript is enabled. + * Gets whether JavaScript is enabled. + * + * @return true if JavaScript is enabled + * @see #setJavaScriptEnabled */ public synchronized boolean getJavaScriptEnabled() { throw new MustOverrideException(); } /** - * Return true if scripting access {see @setAllowUniversalAccessFromFileURLs} from - * file URLs to any origin is enabled. The default value is false for API level - * {@link android.os.Build.VERSION_CODES#JELLY_BEAN} and higher and true otherwise. + * Gets whether scripting access {see @setAllowUniversalAccessFromFileURLs} from + * file URLs to any origin is enabled. * - * @return True if the WebView allows scripting access from file scheme requests - * to any origin + * @return true if the WebView allows scripting access from file scheme requests + * to any origin + * @see #setAllowUniversalAccessFromFileURLs */ public abstract boolean getAllowUniversalAccessFromFileURLs(); /** - * Return true if scripting access {see @setAllowFileAccessFromFileURLs} from file - * URLs to file origin is enabled. The default value is false for API level - * {@link android.os.Build.VERSION_CODES#JELLY_BEAN} and higher, and true otherwise. + * Gets whether scripting access {see @setAllowFileAccessFromFileURLs} from file + * URLs to file origin is enabled. * - * @return True if the WebView allows scripting access from file scheme requests - * to file origin + * @return true if the WebView allows scripting access from file scheme requests + * to file origin + * @see #setAllowFileAccessFromFileURLs */ public abstract boolean getAllowFileAccessFromFileURLs(); /** - * Return true if plugins are enabled. - * @return True if plugins are enabled. + * Gets whether plugins are enabled. + * + * @return true if plugins are enabled * @deprecated This method has been replaced by {@link #getPluginState} */ @Deprecated @@ -958,17 +1059,19 @@ public abstract class WebSettings { } /** - * Return the current plugin state. - * @return A value corresponding to the enum PluginState. + * Gets the current plugin state. + * + * @return a value corresponding to the enum PluginState */ public synchronized PluginState getPluginState() { throw new MustOverrideException(); } /** - * Returns the directory that contains the plugin libraries. This method is + * Gets the directory that contains the plugin libraries. This method is * obsolete since each plugin is now loaded from its own package. - * @return An empty string. + * + * @return an empty string * @deprecated This method is no longer used as plugins are loaded from * their own APK via the system's package manager. */ @@ -979,41 +1082,47 @@ public abstract class WebSettings { } /** - * Tell javascript to open windows automatically. This applies to the - * javascript function window.open(). - * @param flag True if javascript can open windows automatically. + * Tells JavaScript to open windows automatically. This applies to the + * JavaScript function window.open(). The default is false. + * + * @param flag true if JavaScript can open windows automatically */ public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean flag) { throw new MustOverrideException(); } /** - * Return true if javascript can open windows automatically. The default - * is false. - * @return True if javascript can open windows automatically during - * window.open(). + * Gets whether JavaScript can open windows automatically. + * + * @return true if JavaScript can open windows automatically during + * window.open() + * @see #setJavaScriptCanOpenWindowsAutomatically */ public synchronized boolean getJavaScriptCanOpenWindowsAutomatically() { throw new MustOverrideException(); } /** - * Set the default text encoding name to use when decoding html pages. - * @param encoding The text encoding name. + * Sets the default text encoding name to use when decoding html pages. + * The default is "Latin-1". + * + * @param encoding the text encoding name */ public synchronized void setDefaultTextEncodingName(String encoding) { throw new MustOverrideException(); } /** - * Get the default text encoding name. The default is "Latin-1". - * @return The default text encoding name as a string. + * Gets the default text encoding name. + * + * @return the default text encoding name as a string + * @see #setDefaultTextEncodingName */ public synchronized String getDefaultTextEncodingName() { throw new MustOverrideException(); } /** - * Set the WebView's user-agent string. If the string "ua" is null or empty, + * Sets the WebView's user-agent string. If the string "ua" is null or empty, * it will use the system default user-agent string. */ public synchronized void setUserAgentString(String ua) { @@ -1021,46 +1130,47 @@ public abstract class WebSettings { } /** - * Return the WebView's user-agent string. + * Gets the WebView's user-agent string. */ public synchronized String getUserAgentString() { throw new MustOverrideException(); } /** - * Tell the WebView whether it needs to set a node to have focus when + * Tells the WebView whether it needs to set a node to have focus when * {@link WebView#requestFocus(int, android.graphics.Rect)} is called. * - * @param flag + * @param flag whether the WebView needs to set a node */ public void setNeedInitialFocus(boolean flag) { throw new MustOverrideException(); } /** - * Set the priority of the Render thread. Unlike the other settings, this + * Sets the priority of the Render thread. Unlike the other settings, this * one only needs to be called once per process. The default is NORMAL. * - * @param priority RenderPriority, can be normal, high or low. + * @param priority a RenderPriority */ public synchronized void setRenderPriority(RenderPriority priority) { throw new MustOverrideException(); } /** - * Override the way the cache is used. The way the cache is used is based + * Overrides the way the cache is used. The way the cache is used is based * on the navigation option. For a normal page load, the cache is checked * and content is re-validated as needed. When navigating back, content is * not revalidated, instead the content is just pulled from the cache. * This function allows the client to override this behavior. - * @param mode One of the LOAD_ values. + * + * @param mode one of the LOAD_ values */ public void setCacheMode(int mode) { throw new MustOverrideException(); } /** - * Return the current setting for overriding the cache mode. For a full + * Gets the current setting for overriding the cache mode. For a full * description, see the {@link #setCacheMode(int)} function. */ public int getCacheMode() { diff --git a/core/java/android/webkit/WebStorage.java b/core/java/android/webkit/WebStorage.java index c46d161..76674f4 100644 --- a/core/java/android/webkit/WebStorage.java +++ b/core/java/android/webkit/WebStorage.java @@ -44,8 +44,9 @@ public class WebStorage { // otherwise the WebCore thread will remain asleep. public interface QuotaUpdater { /** - * Provide a new quota, specified in bytes. - * @param newQuota The new quota, in bytes + * Provides a new quota, specified in bytes. + * + * @param newQuota the new quota, in bytes */ public void updateQuota(long newQuota); }; @@ -79,8 +80,9 @@ public class WebStorage { } /** - * Get the string representation of this origin. - * @return The string representation of this origin + * Gets the string representation of this origin. + * + * @return the string representation of this origin */ // An origin string is created using WebCore::SecurityOrigin::toString(). // Note that WebCore::SecurityOrigin uses 0 (which is not printed) for @@ -92,19 +94,21 @@ public class WebStorage { } /** - * Get the quota for this origin, for the Web SQL Database API, in + * Gets the quota for this origin, for the Web SQL Database API, in * bytes. If this origin does not use the Web SQL Database API, this * quota will be set to zero. - * @return The quota, in bytes. + * + * @return the quota, in bytes */ public long getQuota() { return mQuota; } /** - * Get the total amount of storage currently being used by this origin, + * Gets the total amount of storage currently being used by this origin, * for all JavaScript storage APIs, in bytes. - * @return The total amount of storage, in bytes. + * + * @return the total amount of storage, in bytes */ public long getUsage() { return mUsage; @@ -124,7 +128,7 @@ public class WebStorage { */ /** - * Get the origins currently using either the Application Cache or Web SQL + * Gets the origins currently using either the Application Cache or Web SQL * Database APIs. This method operates asynchronously, with the result * being provided via a {@link ValueCallback}. The origins are provided as * a map, of type {@code Map<String, WebStorage.Origin>}, from the string @@ -135,7 +139,7 @@ public class WebStorage { } /** - * Get the amount of storage currently being used by both the Application + * Gets the amount of storage currently being used by both the Application * Cache and Web SQL Database APIs by the given origin. The amount is given * in bytes and the origin is specified using its string representation. * This method operates asynchronously, with the result being provided via @@ -146,7 +150,7 @@ public class WebStorage { } /** - * Get the storage quota for the Web SQL Database API for the given origin. + * Gets the storage quota for the Web SQL Database API for the given origin. * The quota is given in bytes and the origin is specified using its string * representation. This method operates asynchronously, with the result * being provided via a {@link ValueCallback}. Note that a quota is not @@ -157,7 +161,7 @@ public class WebStorage { } /** - * Set the storage quota for the Web SQL Database API for the given origin. + * Sets the storage quota for the Web SQL Database API for the given origin. * The quota is specified in bytes and the origin is specified using its string * representation. Note that a quota is not enforced on a per-origin basis * for the Application Cache API. @@ -167,7 +171,7 @@ public class WebStorage { } /** - * Clear the storage currently being used by both the Application Cache and + * Clears the storage currently being used by both the Application Cache and * Web SQL Database APIs by the given origin. The origin is specified using * its string representation. */ @@ -176,7 +180,7 @@ public class WebStorage { } /** - * Clear all storage currently being used by the JavaScript storage APIs. + * Clears all storage currently being used by the JavaScript storage APIs. * This includes the Application Cache, Web SQL Database and the HTML5 Web * Storage APIs. */ @@ -185,8 +189,9 @@ public class WebStorage { } /** - * Get the singleton instance of this class. - * @return The singleton {@link WebStorage} instance. + * Gets the singleton instance of this class. + * + * @return the singleton {@link WebStorage} instance */ public static WebStorage getInstance() { return WebViewFactory.getProvider().getWebStorage(); diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 74605e2..ba5a417 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -274,16 +274,18 @@ public class WebView extends AbsoluteLayout private WebView mWebview; /** - * Set the WebView to the transportation object. - * @param webview The WebView to transport. + * Sets the WebView to the transportation object. + * + * @param webview the WebView to transport */ public synchronized void setWebView(WebView webview) { mWebview = webview; } /** - * Return the WebView object. - * @return WebView The transported WebView object. + * Gets the WebView object. + * + * @return the transported WebView object */ public synchronized WebView getWebView() { return mWebview; @@ -291,15 +293,15 @@ public class WebView extends AbsoluteLayout } /** - * URI scheme for telephone number + * URI scheme for telephone number. */ public static final String SCHEME_TEL = "tel:"; /** - * URI scheme for email address + * URI scheme for email address. */ public static final String SCHEME_MAILTO = "mailto:"; /** - * URI scheme for map address + * URI scheme for map address. */ public static final String SCHEME_GEO = "geo:0,0?q="; @@ -308,13 +310,15 @@ public class WebView extends AbsoluteLayout */ public interface FindListener { /** - * Notify the listener about progress made by a find operation. + * Notifies the listener about progress made by a find operation. * - * @param numberOfMatches How many matches have been found. - * @param activeMatchOrdinal The zero-based ordinal of the currently selected match. - * @param isDoneCounting Whether the find operation has actually completed. The listener - * may be notified multiple times while the operation is underway, and the numberOfMatches - * value should not be considered final unless isDoneCounting is true. + * @param numberOfMatches how many matches have been found + * @param activeMatchOrdinal the zero-based ordinal of the currently selected match + * @param isDoneCounting whether the find operation has actually completed. The listener + * may be notified multiple times while the + * operation is underway, and the numberOfMatches + * value should not be considered final unless + * isDoneCounting is true. */ public void onFindResultReceived(int numberOfMatches, int activeMatchOrdinal, boolean isDoneCounting); @@ -322,19 +326,22 @@ public class WebView extends AbsoluteLayout /** * Interface to listen for new pictures as they change. + * * @deprecated This interface is now obsolete. */ @Deprecated public interface PictureListener { /** - * Notify the listener that the picture has changed. - * @param view The WebView that owns the picture. - * @param picture The new picture. + * Notifies the listener that the picture has changed. + * + * @param view the WebView that owns the picture + * @param picture the new picture * @deprecated Due to internal changes, the picture does not include - * composited layers such as fixed position elements or scrollable divs. - * While the PictureListener API can still be used to detect changes in - * the WebView content, you are advised against its usage until a replacement - * is provided in a future Android release + * composited layers such as fixed position elements or + * scrollable divs. While the PictureListener API can still + * be used to detect changes in the WebView content, you + * are advised against its usage until a replacement is + * provided in a future Android release. */ @Deprecated public void onNewPicture(WebView view, Picture picture); @@ -342,7 +349,7 @@ public class WebView extends AbsoluteLayout public static class HitTestResult { /** - * Default HitTestResult, where the target is unknown + * Default HitTestResult, where the target is unknown. */ public static final int UNKNOWN_TYPE = 0; /** @@ -351,19 +358,19 @@ public class WebView extends AbsoluteLayout @Deprecated public static final int ANCHOR_TYPE = 1; /** - * HitTestResult for hitting a phone number + * HitTestResult for hitting a phone number. */ public static final int PHONE_TYPE = 2; /** - * HitTestResult for hitting a map address + * HitTestResult for hitting a map address. */ public static final int GEO_TYPE = 3; /** - * HitTestResult for hitting an email address + * HitTestResult for hitting an email address. */ public static final int EMAIL_TYPE = 4; /** - * HitTestResult for hitting an HTML::img tag + * HitTestResult for hitting an HTML::img tag. */ public static final int IMAGE_TYPE = 5; /** @@ -372,15 +379,15 @@ public class WebView extends AbsoluteLayout @Deprecated public static final int IMAGE_ANCHOR_TYPE = 6; /** - * HitTestResult for hitting a HTML::a tag with src=http + * HitTestResult for hitting a HTML::a tag with src=http. */ public static final int SRC_ANCHOR_TYPE = 7; /** - * HitTestResult for hitting a HTML::a tag with src=http + HTML::img + * HitTestResult for hitting a HTML::a tag with src=http + HTML::img. */ public static final int SRC_IMAGE_ANCHOR_TYPE = 8; /** - * HitTestResult for hitting an edit text area + * HitTestResult for hitting an edit text area. */ public static final int EDIT_TEXT_TYPE = 9; @@ -409,17 +416,21 @@ public class WebView extends AbsoluteLayout } /** - * Gets the type of the hit test result. - * @return See the XXX_TYPE constants defined in this class. + * Gets the type of the hit test result. See the XXX_TYPE constants + * defined in this class. + * + * @return the type of the hit test result */ public int getType() { return mType; } /** - * Gets additional type-dependant information about the result, see - * {@link WebView#getHitTestResult()} for details. - * @return may either be null or contain extra information about this result. + * Gets additional type-dependant information about the result. See + * {@link WebView#getHitTestResult()} for details. May either be null + * or contain extra information about this result. + * + * @return additional type-dependant information about the result */ public String getExtra() { return mExtra; @@ -427,38 +438,43 @@ public class WebView extends AbsoluteLayout } /** - * Construct a new WebView with a Context object. - * @param context A Context object used to access application assets. + * Constructs a new WebView with a Context object. + * + * @param context a Context object used to access application assets */ public WebView(Context context) { this(context, null); } /** - * Construct a new WebView with layout parameters. - * @param context A Context object used to access application assets. - * @param attrs An AttributeSet passed to our parent. + * Constructs a new WebView with layout parameters. + * + * @param context a Context object used to access application assets + * @param attrs an AttributeSet passed to our parent */ public WebView(Context context, AttributeSet attrs) { this(context, attrs, com.android.internal.R.attr.webViewStyle); } /** - * Construct a new WebView with layout parameters and a default style. - * @param context A Context object used to access application assets. - * @param attrs An AttributeSet passed to our parent. - * @param defStyle The default style resource ID. + * Constructs a new WebView with layout parameters and a default style. + * + * @param context a Context object used to access application assets + * @param attrs an AttributeSet passed to our parent + * @param defStyle the default style resource ID */ public WebView(Context context, AttributeSet attrs, int defStyle) { this(context, attrs, defStyle, false); } /** - * Construct a new WebView with layout parameters and a default style. - * @param context A Context object used to access application assets. - * @param attrs An AttributeSet passed to our parent. - * @param defStyle The default style resource ID. - * @param privateBrowsing If true the web view will be initialized in private mode. + * Constructs a new WebView with layout parameters and a default style. + * + * @param context a Context object used to access application assets + * @param attrs an AttributeSet passed to our parent + * @param defStyle the default style resource ID + * @param privateBrowsing whether this WebView will be initialized in + * private mode */ public WebView(Context context, AttributeSet attrs, int defStyle, boolean privateBrowsing) { @@ -466,18 +482,21 @@ public class WebView extends AbsoluteLayout } /** - * Construct a new WebView with layout parameters, a default style and a set - * of custom Javscript interfaces to be added to the WebView at initialization + * Constructs a new WebView with layout parameters, a default style and a set + * of custom Javscript interfaces to be added to this WebView at initialization * time. This guarantees that these interfaces will be available when the JS * context is initialized. - * @param context A Context object used to access application assets. - * @param attrs An AttributeSet passed to our parent. - * @param defStyle The default style resource ID. - * @param javaScriptInterfaces is a Map of interface names, as keys, and - * object implementing those interfaces, as values. - * @param privateBrowsing If true the web view will be initialized in private mode. + * + * @param context a Context object used to access application assets + * @param attrs an AttributeSet passed to our parent + * @param defStyle the default style resource ID + * @param javaScriptInterfaces a Map of interface names, as keys, and + * object implementing those interfaces, as + * values + * @param privateBrowsing whether this WebView will be initialized in + * private mode * @hide This is used internally by dumprendertree, as it requires the javaScript interfaces to - * be added synchronously, before a subsequent loadUrl call takes effect. + * be added synchronously, before a subsequent loadUrl call takes effect. */ @SuppressWarnings("deprecation") // for super() call into deprecated base class constructor. protected WebView(Context context, AttributeSet attrs, int defStyle, @@ -493,8 +512,9 @@ public class WebView extends AbsoluteLayout } /** - * Specify whether the horizontal scrollbar has overlay style. - * @param overlay TRUE if horizontal scrollbar should have overlay style. + * Specifies whether the horizontal scrollbar has overlay style. + * + * @param overlay true if horizontal scrollbar should have overlay style */ public void setHorizontalScrollbarOverlay(boolean overlay) { checkThread(); @@ -502,8 +522,9 @@ public class WebView extends AbsoluteLayout } /** - * Specify whether the vertical scrollbar has overlay style. - * @param overlay TRUE if vertical scrollbar should have overlay style. + * Specifies whether the vertical scrollbar has overlay style. + * + * @param overlay true if vertical scrollbar should have overlay style */ public void setVerticalScrollbarOverlay(boolean overlay) { checkThread(); @@ -511,8 +532,9 @@ public class WebView extends AbsoluteLayout } /** - * Return whether horizontal scrollbar has overlay style - * @return TRUE if horizontal scrollbar has overlay style. + * Gets whether horizontal scrollbar has overlay style. + * + * @return true if horizontal scrollbar has overlay style */ public boolean overlayHorizontalScrollbar() { checkThread(); @@ -520,8 +542,9 @@ public class WebView extends AbsoluteLayout } /** - * Return whether vertical scrollbar has overlay style - * @return TRUE if vertical scrollbar has overlay style. + * Gets whether vertical scrollbar has overlay style. + * + * @return true if vertical scrollbar has overlay style */ public boolean overlayVerticalScrollbar() { checkThread(); @@ -529,7 +552,7 @@ public class WebView extends AbsoluteLayout } /** - * Return the visible height (in pixels) of the embedded title bar (if any). + * Gets the visible height (in pixels) of the embedded title bar (if any). * * @deprecated This method is now obsolete. */ @@ -539,8 +562,10 @@ public class WebView extends AbsoluteLayout } /** - * @return The SSL certificate for the main top-level page or null if - * there is no certificate (the site is not secure). + * Gets the SSL certificate for the main top-level page or null if there is + * no certificate (the site is not secure). + * + * @return the SSL certificate for the main top-level page */ public SslCertificate getCertificate() { checkThread(); @@ -560,11 +585,12 @@ public class WebView extends AbsoluteLayout //------------------------------------------------------------------------- /** - * Save the username and password for a particular host in the WebView's + * Saves the username and password for a particular host in this WebView's * internal database. - * @param host The host that required the credentials. - * @param username The username for the given host. - * @param password The password for the given host. + * + * @param host the host that required the credentials + * @param username the username for the given host + * @param password the password for the given host */ public void savePassword(String host, String username, String password) { checkThread(); @@ -572,13 +598,13 @@ public class WebView extends AbsoluteLayout } /** - * Set the HTTP authentication credentials for a given host and realm. + * Sets the HTTP authentication credentials for a given host and realm. * - * @param host The host for the credentials. - * @param realm The realm for the credentials. - * @param username The username for the password. If it is null, it means + * @param host the host for the credentials + * @param realm the realm for the credentials + * @param username the username for the password. If it is null, it means * password can't be saved. - * @param password The password + * @param password the password */ public void setHttpAuthUsernamePassword(String host, String realm, String username, String password) { @@ -587,12 +613,12 @@ public class WebView extends AbsoluteLayout } /** - * Retrieve the HTTP authentication username and password for a given - * host & realm pair + * Retrieves the HTTP authentication username and password for a given + * host and realm pair * - * @param host The host for which the credentials apply. - * @param realm The realm for which the credentials apply. - * @return String[] if found, String[0] is username, which can be null and + * @param host the host for which the credentials apply + * @param realm the realm for which the credentials apply + * @return String[] if found. String[0] is username, which can be null and * String[1] is password. Return null if it can't find anything. */ public String[] getHttpAuthUsernamePassword(String host, String realm) { @@ -601,9 +627,9 @@ public class WebView extends AbsoluteLayout } /** - * Destroy the internal state of the WebView. This method should be called - * after the WebView has been removed from the view system. No other - * methods may be called on a WebView after destroy. + * Destroys the internal state of this WebView. This method should be called + * after this WebView has been removed from the view system. No other + * methods may be called on this WebView after destroy. */ public void destroy() { checkThread(); @@ -635,10 +661,11 @@ public class WebView extends AbsoluteLayout } /** - * Inform WebView of the network state. This is used to set + * Informs WebView of the network state. This is used to set * the JavaScript property window.navigator.isOnline and * generates the online/offline event as specified in HTML5, sec. 5.7.7 - * @param networkUp boolean indicating if network is available + * + * @param networkUp a boolean indicating if network is available */ public void setNetworkAvailable(boolean networkUp) { checkThread(); @@ -646,14 +673,15 @@ public class WebView extends AbsoluteLayout } /** - * Save the state of this WebView used in + * Saves the state of this WebView used in * {@link android.app.Activity#onSaveInstanceState}. Please note that this * method no longer stores the display data for this WebView. The previous * behavior could potentially leak files if {@link #restoreState} was never * called. See {@link #savePicture} and {@link #restorePicture} for saving * and restoring the display data. - * @param outState The Bundle to store the WebView state. - * @return The same copy of the back/forward list used to save the state. If + * + * @param outState the Bundle to store this WebView's state + * @return the same copy of the back/forward list used to save the state. If * saveState fails, the returned list will be null. * @see #savePicture * @see #restorePicture @@ -664,12 +692,12 @@ public class WebView extends AbsoluteLayout } /** - * Save the current display data to the Bundle given. Used in conjunction + * Saves the current display data to the Bundle given. Used in conjunction * with {@link #saveState}. - * @param b A Bundle to store the display data. - * @param dest The file to store the serialized picture data. Will be + * @param b a Bundle to store the display data + * @param dest the file to store the serialized picture data. Will be * overwritten with this WebView's picture data. - * @return True if the picture was successfully saved. + * @return true if the picture was successfully saved * @deprecated This method is now obsolete. */ @Deprecated @@ -679,13 +707,13 @@ public class WebView extends AbsoluteLayout } /** - * Restore the display data that was save in {@link #savePicture}. Used in - * conjunction with {@link #restoreState}. + * Restores the display data that was saved in {@link #savePicture}. Used in + * conjunction with {@link #restoreState}. Note that this will not work if + * this WebView is hardware accelerated. * - * Note that this will not work if the WebView is hardware accelerated. - * @param b A Bundle containing the saved display data. - * @param src The file where the picture data was stored. - * @return True if the picture was successfully restored. + * @param b a Bundle containing the saved display data + * @param src the file where the picture data was stored + * @return true if the picture was successfully restored * @deprecated This method is now obsolete. */ @Deprecated @@ -695,16 +723,17 @@ public class WebView extends AbsoluteLayout } /** - * Restore the state of this WebView from the given map used in + * Restores the state of this WebView from the given map used in * {@link android.app.Activity#onRestoreInstanceState}. This method should - * be called to restore the state of the WebView before using the object. If - * it is called after the WebView has had a chance to build state (load + * be called to restore the state of this WebView before using the object. If + * it is called after this WebView has had a chance to build state (load * pages, create a back/forward list, etc.) there may be undesirable * side-effects. Please note that this method no longer restores the * display data for this WebView. See {@link #savePicture} and {@link * #restorePicture} for saving and restoring the display data. - * @param inState The incoming Bundle of state. - * @return The restored back/forward list or null if restoreState failed. + * + * @param inState the incoming Bundle of state + * @return the restored back/forward list or null if restoreState failed * @see #savePicture * @see #restorePicture */ @@ -714,14 +743,15 @@ public class WebView extends AbsoluteLayout } /** - * Load the given URL with the specified additional HTTP headers. - * @param url The URL of the resource to load. - * @param additionalHttpHeaders The additional headers to be used in the + * Loads the given URL with the specified additional HTTP headers. + * + * @param url the URL of the resource to load + * @param additionalHttpHeaders the additional headers to be used in the * HTTP request for this URL, specified as a map from name to * value. Note that if this map contains any of the headers - * that are set by default by the WebView, such as those + * that are set by default by this WebView, such as those * controlling caching, accept types or the User-Agent, their - * values may be overriden by the WebView's defaults. + * values may be overriden by this WebView's defaults. */ public void loadUrl(String url, Map<String, String> additionalHttpHeaders) { checkThread(); @@ -729,8 +759,9 @@ public class WebView extends AbsoluteLayout } /** - * Load the given URL. - * @param url The URL of the resource to load. + * Loads the given URL. + * + * @param url the URL of the resource to load */ public void loadUrl(String url) { checkThread(); @@ -738,12 +769,12 @@ public class WebView extends AbsoluteLayout } /** - * Load the url with postData using "POST" method into the WebView. If url - * is not a network url, it will be loaded with {link + * Loads the URL with postData using "POST" method into this WebView. If url + * is not a network URL, it will be loaded with {link * {@link #loadUrl(String)} instead. * - * @param url The url of the resource to load. - * @param postData The data will be passed to "POST" request. + * @param url the URL of the resource to load + * @param postData the data will be passed to "POST" request */ public void postUrl(String url, byte[] postData) { checkThread(); @@ -751,7 +782,7 @@ public class WebView extends AbsoluteLayout } /** - * Load the given data into the WebView using a 'data' scheme URL. + * Loads the given data into this WebView using a 'data' scheme URL. * <p> * Note that JavaScript's same origin policy means that script running in a * page loaded using this method will be unable to access content loaded @@ -772,9 +803,10 @@ public class WebView extends AbsoluteLayout * mediatype portion of the URL and call {@link #loadUrl(String)} instead. * Note that the charset obtained from the mediatype portion of a data URL * always overrides that specified in the HTML or XML document itself. - * @param data A String of data in the given encoding. - * @param mimeType The MIME type of the data, e.g. 'text/html'. - * @param encoding The encoding of the data. + * + * @param data a String of data in the given encoding + * @param mimeType the MIME type of the data, e.g. 'text/html' + * @param encoding the encoding of the data */ public void loadData(String data, String mimeType, String encoding) { checkThread(); @@ -782,7 +814,7 @@ public class WebView extends AbsoluteLayout } /** - * Load the given data into the WebView, using baseUrl as the base URL for + * Loads the given data into this WebView, using baseUrl as the base URL for * the content. The base URL is used both to resolve relative URLs and when * applying JavaScript's same origin policy. The historyUrl is used for the * history entry. @@ -794,14 +826,15 @@ public class WebView extends AbsoluteLayout * If the base URL uses the data scheme, this method is equivalent to * calling {@link #loadData(String,String,String) loadData()} and the * historyUrl is ignored. - * @param baseUrl URL to use as the page's base URL. If null defaults to - * 'about:blank' - * @param data A String of data in the given encoding. - * @param mimeType The MIMEType of the data, e.g. 'text/html'. If null, - * defaults to 'text/html'. - * @param encoding The encoding of the data. - * @param historyUrl URL to use as the history entry, if null defaults to - * 'about:blank'. + * + * @param baseUrl the URL to use as the page's base URL. If null defaults to + * 'about:blank'. + * @param data a String of data in the given encoding + * @param mimeType the MIMEType of the data, e.g. 'text/html'. If null, + * defaults to 'text/html'. + * @param encoding the encoding of the data + * @param historyUrl the URL to use as the history entry. If null defaults + * to 'about:blank'. */ public void loadDataWithBaseURL(String baseUrl, String data, String mimeType, String encoding, String historyUrl) { @@ -812,7 +845,7 @@ public class WebView extends AbsoluteLayout /** * Saves the current view as a web archive. * - * @param filename The filename where the archive should be placed. + * @param filename the filename where the archive should be placed */ public void saveWebArchive(String filename) { checkThread(); @@ -822,11 +855,11 @@ public class WebView extends AbsoluteLayout /** * Saves the current view as a web archive. * - * @param basename The filename where the archive should be placed. - * @param autoname If false, takes basename to be a file. If true, basename + * @param basename the filename where the archive should be placed + * @param autoname if false, takes basename to be a file. If true, basename * is assumed to be a directory in which a filename will be - * chosen according to the url of the current page. - * @param callback Called after the web archive has been saved. The + * chosen according to the URL of the current page. + * @param callback called after the web archive has been saved. The * parameter for onReceiveValue will either be the filename * under which the file was saved, or null if saving the * file failed. @@ -837,7 +870,7 @@ public class WebView extends AbsoluteLayout } /** - * Stop the current load. + * Stops the current load. */ public void stopLoading() { checkThread(); @@ -845,7 +878,7 @@ public class WebView extends AbsoluteLayout } /** - * Reload the current url. + * Reloads the current URL. */ public void reload() { checkThread(); @@ -853,8 +886,9 @@ public class WebView extends AbsoluteLayout } /** - * Return true if this WebView has a back history item. - * @return True iff this WebView has a back history item. + * Gets whether this WebView has a back history item. + * + * @return true iff this WebView has a back history item */ public boolean canGoBack() { checkThread(); @@ -862,7 +896,7 @@ public class WebView extends AbsoluteLayout } /** - * Go back in the history of this WebView. + * Goes back in the history of this WebView. */ public void goBack() { checkThread(); @@ -870,8 +904,9 @@ public class WebView extends AbsoluteLayout } /** - * Return true if this WebView has a forward history item. - * @return True iff this Webview has a forward history item. + * Gets whether this WebView has a forward history item. + * + * @return true iff this Webview has a forward history item */ public boolean canGoForward() { checkThread(); @@ -879,7 +914,7 @@ public class WebView extends AbsoluteLayout } /** - * Go forward in the history of this WebView. + * Goes forward in the history of this WebView. */ public void goForward() { checkThread(); @@ -887,10 +922,11 @@ public class WebView extends AbsoluteLayout } /** - * Return true if the page can go back or forward the given + * Gets whether the page can go back or forward the given * number of steps. - * @param steps The negative or positive number of steps to move the - * history. + * + * @param steps the negative or positive number of steps to move the + * history */ public boolean canGoBackOrForward(int steps) { checkThread(); @@ -898,11 +934,12 @@ public class WebView extends AbsoluteLayout } /** - * Go to the history item that is the number of steps away from + * Goes to the history item that is the number of steps away from * the current item. Steps is negative if backward and positive * if forward. - * @param steps The number of steps to take back or forward in the back - * forward list. + * + * @param steps the number of steps to take back or forward in the back + * forward list */ public void goBackOrForward(int steps) { checkThread(); @@ -910,7 +947,7 @@ public class WebView extends AbsoluteLayout } /** - * Returns true if private browsing is enabled in this WebView. + * Gets whether private browsing is enabled in this WebView. */ public boolean isPrivateBrowsingEnabled() { checkThread(); @@ -918,7 +955,8 @@ public class WebView extends AbsoluteLayout } /** - * Scroll the contents of the view up by half the view size + * Scrolls the contents of this WebView up by half the view size. + * * @param top true to jump to the top of the page * @return true if the page was scrolled */ @@ -928,7 +966,8 @@ public class WebView extends AbsoluteLayout } /** - * Scroll the contents of the view down by half the page size + * Scrolls the contents of this WebView down by half the page size. + * * @param bottom true to jump to bottom of page * @return true if the page was scrolled */ @@ -938,8 +977,8 @@ public class WebView extends AbsoluteLayout } /** - * Clear the view so that onDraw() will draw nothing but white background, - * and onMeasure() will return 0 if MeasureSpec is not MeasureSpec.EXACTLY + * Clears this WebView so that onDraw() will draw nothing but white background, + * and onMeasure() will return 0 if MeasureSpec is not MeasureSpec.EXACTLY. */ public void clearView() { checkThread(); @@ -947,13 +986,13 @@ public class WebView extends AbsoluteLayout } /** - * Return a new picture that captures the current display of the webview. - * This is a copy of the display, and will be unaffected if the webview + * Gets a new picture that captures the current display of this WebView. + * This is a copy of the display, and will be unaffected if this WebView * later loads a different URL. * - * @return a picture containing the current contents of the view. Note this - * picture is of the entire document, and is not restricted to the - * bounds of the view. + * @return a picture containing the current contents of this WebView. Note + * this picture is of the entire document, and is not restricted to + * the bounds of the view. */ public Picture capturePicture() { checkThread(); @@ -961,8 +1000,9 @@ public class WebView extends AbsoluteLayout } /** - * Return the current scale of the WebView - * @return The current scale. + * Gets the current scale of this WebView. + * + * @return the current scale */ public float getScale() { checkThread(); @@ -970,14 +1010,14 @@ public class WebView extends AbsoluteLayout } /** - * Set the initial scale for the WebView. 0 means default. If + * Sets the initial scale for this WebView. 0 means default. If * {@link WebSettings#getUseWideViewPort()} is true, it zooms out all the * way. Otherwise it starts with 100%. If initial scale is greater than 0, * WebView starts with this value as initial scale. * Please note that unlike the scale properties in the viewport meta tag, * this method doesn't take the screen density into account. * - * @param scaleInPercent The initial scale in percent. + * @param scaleInPercent the initial scale in percent */ public void setInitialScale(int scaleInPercent) { checkThread(); @@ -985,7 +1025,7 @@ public class WebView extends AbsoluteLayout } /** - * Invoke the graphical zoom picker widget for this WebView. This will + * Invokes the graphical zoom picker widget for this WebView. This will * result in the zoom widget appearing on the screen to control the zoom * level of this WebView. */ @@ -995,15 +1035,15 @@ public class WebView extends AbsoluteLayout } /** - * Return a HitTestResult based on the current cursor node. If a HTML::a tag - * is found and the anchor has a non-JavaScript url, the HitTestResult type - * is set to SRC_ANCHOR_TYPE and the url is set in the "extra" field. If the - * anchor does not have a url or if it is a JavaScript url, the type will - * be UNKNOWN_TYPE and the url has to be retrieved through + * Gets a HitTestResult based on the current cursor node. If a HTML::a + * tag is found and the anchor has a non-JavaScript URL, the HitTestResult + * type is set to SRC_ANCHOR_TYPE and the URL is set in the "extra" field. + * If the anchor does not have a URL or if it is a JavaScript URL, the type + * will be UNKNOWN_TYPE and the URL has to be retrieved through * {@link #requestFocusNodeHref} asynchronously. If a HTML::img tag is - * found, the HitTestResult type is set to IMAGE_TYPE and the url is set in + * found, the HitTestResult type is set to IMAGE_TYPE and the URL is set in * the "extra" field. A type of - * SRC_IMAGE_ANCHOR_TYPE indicates an anchor with a url that has an image as + * SRC_IMAGE_ANCHOR_TYPE indicates an anchor with a URL that has an image as * a child node. If a phone number is found, the HitTestResult type is set * to PHONE_TYPE and the phone number is set in the "extra" field of * HitTestResult. If a map address is found, the HitTestResult type is set @@ -1018,18 +1058,17 @@ public class WebView extends AbsoluteLayout } /** - * Request the anchor or image element URL at the last tapped point. + * Requests the anchor or image element URL at the last tapped point. * If hrefMsg is null, this method returns immediately and does not * dispatch hrefMsg to its target. If the tapped point hits an image, * an anchor, or an image in an anchor, the message associates * strings in named keys in its data. The value paired with the key * may be an empty string. * - * @param hrefMsg This message will be dispatched with the result of the - * request. The message data contains three keys: - * - "url" returns the anchor's href attribute. - * - "title" returns the anchor's text. - * - "src" returns the image's src attribute. + * @param hrefMsg the message to be dispatched with the result of the + * request. The message data contains three keys. "url" + * returns the anchor's href attribute. "title" returns the + * anchor's text. "src" returns the image's src attribute. */ public void requestFocusNodeHref(Message hrefMsg) { checkThread(); @@ -1037,10 +1076,10 @@ public class WebView extends AbsoluteLayout } /** - * Request the url of the image last touched by the user. msg will be sent - * to its target with a String representing the url as its object. + * Requests the URL of the image last touched by the user. msg will be sent + * to its target with a String representing the URL as its object. * - * @param msg This message will be dispatched with the result of the request + * @param msg the message to be dispatched with the result of the request * as the data member with "url" as key. The result can be null. */ public void requestImageRef(Message msg) { @@ -1049,10 +1088,11 @@ public class WebView extends AbsoluteLayout } /** - * Get the url for the current page. This is not always the same as the url + * Gets the URL for the current page. This is not always the same as the URL * passed to WebViewClient.onPageStarted because although the load for - * that url has begun, the current page may not have changed. - * @return The url for the current page. + * that URL has begun, the current page may not have changed. + * + * @return the URL for the current page */ public String getUrl() { checkThread(); @@ -1060,12 +1100,13 @@ public class WebView extends AbsoluteLayout } /** - * Get the original url for the current page. This is not always the same - * as the url passed to WebViewClient.onPageStarted because although the - * load for that url has begun, the current page may not have changed. - * Also, there may have been redirects resulting in a different url to that + * Gets the original URL for the current page. This is not always the same + * as the URL passed to WebViewClient.onPageStarted because although the + * load for that URL has begun, the current page may not have changed. + * Also, there may have been redirects resulting in a different URL to that * originally requested. - * @return The url that was originally requested for the current page. + * + * @return the URL that was originally requested for the current page */ public String getOriginalUrl() { checkThread(); @@ -1073,9 +1114,10 @@ public class WebView extends AbsoluteLayout } /** - * Get the title for the current page. This is the title of the current page + * Gets the title for the current page. This is the title of the current page * until WebViewClient.onReceivedTitle is called. - * @return The title for the current page. + * + * @return the title for the current page */ public String getTitle() { checkThread(); @@ -1083,9 +1125,10 @@ public class WebView extends AbsoluteLayout } /** - * Get the favicon for the current page. This is the favicon of the current + * Gets the favicon for the current page. This is the favicon of the current * page until WebViewClient.onReceivedIcon is called. - * @return The favicon for the current page. + * + * @return the favicon for the current page */ public Bitmap getFavicon() { checkThread(); @@ -1093,9 +1136,10 @@ public class WebView extends AbsoluteLayout } /** - * Get the touch icon url for the apple-touch-icon <link> element, or + * Gets the touch icon URL for the apple-touch-icon <link> element, or * a URL on this site's server pointing to the standard location of a * touch icon. + * * @hide */ public String getTouchIconUrl() { @@ -1103,8 +1147,9 @@ public class WebView extends AbsoluteLayout } /** - * Get the progress for the current page. - * @return The progress for the current page between 0 and 100. + * Gets the progress for the current page. + * + * @return the progress for the current page between 0 and 100 */ public int getProgress() { checkThread(); @@ -1112,7 +1157,9 @@ public class WebView extends AbsoluteLayout } /** - * @return the height of the HTML content. + * Gets the height of the HTML content. + * + * @return the height of the HTML content */ public int getContentHeight() { checkThread(); @@ -1120,7 +1167,9 @@ public class WebView extends AbsoluteLayout } /** - * @return the width of the HTML content. + * Gets the width of the HTML content. + * + * @return the width of the HTML content * @hide */ public int getContentWidth() { @@ -1128,8 +1177,8 @@ public class WebView extends AbsoluteLayout } /** - * Pause all layout, parsing, and JavaScript timers for all webviews. This - * is a global requests, not restricted to just this webview. This can be + * Pauses all layout, parsing, and JavaScript timers for all WebViews. This + * is a global requests, not restricted to just this WebView. This can be * useful if the application has been paused. */ public void pauseTimers() { @@ -1138,7 +1187,7 @@ public class WebView extends AbsoluteLayout } /** - * Resume all layout, parsing, and JavaScript timers for all webviews. + * Resumes all layout, parsing, and JavaScript timers for all WebViews. * This will resume dispatching all timers. */ public void resumeTimers() { @@ -1147,11 +1196,10 @@ public class WebView extends AbsoluteLayout } /** - * Call this to pause any extra processing associated with this WebView and - * its associated DOM, plugins, JavaScript etc. For example, if the WebView - * is taken offscreen, this could be called to reduce unnecessary CPU or - * network traffic. When the WebView is again "active", call onResume(). - * + * Pauses any extra processing associated with this WebView and its + * associated DOM, plugins, JavaScript etc. For example, if this WebView is + * taken offscreen, this could be called to reduce unnecessary CPU or + * network traffic. When this WebView is again "active", call onResume(). * Note that this differs from pauseTimers(), which affects all WebViews. */ public void onPause() { @@ -1160,7 +1208,7 @@ public class WebView extends AbsoluteLayout } /** - * Call this to resume a WebView after a previous call to onPause(). + * Resumes a WebView after a previous call to onPause(). */ public void onResume() { checkThread(); @@ -1168,8 +1216,9 @@ public class WebView extends AbsoluteLayout } /** - * Returns true if the view is paused, meaning onPause() was called. Calling - * onResume() sets the paused state back to false. + * Gets whether this WebView is paused, meaning onPause() was called. + * Calling onResume() sets the paused state back to false. + * * @hide */ public boolean isPaused() { @@ -1177,8 +1226,8 @@ public class WebView extends AbsoluteLayout } /** - * Call this to inform the view that memory is low so that it can - * free any available memory. + * Informs this WebView that memory is low so that it can free any available + * memory. */ public void freeMemory() { checkThread(); @@ -1186,10 +1235,10 @@ public class WebView extends AbsoluteLayout } /** - * Clear the resource cache. Note that the cache is per-application, so + * Clears the resource cache. Note that the cache is per-application, so * this will clear the cache for all WebViews used. * - * @param includeDiskFiles If false, only the RAM cache is cleared. + * @param includeDiskFiles if false, only the RAM cache is cleared */ public void clearCache(boolean includeDiskFiles) { checkThread(); @@ -1197,7 +1246,7 @@ public class WebView extends AbsoluteLayout } /** - * Make sure that clearing the form data removes the adapter from the + * Makes sure that clearing the form data removes the adapter from the * currently focused textfield if there is one. */ public void clearFormData() { @@ -1206,7 +1255,7 @@ public class WebView extends AbsoluteLayout } /** - * Tell the WebView to clear its internal back/forward list. + * Tells this WebView to clear its internal back/forward list. */ public void clearHistory() { checkThread(); @@ -1214,8 +1263,8 @@ public class WebView extends AbsoluteLayout } /** - * Clear the SSL preferences table stored in response to proceeding with SSL - * certificate errors. + * Clears the SSL preferences table stored in response to proceeding with + * SSL certificate errors. */ public void clearSslPreferences() { checkThread(); @@ -1223,7 +1272,7 @@ public class WebView extends AbsoluteLayout } /** - * Return the WebBackForwardList for this WebView. This contains the + * Gets the WebBackForwardList for this WebView. This contains the * back/forward list for use in querying each item in the history stack. * This is a copy of the private WebBackForwardList so it contains only a * snapshot of the current state. Multiple calls to this method may return @@ -1237,10 +1286,10 @@ public class WebView extends AbsoluteLayout } /** - * Register the listener to be notified as find-on-page operations progress. - * This will replace the current listener. + * Registers the listener to be notified as find-on-page operations + * progress. This will replace the current listener. * - * @param listener An implementation of {@link FindListener}. + * @param listener an implementation of {@link FindListener} */ public void setFindListener(FindListener listener) { checkThread(); @@ -1248,14 +1297,14 @@ public class WebView extends AbsoluteLayout } /** - * Highlight and scroll to the next match found by {@link #findAll} or + * Highlights and scrolls to the next match found by {@link #findAll} or * {@link #findAllAsync}, wrapping around page boundaries as necessary. * Notifies any registered {@link FindListener}. If neither * {@link #findAll} nor {@link #findAllAsync(String)} has been called yet, * or if {@link #clearMatches} has been called since the last find * operation, this function does nothing. * - * @param forward Direction to search. + * @param forward the direction to search * @see #setFindListener */ public void findNext(boolean forward) { @@ -1264,12 +1313,11 @@ public class WebView extends AbsoluteLayout } /** - * Find all instances of find on the page and highlight them. + * Finds all instances of find on the page and highlights them. * Notifies any registered {@link FindListener}. * - * @param find String to find. - * @return int The number of occurances of the String "find" - * that were found. + * @param find the string to find + * @return the number of occurances of the String "find" that were found * @deprecated {@link #findAllAsync} is preferred. * @see #setFindListener */ @@ -1281,12 +1329,12 @@ public class WebView extends AbsoluteLayout } /** - * Find all instances of find on the page and highlight them, + * Finds all instances of find on the page and highlights them, * asynchronously. Notifies any registered {@link FindListener}. * Successive calls to this or {@link #findAll} will cancel any * pending searches. * - * @param find String to find. + * @param find the string to find. * @see #setFindListener */ public void findAllAsync(String find) { @@ -1295,14 +1343,15 @@ public class WebView extends AbsoluteLayout } /** - * Start an ActionMode for finding text in this WebView. Only works if this - * WebView is attached to the view system. - * @param text If non-null, will be the initial text to search for. + * Starts an ActionMode for finding text in this WebView. Only works if this + * WebView is attached to the view system. + * + * @param text if non-null, will be the initial text to search for. * Otherwise, the last String searched for in this WebView will * be used to start. - * @param showIme If true, show the IME, assuming the user will begin typing. - * If false and text is non-null, perform a find all. - * @return boolean True if the find dialog is shown, false otherwise. + * @param showIme if true, show the IME, assuming the user will begin typing. + * If false and text is non-null, perform a find all. + * @return true if the find dialog is shown, false otherwise */ public boolean showFindDialog(String text, boolean showIme) { checkThread(); @@ -1310,24 +1359,26 @@ public class WebView extends AbsoluteLayout } /** - * Return the first substring consisting of the address of a physical + * Gets the first substring consisting of the address of a physical * location. Currently, only addresses in the United States are detected, * and consist of: - * - a house number - * - a street name - * - a street type (Road, Circle, etc), either spelled out or abbreviated - * - a city name - * - a state or territory, either spelled out or two-letter abbr. - * - an optional 5 digit or 9 digit zip code. - * + * <ul> + * <li>a house number</li> + * <li>a street name</li> + * <li>a street type (Road, Circle, etc), either spelled out or + * abbreviated</li> + * <li>a city name</li> + * <li>a state or territory, either spelled out or two-letter abbr</li> + * <li>an optional 5 digit or 9 digit zip code</li> + * </ul> * All names must be correctly capitalized, and the zip code, if present, * must be valid for the state. The street type must be a standard USPS * spelling or abbreviation. The state or territory must also be spelled * or abbreviated using USPS standards. The house number may not exceed * five digits. - * @param addr The string to search for addresses. * - * @return the address, or if no address is found, return null. + * @param addr the string to search for addresses + * @return the address, or if no address is found, null */ public static String findAddress(String addr) { checkThread(); @@ -1335,7 +1386,7 @@ public class WebView extends AbsoluteLayout } /** - * Clear the highlighting surrounding text matches created by + * Clears the highlighting surrounding text matches created by * {@link #findAll} or {@link #findAllAsync}. */ public void clearMatches() { @@ -1344,10 +1395,11 @@ public class WebView extends AbsoluteLayout } /** - * Query the document to see if it contains any image references. The + * Queries the document to see if it contains any image references. The * message object will be dispatched with arg1 being set to 1 if images * were found and 0 if the document does not reference any images. - * @param response The message that will be dispatched with the result. + * + * @param response the message that will be dispatched with the result */ public void documentHasImages(Message response) { checkThread(); @@ -1355,9 +1407,10 @@ public class WebView extends AbsoluteLayout } /** - * Set the WebViewClient that will receive various notifications and + * Sets the WebViewClient that will receive various notifications and * requests. This will replace the current handler. - * @param client An implementation of WebViewClient. + * + * @param client an implementation of WebViewClient */ public void setWebViewClient(WebViewClient client) { checkThread(); @@ -1365,10 +1418,11 @@ public class WebView extends AbsoluteLayout } /** - * Register the interface to be used when content can not be handled by + * Registers the interface to be used when content can not be handled by * the rendering engine, and should be downloaded instead. This will replace * the current handler. - * @param listener An implementation of DownloadListener. + * + * @param listener an implementation of DownloadListener */ public void setDownloadListener(DownloadListener listener) { checkThread(); @@ -1376,10 +1430,11 @@ public class WebView extends AbsoluteLayout } /** - * Set the chrome handler. This is an implementation of WebChromeClient for + * Sets the chrome handler. This is an implementation of WebChromeClient for * use in handling JavaScript dialogs, favicons, titles, and the progress. * This will replace the current handler. - * @param client An implementation of WebChromeClient. + * + * @param client an implementation of WebChromeClient */ public void setWebChromeClient(WebChromeClient client) { checkThread(); @@ -1387,9 +1442,10 @@ public class WebView extends AbsoluteLayout } /** - * Set the Picture listener. This is an interface used to receive + * Sets the Picture listener. This is an interface used to receive * notifications of a new Picture. - * @param listener An implementation of WebView.PictureListener. + * + * @param listener an implementation of WebView.PictureListener * @deprecated This method is now obsolete. */ @Deprecated @@ -1419,7 +1475,7 @@ public class WebView extends AbsoluteLayout * permissions of the host application. Use extreme care when using this * method in a WebView which could contain untrusted content.</li> * <li> JavaScript interacts with Java object on a private, background - * thread of the WebView. Care is therefore required to maintain thread + * thread of this WebView. Care is therefore required to maintain thread * safety.</li> * </ul> * @@ -1445,10 +1501,11 @@ public class WebView extends AbsoluteLayout } /** - * Return the WebSettings object used to control the settings for this + * Gets the WebSettings object used to control the settings for this * WebView. - * @return A WebSettings object that can be used to control this WebView's - * settings. + * + * @return a WebSettings object that can be used to control this WebView's + * settings */ public WebSettings getSettings() { checkThread(); @@ -1456,11 +1513,11 @@ public class WebView extends AbsoluteLayout } /** - * Return the list of currently loaded plugins. - * @return The list of currently loaded plugins. + * Gets the list of currently loaded plugins. * - * @hide + * @return the list of currently loaded plugins * @deprecated This was used for Gears, which has been deprecated. + * @hide */ @Deprecated public static synchronized PluginList getPluginList() { @@ -1469,8 +1526,8 @@ public class WebView extends AbsoluteLayout } /** - * @hide * @deprecated This was used for Gears, which has been deprecated. + * @hide */ @Deprecated public void refreshPlugins(boolean reloadOpenPages) { @@ -1478,8 +1535,9 @@ public class WebView extends AbsoluteLayout } /** - * Use this method to put the WebView into text selection mode. - * Do not rely on this functionality; it will be deprecated in the future. + * Puts this WebView into text selection mode. Do not rely on this + * functionality; it will be deprecated in the future. + * * @deprecated This method is now obsolete. */ @Deprecated @@ -1528,15 +1586,15 @@ public class WebView extends AbsoluteLayout } /** - * Gets the zoom controls for the WebView, as a separate View. The caller is - * responsible for inserting this View into the layout hierarchy. + * Gets the zoom controls for this WebView, as a separate View. The caller + * is responsible for inserting this View into the layout hierarchy. * <p/> * API level {@link android.os.Build.VERSION_CODES#CUPCAKE} introduced * built-in zoom mechanisms for the WebView, as opposed to these separate * zoom controls. The built-in mechanisms are preferred and can be enabled * using {@link WebSettings#setBuiltInZoomControls}. * - * @deprecated The built-in zoom mechanisms are preferred. + * @deprecated the built-in zoom mechanisms are preferred * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN} */ @Deprecated @@ -1546,7 +1604,9 @@ public class WebView extends AbsoluteLayout } /** - * @return TRUE if the WebView can be zoomed in. + * Gets whether this WebView can be zoomed in. + * + * @return true if this WebView can be zoomed in */ public boolean canZoomIn() { checkThread(); @@ -1554,7 +1614,9 @@ public class WebView extends AbsoluteLayout } /** - * @return TRUE if the WebView can be zoomed out. + * Gets whether this WebView can be zoomed out. + * + * @return true if this WebView can be zoomed out */ public boolean canZoomOut() { checkThread(); @@ -1562,8 +1624,9 @@ public class WebView extends AbsoluteLayout } /** - * Perform zoom in in the webview - * @return TRUE if zoom in succeeds. FALSE if no zoom changes. + * Performs zoom in in this WebView. + * + * @return true if zoom in succeeds, false if no zoom changes */ public boolean zoomIn() { checkThread(); @@ -1571,8 +1634,9 @@ public class WebView extends AbsoluteLayout } /** - * Perform zoom out in the webview - * @return TRUE if zoom out succeeds. FALSE if no zoom changes. + * Performs zoom out in this WebView. + * + * @return true if zoom out succeeds, false if no zoom changes */ public boolean zoomOut() { checkThread(); @@ -1593,8 +1657,9 @@ public class WebView extends AbsoluteLayout //------------------------------------------------------------------------- /** - * Used by providers to obtain the underlying implementation, e.g. when the appliction - * responds to WebViewClient.onCreateWindow() request. + * Gets the WebViewProvider. Used by providers to obtain the underlying + * implementation, e.g. when the appliction responds to + * WebViewClient.onCreateWindow() request. * * @hide WebViewProvider is not public API. */ |