diff options
| author | Patrick Scott <phanna@android.com> | 2009-08-25 13:51:08 -0400 |
|---|---|---|
| committer | Patrick Scott <phanna@android.com> | 2009-09-01 08:37:22 -0400 |
| commit | 05c9ed9ce1d920c322ee1431cfed64541f0acf3c (patch) | |
| tree | fa082bc704f9432b909b41239d2335a4feaed8be /core/java | |
| parent | 0c637113381cb49fbb83cf0e753e476d0d0d50eb (diff) | |
| download | frameworks_base-05c9ed9ce1d920c322ee1431cfed64541f0acf3c.zip frameworks_base-05c9ed9ce1d920c322ee1431cfed64541f0acf3c.tar.gz frameworks_base-05c9ed9ce1d920c322ee1431cfed64541f0acf3c.tar.bz2 | |
Fix the documentation for onReceivedError.
This change adds the EventHandler error codes to WebViewClient for the public
api. Previously, the api was ambiguous about the value of the errorCode
parameter and falsely documented that the values are HTTP status codes.
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/webkit/WebViewClient.java | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java index a185779..a371950 100644 --- a/core/java/android/webkit/WebViewClient.java +++ b/core/java/android/webkit/WebViewClient.java @@ -92,14 +92,46 @@ public class WebViewClient { cancelMsg.sendToTarget(); } + // These ints must match up to the hidden values in EventHandler. + /** Generic error */ + public static final int ERROR_UNKNOWN = -1; + /** Server or proxy hostname lookup failed */ + public static final int ERROR_HOST_LOOKUP = -2; + /** Unsupported authentication scheme (not basic or digest) */ + public static final int ERROR_UNSUPPORTED_AUTH_SCHEME = -3; + /** User authentication failed on server */ + public static final int ERROR_AUTHENTICATION = -4; + /** User authentication failed on proxy */ + public static final int ERROR_PROXY_AUTHENTICATION = -5; + /** Failed to connect to the server */ + public static final int ERROR_CONNECT = -6; + /** Failed to read or write to the server */ + public static final int ERROR_IO = -7; + /** Connection timed out */ + public static final int ERROR_TIMEOUT = -8; + /** Too many redirects */ + public static final int ERROR_REDIRECT_LOOP = -9; + /** Unsupported URI scheme */ + public static final int ERROR_UNSUPPORTED_SCHEME = -10; + /** Failed to perform SSL handshake */ + public static final int ERROR_FAILED_SSL_HANDSHAKE = -11; + /** Malformed URL */ + public static final int ERROR_BAD_URL = -12; + /** Generic file error */ + public static final int ERROR_FILE = -13; + /** File not found */ + public static final int ERROR_FILE_NOT_FOUND = -14; + /** Too many requests during this load */ + public static final int ERROR_TOO_MANY_REQUESTS = -15; + /** - * Report an error to an activity. These errors come up from WebCore, and - * are network errors. - * + * Report an error to the host application. These errors are unrecoverable + * (i.e. the main resource is unavailable). The errorCode parameter + * corresponds to one of the ERROR_* constants. * @param view The WebView that is initiating the callback. - * @param errorCode The HTTP error code. - * @param description A String description. - * @param failingUrl The url that failed. + * @param code The error code corresponding to an ERROR_* value. + * @param description A String describing the error. + * @param failingUrl The url that failed to load. */ public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { |
