diff options
author | Hui Shu <hush@google.com> | 2014-02-05 21:35:11 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-05 21:35:12 +0000 |
commit | e6415f50b10fe455df2cbe568a90bc762cce3cf7 (patch) | |
tree | eb4e88197ece04d87d85c4d6e621a99e186aff8f /core | |
parent | 7da27478ea09d7e6c8e6bb8c563ea6439c53e28f (diff) | |
parent | c60ad9c3fb24afd9d215faab5ea5d0fdaa897c4a (diff) | |
download | frameworks_base-e6415f50b10fe455df2cbe568a90bc762cce3cf7.zip frameworks_base-e6415f50b10fe455df2cbe568a90bc762cce3cf7.tar.gz frameworks_base-e6415f50b10fe455df2cbe568a90bc762cce3cf7.tar.bz2 |
Merge "Fix postUrl to call loadUrl when url is not a network url."
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/webkit/WebView.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 7ee33c1..826bcec 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -845,8 +845,8 @@ public class WebView extends AbsoluteLayout /** * 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. + * is not a network URL, it will be loaded with {@link #loadUrl(String)} + * instead, ignoring the postData param. * * @param url the URL of the resource to load * @param postData the data will be passed to "POST" request, which must be @@ -855,7 +855,11 @@ public class WebView extends AbsoluteLayout public void postUrl(String url, byte[] postData) { checkThread(); if (DebugFlags.TRACE_API) Log.d(LOGTAG, "postUrl=" + url); - mProvider.postUrl(url, postData); + if (URLUtil.isNetworkUrl(url)) { + mProvider.postUrl(url, postData); + } else { + mProvider.loadUrl(url); + } } /** |