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

Commit 856d8ac2 authored by Steve Block's avatar Steve Block Committed by Android Git Automerger
Browse files

am 85061b31: am ff35000c: Merge "Fix JavaDoc style for several WebView classes" into jb-dev

* commit '85061b31':
  Fix JavaDoc style for several WebView classes
parents 71c3d061 85061b31
Loading
Loading
Loading
Loading
+55 −31
Original line number Original line Diff line number Diff line
@@ -56,6 +56,7 @@ public final class CacheManager {
     * Represents a resource stored in the HTTP cache. Instances of this class
     * Represents a resource stored in the HTTP cache. Instances of this class
     * can be obtained by calling
     * can be obtained by calling
     * {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>))}.
     * {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>))}.
     *
     * @deprecated Access to the HTTP cache will be removed in a future release.
     * @deprecated Access to the HTTP cache will be removed in a future release.
     */
     */
    @Deprecated
    @Deprecated
@@ -81,7 +82,8 @@ public final class CacheManager {


        /**
        /**
         * Gets the status code of this cache entry.
         * 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() {
        public int getHttpStatusCode() {
            return httpStatusCode;
            return httpStatusCode;
@@ -89,7 +91,8 @@ public final class CacheManager {


        /**
        /**
         * Gets the content length of this cache entry.
         * 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() {
        public long getContentLength() {
            return contentLength;
            return contentLength;
@@ -99,7 +102,8 @@ public final class CacheManager {
         * Gets the path of the file used to store the content of this cache
         * Gets the path of the file used to store the content of this cache
         * entry, relative to the base directory of the cache. See
         * entry, relative to the base directory of the cache. See
         * {@link CacheManager#getCacheFileBaseDir CacheManager.getCacheFileBaseDir()}.
         * {@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() {
        public String getLocalPath() {
            return localPath;
            return localPath;
@@ -108,7 +112,8 @@ public final class CacheManager {
        /**
        /**
         * Gets the expiry date of this cache entry, expressed in milliseconds
         * Gets the expiry date of this cache entry, expressed in milliseconds
         * since midnight, January 1, 1970 UTC.
         * 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() {
        public long getExpires() {
            return expires;
            return expires;
@@ -116,7 +121,8 @@ public final class CacheManager {


        /**
        /**
         * Gets the expiry date of this cache entry, expressed as a string.
         * 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() {
        public String getExpiresString() {
@@ -126,7 +132,8 @@ public final class CacheManager {
        /**
        /**
         * Gets the date at which this cache entry was last modified, expressed
         * Gets the date at which this cache entry was last modified, expressed
         * as a string.
         * 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() {
        public String getLastModified() {
            return lastModified;
            return lastModified;
@@ -134,7 +141,8 @@ public final class CacheManager {


        /**
        /**
         * Gets the entity tag of this cache entry.
         * 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() {
        public String getETag() {
            return etag;
            return etag;
@@ -142,7 +150,8 @@ public final class CacheManager {


        /**
        /**
         * Gets the MIME type of this cache entry.
         * 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() {
        public String getMimeType() {
            return mimeType;
            return mimeType;
@@ -151,7 +160,8 @@ public final class CacheManager {
        /**
        /**
         * Gets the value of the HTTP 'Location' header with which this cache
         * Gets the value of the HTTP 'Location' header with which this cache
         * entry was received.
         * entry was received.
         * @return The HTTP 'Location' header for this cache entry
         *
         * @return the HTTP 'Location' header for this cache entry
         */
         */
        public String getLocation() {
        public String getLocation() {
            return location;
            return location;
@@ -159,7 +169,8 @@ public final class CacheManager {


        /**
        /**
         * Gets the encoding of this cache entry.
         * Gets the encoding of this cache entry.
         * @return The encoding of this cache entry
         *
         * @return the encoding of this cache entry
         */
         */
        public String getEncoding() {
        public String getEncoding() {
            return encoding;
            return encoding;
@@ -168,7 +179,8 @@ public final class CacheManager {
        /**
        /**
         * Gets the value of the HTTP 'Content-Disposition' header with which
         * Gets the value of the HTTP 'Content-Disposition' header with which
         * this cache entry was received.
         * 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() {
        public String getContentDisposition() {
@@ -179,7 +191,8 @@ public final class CacheManager {
         * Gets the input stream to the content of this cache entry, to allow
         * Gets the input stream to the content of this cache entry, to allow
         * content to be read. See
         * content to be read. See
         * {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>)}.
         * {@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() {
        public InputStream getInputStream() {
            return inStream;
            return inStream;
@@ -189,7 +202,8 @@ public final class CacheManager {
         * Gets an output stream to the content of this cache entry, to allow
         * Gets an output stream to the content of this cache entry, to allow
         * content to be written. See
         * content to be written. See
         * {@link CacheManager#saveCacheFile CacheManager.saveCacheFile(String, CacheResult)}.
         * {@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()!
        // Note that this is always null for objects returned by getCacheFile()!
        public OutputStream getOutputStream() {
        public OutputStream getOutputStream() {
@@ -199,7 +213,8 @@ public final class CacheManager {


        /**
        /**
         * Sets an input stream to the content of this cache entry.
         * 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) {
        public void setInputStream(InputStream stream) {
            this.inStream = stream;
            this.inStream = stream;
@@ -207,7 +222,8 @@ public final class CacheManager {


        /**
        /**
         * Sets the encoding of this cache entry.
         * 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) {
        public void setEncoding(String encoding) {
            this.encoding = encoding;
            this.encoding = encoding;
@@ -225,7 +241,8 @@ public final class CacheManager {
     * Initializes the HTTP cache. This method must be called before any
     * Initializes the HTTP cache. This method must be called before any
     * CacheManager methods are used. Note that this is called automatically
     * CacheManager methods are used. Note that this is called automatically
     * when a {@link WebView} is created.
     * when a {@link WebView} is created.
     * @param context The application context
     *
     * @param context the application context
     */
     */
    static void init(Context context) {
    static void init(Context context) {
        // This isn't actually where the real cache lives, but where we put files for the
        // 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
     * Gets the base directory in which the files used to store the contents of
     * cache entries are placed. See
     * cache entries are placed. See
     * {@link CacheManager.CacheResult#getLocalPath CacheManager.CacheResult.getLocalPath()}.
     * {@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 Access to the HTTP cache will be removed in a future release.
     */
     */
    @Deprecated
    @Deprecated
@@ -250,7 +268,8 @@ public final class CacheManager {


    /**
    /**
     * Gets whether the HTTP cache is disabled.
     * 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 Access to the HTTP cache will be removed in a future release.
     */
     */
    @Deprecated
    @Deprecated
@@ -262,8 +281,9 @@ public final class CacheManager {
     * Starts a cache transaction. Returns true if this is the only running
     * Starts a cache transaction. Returns true if this is the only running
     * transaction. Otherwise, this transaction is nested inside currently
     * transaction. Otherwise, this transaction is nested inside currently
     * running transactions and false is returned.
     * 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
    @Deprecated
    public static boolean startCacheTransaction() {
    public static boolean startCacheTransaction() {
@@ -273,8 +293,9 @@ public final class CacheManager {
    /**
    /**
     * Ends the innermost cache transaction and returns whether this was the
     * Ends the innermost cache transaction and returns whether this was the
     * only running transaction.
     * 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
    @Deprecated
    public static boolean endCacheTransaction() {
    public static boolean endCacheTransaction() {
@@ -287,10 +308,11 @@ public final class CacheManager {
     * entry needs validation, appropriate headers will be added to the map.
     * entry needs validation, appropriate headers will be added to the map.
     * The input stream of the CacheEntry object should be closed by the caller
     * The input stream of the CacheEntry object should be closed by the caller
     * when access to the underlying file is no longer required.
     * 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
     *                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 Access to the HTTP cache will be removed in a future release.
     */
     */
    @Deprecated
    @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
     * 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
     * the function can use the mimetype that will be passed to WebCore which
     * could be different from the mimetype defined in the headers.
     * could be different from the mimetype defined in the headers.
     * forceCache is for out-of-package callers to force creation of a
     * forceCache is for out-of-package callers to force creation of a
     * CacheResult, and is used to supply surrogate responses for URL
     * CacheResult, and is used to supply surrogate responses for URL
     * interception.
     * interception.
     * @return CacheResult for a given url
     *
     * @return a CacheResult for a given URL
     */
     */
    static CacheResult createCacheFile(String url, int statusCode,
    static CacheResult createCacheFile(String url, int statusCode,
            Headers headers, String mimeType, boolean forceCache) {
            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
     * Adds a cache entry to the HTTP cache for the specicifed URL. Also closes
     * the cache entry's output stream.
     * 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 Access to the HTTP cache will be removed in a future release.
     */
     */
    @Deprecated
    @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() {
    static boolean removeAllCacheFiles() {
        // delete cache files in a separate thread to not block UI.
        // delete cache files in a separate thread to not block UI.
+31 −20
Original line number Original line Diff line number Diff line
@@ -40,7 +40,7 @@ public class CookieManager {
     * {@link CookieSyncManager#createInstance(Context)} must be called
     * {@link CookieSyncManager#createInstance(Context)} must be called
     * first.
     * first.
     *
     *
     * @return The singleton CookieManager instance
     * @return the singleton CookieManager instance
     */
     */
    public static synchronized CookieManager getInstance() {
    public static synchronized CookieManager getInstance() {
        return WebViewFactory.getProvider().getCookieManager();
        return WebViewFactory.getProvider().getCookieManager();
@@ -49,7 +49,8 @@ public class CookieManager {
    /**
    /**
     * Sets whether the application's {@link WebView} instances should send and
     * Sets whether the application's {@link WebView} instances should send and
     * accept cookies.
     * accept cookies.
     * @param accept Whether {@link WebView} instances should send and accept
     *
     * @param accept whether {@link WebView} instances should send and accept
     *               cookies
     *               cookies
     */
     */
    public synchronized void setAcceptCookie(boolean accept) {
    public synchronized void setAcceptCookie(boolean accept) {
@@ -59,7 +60,8 @@ public class CookieManager {
    /**
    /**
     * Gets whether the application's {@link WebView} instances send and accept
     * Gets whether the application's {@link WebView} instances send and accept
     * cookies.
     * 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() {
    public synchronized boolean acceptCookie() {
        throw new MustOverrideException();
        throw new MustOverrideException();
@@ -70,8 +72,9 @@ public class CookieManager {
     * path and name will be replaced with the new cookie. The cookie being set
     * 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
     * must not have expired and must not be a session cookie, otherwise it
     * will be ignored.
     * 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
     *              HTTP response header
     */
     */
    public void setCookie(String url, String value) {
    public void setCookie(String url, String value) {
@@ -80,8 +83,9 @@ public class CookieManager {


    /**
    /**
     * Gets the cookies for the given URL.
     * 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
     *               HTTP request header
     */
     */
    public String getCookie(String url) {
    public String getCookie(String url) {
@@ -89,10 +93,11 @@ public class CookieManager {
    }
    }


    /**
    /**
     * See {@link #getCookie(String)}
     * See {@link #getCookie(String)}.
     * @param url The URL for which the cookies are requested
     *
     * @param privateBrowsing Whether to use the private browsing cookie jar
     * @param url the URL for which the cookies are requested
     * @return value The cookies as a string, using the format of the 'Cookie'
     * @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
     *               HTTP request header
     * @hide Used by Browser, no intention to publish.
     * @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.
     * 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
     *               HTTP request header
     * @hide Used by RequestHandle, no intention to publish.
     * @hide Used by RequestHandle, no intention to publish.
     */
     */
@@ -129,7 +135,8 @@ public class CookieManager {


    /**
    /**
     * Gets whether there are stored cookies.
     * Gets whether there are stored cookies.
     * @return True if there are stored cookies.
     *
     * @return true if there are stored cookies
     */
     */
    public synchronized boolean hasCookies() {
    public synchronized boolean hasCookies() {
        throw new MustOverrideException();
        throw new MustOverrideException();
@@ -137,7 +144,8 @@ public class CookieManager {


    /**
    /**
     * See {@link #hasCookies()}.
     * 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.
     * @hide Used by Browser, no intention to publish.
     */
     */
    public synchronized boolean hasCookies(boolean privateBrowsing) {
    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
     * @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
     * Gets whether the application's {@link WebView} instances send and accept
     * cookies for file scheme URLs.
     * 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
     *         file scheme URLs
     */
     */
    // Static for backward compatibility.
    // Static for backward compatibility.
@@ -172,7 +181,8 @@ public class CookieManager {
    }
    }


    /**
    /**
     * Implements {@link #allowFileSchemeCookies()}
     * Implements {@link #allowFileSchemeCookies()}.
     *
     * @hide Only for use by WebViewProvider implementations
     * @hide Only for use by WebViewProvider implementations
     */
     */
    protected boolean allowFileSchemeCookiesImpl() {
    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
     * @hide Only for use by WebViewProvider implementations
     */
     */
    protected void setAcceptFileSchemeCookiesImpl(boolean accept) {
    protected void setAcceptFileSchemeCookiesImpl(boolean accept) {
+24 −18
Original line number Original line Diff line number Diff line
@@ -48,28 +48,31 @@ public class GeolocationPermissions {
     */
     */
    public interface Callback {
    public interface Callback {
        /**
        /**
         * Set the Geolocation permission state for the supplied origin.
         * 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
         * @param origin the origin for which permissions are set
         *              Geolocation API.
         * @param allow whether or not the origin should be allowed to use the
         * @param retain Whether the permission should be retained beyond the
         *              Geolocation API
         * @param retain whether the permission should be retained beyond the
         *               lifetime of a page currently being displayed by a
         *               lifetime of a page currently being displayed by a
         *               WebView.
         *               WebView
         */
         */
        public void invoke(String origin, boolean allow, boolean retain);
        public void invoke(String origin, boolean allow, boolean retain);
    };
    };


    /**
    /**
     * Get the singleton instance of this class.
     * Gets the singleton instance of this class.
     * @return The singleton {@link GeolocationPermissions} instance.
     *
     * @return the singleton {@link GeolocationPermissions} instance
     */
     */
    public static GeolocationPermissions getInstance() {
    public static GeolocationPermissions getInstance() {
      return WebViewFactory.getProvider().getGeolocationPermissions();
      return WebViewFactory.getProvider().getGeolocationPermissions();
    }
    }


    /**
    /**
     * Get the set of origins for which Geolocation permissions are stored.
     * Gets the set of origins for which Geolocation permissions are stored.
     * @param callback A {@link ValueCallback} to receive the result of this
     *
     * @param callback a {@link ValueCallback} to receive the result of this
     *                 request. This object's
     *                 request. This object's
     *                 {@link ValueCallback#onReceiveValue(T) onReceiveValue()}
     *                 {@link ValueCallback#onReceiveValue(T) onReceiveValue()}
     *                 method will be invoked asynchronously with a set of
     *                 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.
     * 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
     * @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
     *                 request. This object's
     *                 {@link ValueCallback#onReceiveValue(T) onReceiveValue()}
     *                 {@link ValueCallback#onReceiveValue(T) onReceiveValue()}
     *                 method will be invoked asynchronously with a boolean
     *                 method will be invoked asynchronously with a boolean
@@ -99,23 +103,25 @@ public class GeolocationPermissions {
    }
    }


    /**
    /**
     * Clear the Geolocation permission state for the specified origin.
     * Clears the Geolocation permission state for the specified origin.
     * @param origin The origin for which Geolocation permissions are cleared.
     *
     * @param origin the origin for which Geolocation permissions are cleared
     */
     */
    public void clear(String origin) {
    public void clear(String origin) {
        // Must be a no-op for backward compatibility: see the hidden constructor for reason.
        // Must be a no-op for backward compatibility: see the hidden constructor for reason.
    }
    }


    /**
    /**
     * Allow the specified origin to use the Geolocation API.
     * Allows the specified origin to use the Geolocation API.
     * @param origin The origin for which Geolocation API use is allowed.
     *
     * @param origin the origin for which Geolocation API use is allowed
     */
     */
    public void allow(String origin) {
    public void allow(String origin) {
        // Must be a no-op for backward compatibility: see the hidden constructor for reason.
        // 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() {
    public void clearAll() {
        // Must be a no-op for backward compatibility: see the hidden constructor for reason.
        // Must be a no-op for backward compatibility: see the hidden constructor for reason.
+16 −9
Original line number Original line Diff line number Diff line
@@ -36,9 +36,10 @@ public class WebResourceResponse {
     * input stream. Callers must implement
     * input stream. Callers must implement
     * {@link InputStream#read(byte[]) InputStream.read(byte[])} for the input
     * {@link InputStream#read(byte[]) InputStream.read(byte[])} for the input
     * stream.
     * stream.
     * @param mimeType The resource response's MIME type, for example text/html
     *
     * @param encoding The resource response's encoding
     * @param mimeType the resource response's MIME type, for example text/html
     * @param data The input stream that provides the resource response's data
     * @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,
    public WebResourceResponse(String mimeType, String encoding,
            InputStream data) {
            InputStream data) {
@@ -49,7 +50,8 @@ public class WebResourceResponse {


    /**
    /**
     * Sets the resource response's MIME type, for example text/html.
     * 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) {
    public void setMimeType(String mimeType) {
        mMimeType = mimeType;
        mMimeType = mimeType;
@@ -57,7 +59,8 @@ public class WebResourceResponse {


    /**
    /**
     * Gets the resource response's MIME type.
     * Gets the resource response's MIME type.
     * @return The resource response's MIME type
     *
     * @return the resource response's MIME type
     */
     */
    public String getMimeType() {
    public String getMimeType() {
        return mMimeType;
        return mMimeType;
@@ -66,7 +69,8 @@ public class WebResourceResponse {
    /**
    /**
     * Sets the resource response's encoding, for example UTF-8. This is used
     * Sets the resource response's encoding, for example UTF-8. This is used
     * to decode the data from the input stream.
     * 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) {
    public void setEncoding(String encoding) {
        mEncoding = encoding;
        mEncoding = encoding;
@@ -74,7 +78,8 @@ public class WebResourceResponse {


    /**
    /**
     * Gets the resource response's encoding.
     * Gets the resource response's encoding.
     * @return The resource response's encoding
     *
     * @return the resource response's encoding
     */
     */
    public String getEncoding() {
    public String getEncoding() {
        return mEncoding;
        return mEncoding;
@@ -83,7 +88,8 @@ public class WebResourceResponse {
    /**
    /**
     * Sets the input stream that provides the resource respone's data. Callers
     * Sets the input stream that provides the resource respone's data. Callers
     * must implement {@link InputStream#read(byte[]) InputStream.read(byte[])}.
     * 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) {
    public void setData(InputStream data) {
        mInputStream = data;
        mInputStream = data;
@@ -91,7 +97,8 @@ public class WebResourceResponse {


    /**
    /**
     * Gets the input stream that provides the resource respone's data.
     * 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() {
    public InputStream getData() {
        return mInputStream;
        return mInputStream;
+342 −232

File changed.

Preview size limit exceeded, changes collapsed.

Loading