diff options
| author | Nate Fischer <ntfschr@google.com> | 2018-02-21 15:27:01 -0800 |
|---|---|---|
| committer | Nate Fischer <ntfschr@google.com> | 2018-02-21 15:27:01 -0800 |
| commit | 5a6ae8c739419fb5ea445e791d28d4674f5dade9 (patch) | |
| tree | bdb5b4b4088e3c9eb01abd08378e5aedd9d00ad6 /core/java/android/webkit/WebView.java | |
| parent | e7e42ceb028c49b626e2cee591a967c7a16fb830 (diff) | |
WebView: fix docs for setSafeBrowsingWhitelist
No change to logic, documentation change only.
This changes "URL" to "host" everywhere in this API documentation.
This API never accepted a list of URLs, it only ever accepted a list of
hosts (e.g. "www.google.com" is ok, "http://www.google.com/" is not).
The original documentation was misleading.
Test: make docs (manually verify)
Change-Id: I3b57a2a160ff00ba8f92b30f6e3b4399e55f2ea0
Diffstat (limited to 'core/java/android/webkit/WebView.java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 65deb3b85572..a8f6b03cd97a 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -1689,8 +1689,8 @@ public class WebView extends AbsoluteLayout } /** - * Sets the list of domains that are exempt from SafeBrowsing checks. The list is - * global for all the WebViews. + * Sets the list of hosts (domain names/IP addresses) that are exempt from SafeBrowsing checks. + * The list is global for all the WebViews. * <p> * Each rule should take one of these: * <table> @@ -1702,15 +1702,18 @@ public class WebView extends AbsoluteLayout * </table> * <p> * All other rules, including wildcards, are invalid. + * <p> + * The correct syntax for hosts is defined by <a + * href="https://tools.ietf.org/html/rfc3986#section-3.2.2">RFC 3986</a>. * - * @param urls the list of URLs - * @param callback will be called with {@code true} if URLs are successfully added to the - * whitelist. It will be called with {@code false} if any URLs are malformed. The callback will - * be run on the UI thread + * @param hosts the list of hosts + * @param callback will be called with {@code true} if hosts are successfully added to the + * whitelist. It will be called with {@code false} if any hosts are malformed. The callback + * will be run on the UI thread */ - public static void setSafeBrowsingWhitelist(@NonNull List<String> urls, + public static void setSafeBrowsingWhitelist(@NonNull List<String> hosts, @Nullable ValueCallback<Boolean> callback) { - getFactory().getStatics().setSafeBrowsingWhitelist(urls, callback); + getFactory().getStatics().setSafeBrowsingWhitelist(hosts, callback); } /** |
