summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebView.java
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2019-06-06 11:13:16 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-06-06 11:13:16 -0700
commita759af55a4861124b14a837aa91abd539f454888 (patch)
treeea46c8468657d47d8909f65d0933859205099bf0 /core/java/android/webkit/WebView.java
parentb487f78c0ae0dac8a3077e231caf1ffaa1354803 (diff)
parentc2ed59a2da7010a6ba579b09687db93382b03e3b (diff)
Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-dev am: a0d66cf3f6 am: 0f0173f9e1
am: c2ed59a2da Change-Id: Ibc2165020ad583db1c4488e68f8d688e9d7a8fe5
Diffstat (limited to 'core/java/android/webkit/WebView.java')
-rw-r--r--core/java/android/webkit/WebView.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 26dba45666fc..a35659e307d5 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -1606,9 +1606,9 @@ public class WebView extends AbsoluteLayout
}
/**
- * Gets the first substring consisting of the address of a physical
- * location. Currently, only addresses in the United States are detected,
- * and consist of:
+ * Gets the first substring which appears to be the address of a physical
+ * location. Only addresses in the United States can be detected, which
+ * must consist of:
* <ul>
* <li>a house number</li>
* <li>a street name</li>
@@ -1624,9 +1624,17 @@ public class WebView extends AbsoluteLayout
* or abbreviated using USPS standards. The house number may not exceed
* five digits.
*
+ * <p class="note"><b>Note:</b> This function is deprecated and should be
+ * avoided on all API levels, as it cannot detect addresses outside of the
+ * United States and has a high rate of false positives. On API level
+ * {@link android.os.Build.VERSION_CODES#O_MR1} and earlier, it also causes
+ * the entire WebView implementation to be loaded and initialized, which
+ * can throw {@link android.util.AndroidRuntimeException} or other exceptions
+ * if the WebView implementation is currently being updated.
+ *
* @param addr the string to search for addresses
* @return the address, or if no address is found, {@code null}
- * @deprecated this method is superseded by {@link TextClassifier#generateLinks(
+ * @deprecated This method is superseded by {@link TextClassifier#generateLinks(
* android.view.textclassifier.TextLinks.Request)}. Avoid using this method even when targeting
* API levels where no alternative is available.
*/