diff options
| author | Tobias Sargeant <tobiasjs@google.com> | 2018-01-05 14:34:38 +0000 |
|---|---|---|
| committer | Tobias Sargeant <tobiasjs@google.com> | 2018-01-05 14:44:10 +0000 |
| commit | f4d85d806e72b7a349123f870bc2712fe01b55d5 (patch) | |
| tree | 7f3298f6bdd4375201875a0be64503b45659e0e4 /core/java/android/webkit/WebView.java | |
| parent | 766f0a4981478ff63854df70ba50e6420d19c02b (diff) | |
Add a Java FindAddress implentation.
This stops calling findAddress (possibly indirectly via Linkify) from
loading webview native code, resulting in a performance and memory
improvement for those apps that call WebView#findAddress but do not
otherwise use WebView.
Bug: 22362008
Test: Existing WebView CTS test.
Change-Id: I5fcab725ceaf0d6a00e931d3b6cd2f3799d68391
Diffstat (limited to 'core/java/android/webkit/WebView.java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 637b60e2dcb4..244b6bd51f96 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -1797,9 +1797,10 @@ public class WebView extends AbsoluteLayout * @return the address, or if no address is found, null */ public static String findAddress(String addr) { - // TODO: Rewrite this in Java so it is not needed to start up chromium - // Could also be deprecated - return getFactory().getStatics().findAddress(addr); + if (addr == null) { + throw new NullPointerException("addr is null"); + } + return FindAddress.findAddress(addr); } /** |
