diff options
author | Mikhail Naganov <mnaganov@google.com> | 2015-02-09 17:01:40 +0000 |
---|---|---|
committer | Mikhail Naganov <mnaganov@google.com> | 2015-03-06 10:12:14 +0000 |
commit | 25e89545736d62c59d19dd9b9587f7b0cbbee068 (patch) | |
tree | 646317a9a2d10571bcd5c36ab4fa2e46498361e8 /api | |
parent | a92d6e28ad26184d4b2b90b6a7ae5f69edcbeca1 (diff) | |
download | frameworks_base-25e89545736d62c59d19dd9b9587f7b0cbbee068.zip frameworks_base-25e89545736d62c59d19dd9b9587f7b0cbbee068.tar.gz frameworks_base-25e89545736d62c59d19dd9b9587f7b0cbbee068.tar.bz2 |
Provide better error reporting for WebView
Add new callbacks into WebViewClient that will provide notifications
about subresource loading errors and HTTP errors received from servers.
Bug: 19313118
Change-Id: Idb47f53ef7e72cb95f3e9b89d1e238d69e896b8b
Diffstat (limited to 'api')
-rw-r--r-- | api/current.txt | 23 | ||||
-rw-r--r-- | api/system-current.txt | 23 |
2 files changed, 42 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt index c36d03f..2735f3e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -36927,6 +36927,12 @@ package android.webkit { method public abstract void onReceivedIcon(java.lang.String, android.graphics.Bitmap); } + public abstract class WebResourceError { + ctor public WebResourceError(); + method public abstract java.lang.String getDescription(); + method public abstract int getErrorCode(); + } + public abstract interface WebResourceRequest { method public abstract java.lang.String getMethod(); method public abstract java.util.Map<java.lang.String, java.lang.String> getRequestHeaders(); @@ -36935,7 +36941,7 @@ package android.webkit { method public abstract boolean isForMainFrame(); } - public class WebResourceResponse { + public class WebResourceResponse extends android.webkit.WebResourceResponseBase { ctor public WebResourceResponse(java.lang.String, java.lang.String, java.io.InputStream); ctor public WebResourceResponse(java.lang.String, java.lang.String, int, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.io.InputStream); method public java.io.InputStream getData(); @@ -36951,6 +36957,16 @@ package android.webkit { method public void setStatusCodeAndReasonPhrase(int, java.lang.String); } + public abstract class WebResourceResponseBase { + ctor public WebResourceResponseBase(); + method public abstract java.io.InputStream getData(); + method public abstract java.lang.String getEncoding(); + method public abstract java.lang.String getMimeType(); + method public abstract java.lang.String getReasonPhrase(); + method public abstract java.util.Map<java.lang.String, java.lang.String> getResponseHeaders(); + method public abstract int getStatusCode(); + } + public abstract class WebSettings { ctor public WebSettings(); method public abstract deprecated boolean enableSmoothTransition(); @@ -37265,8 +37281,10 @@ package android.webkit { method public void onPageFinished(android.webkit.WebView, java.lang.String); method public void onPageStarted(android.webkit.WebView, java.lang.String, android.graphics.Bitmap); method public void onReceivedClientCertRequest(android.webkit.WebView, android.webkit.ClientCertRequest); - method public void onReceivedError(android.webkit.WebView, int, java.lang.String, java.lang.String); + method public deprecated void onReceivedError(android.webkit.WebView, int, java.lang.String, java.lang.String); + method public void onReceivedError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceError); method public void onReceivedHttpAuthRequest(android.webkit.WebView, android.webkit.HttpAuthHandler, java.lang.String, java.lang.String); + method public void onReceivedHttpError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceResponseBase); method public void onReceivedLoginRequest(android.webkit.WebView, java.lang.String, java.lang.String, java.lang.String); method public void onReceivedSslError(android.webkit.WebView, android.webkit.SslErrorHandler, android.net.http.SslError); method public void onScaleChanged(android.webkit.WebView, float, float); @@ -37279,6 +37297,7 @@ package android.webkit { method public boolean shouldOverrideUrlLoading(android.webkit.WebView, java.lang.String); field public static final int ERROR_AUTHENTICATION = -4; // 0xfffffffc field public static final int ERROR_BAD_URL = -12; // 0xfffffff4 + field public static final int ERROR_BLOCKED = -16; // 0xfffffff0 field public static final int ERROR_CONNECT = -6; // 0xfffffffa field public static final int ERROR_FAILED_SSL_HANDSHAKE = -11; // 0xfffffff5 field public static final int ERROR_FILE = -13; // 0xfffffff3 diff --git a/api/system-current.txt b/api/system-current.txt index 52098e6..0d3f89a 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -39151,6 +39151,12 @@ package android.webkit { method public abstract void onReceivedIcon(java.lang.String, android.graphics.Bitmap); } + public abstract class WebResourceError { + ctor public WebResourceError(); + method public abstract java.lang.String getDescription(); + method public abstract int getErrorCode(); + } + public abstract interface WebResourceRequest { method public abstract java.lang.String getMethod(); method public abstract java.util.Map<java.lang.String, java.lang.String> getRequestHeaders(); @@ -39159,7 +39165,7 @@ package android.webkit { method public abstract boolean isForMainFrame(); } - public class WebResourceResponse { + public class WebResourceResponse extends android.webkit.WebResourceResponseBase { ctor public WebResourceResponse(java.lang.String, java.lang.String, java.io.InputStream); ctor public WebResourceResponse(java.lang.String, java.lang.String, int, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.io.InputStream); method public java.io.InputStream getData(); @@ -39175,6 +39181,16 @@ package android.webkit { method public void setStatusCodeAndReasonPhrase(int, java.lang.String); } + public abstract class WebResourceResponseBase { + ctor public WebResourceResponseBase(); + method public abstract java.io.InputStream getData(); + method public abstract java.lang.String getEncoding(); + method public abstract java.lang.String getMimeType(); + method public abstract java.lang.String getReasonPhrase(); + method public abstract java.util.Map<java.lang.String, java.lang.String> getResponseHeaders(); + method public abstract int getStatusCode(); + } + public abstract class WebSettings { ctor public WebSettings(); method public abstract deprecated boolean enableSmoothTransition(); @@ -39534,8 +39550,10 @@ package android.webkit { method public void onPageFinished(android.webkit.WebView, java.lang.String); method public void onPageStarted(android.webkit.WebView, java.lang.String, android.graphics.Bitmap); method public void onReceivedClientCertRequest(android.webkit.WebView, android.webkit.ClientCertRequest); - method public void onReceivedError(android.webkit.WebView, int, java.lang.String, java.lang.String); + method public deprecated void onReceivedError(android.webkit.WebView, int, java.lang.String, java.lang.String); + method public void onReceivedError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceError); method public void onReceivedHttpAuthRequest(android.webkit.WebView, android.webkit.HttpAuthHandler, java.lang.String, java.lang.String); + method public void onReceivedHttpError(android.webkit.WebView, android.webkit.WebResourceRequest, android.webkit.WebResourceResponseBase); method public void onReceivedLoginRequest(android.webkit.WebView, java.lang.String, java.lang.String, java.lang.String); method public void onReceivedSslError(android.webkit.WebView, android.webkit.SslErrorHandler, android.net.http.SslError); method public void onScaleChanged(android.webkit.WebView, float, float); @@ -39548,6 +39566,7 @@ package android.webkit { method public boolean shouldOverrideUrlLoading(android.webkit.WebView, java.lang.String); field public static final int ERROR_AUTHENTICATION = -4; // 0xfffffffc field public static final int ERROR_BAD_URL = -12; // 0xfffffff4 + field public static final int ERROR_BLOCKED = -16; // 0xfffffff0 field public static final int ERROR_CONNECT = -6; // 0xfffffffa field public static final int ERROR_FAILED_SSL_HANDSHAKE = -11; // 0xfffffff5 field public static final int ERROR_FILE = -13; // 0xfffffff3 |