summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewClient.java
diff options
context:
space:
mode:
authorNate Fischer <ntfschr@google.com>2017-09-08 17:02:00 -0700
committerNate Fischer <ntfschr@google.com>2017-09-21 18:34:43 -0700
commit3442c74d2ce220a2d104a5717994bbaf09a9f02d (patch)
treec4ba9c316a916dfd4ccd267b30e36164cde25467 /core/java/android/webkit/WebViewClient.java
parentff499e4b0818eda3470c388fa34400ce3fe7f8a9 (diff)
WebView: add @Nullable and @NonNull annotations
This adds @Nullable and @NonNull annotations where the docs previously stated this. This change should be safe, since we already disallowed null values for the @NonNull parameters via documentation. I verified that documentation changes for APIs which previously did not mention null-ness in @param or @return Javadocs (if the API already mentioned it in these spots, then DroidDoc prefers the hand-written description). This also fixes various lint errors. Bug: 65465498 Test: make update-api and manually verify docs Change-Id: I4751508d0e72be8ddfc3d6b601db8c307c9df60e
Diffstat (limited to 'core/java/android/webkit/WebViewClient.java')
-rw-r--r--core/java/android/webkit/WebViewClient.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index b750adadbf5f..2c9450b917ca 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.IntDef;
+import android.annotation.Nullable;
import android.graphics.Bitmap;
import android.net.http.SslError;
import android.os.Message;
@@ -164,6 +165,7 @@ public class WebViewClient {
* shouldInterceptRequest(WebView, WebResourceRequest)} instead.
*/
@Deprecated
+ @Nullable
public WebResourceResponse shouldInterceptRequest(WebView view,
String url) {
return null;
@@ -184,6 +186,7 @@ public class WebViewClient {
* response information or {@code null} if the WebView should load the
* resource itself.
*/
+ @Nullable
public WebResourceResponse shouldInterceptRequest(WebView view,
WebResourceRequest request) {
return shouldInterceptRequest(view, request.getUrl().toString());
@@ -489,7 +492,7 @@ public class WebViewClient {
* @param args Authenticator specific arguments used to log in the user.
*/
public void onReceivedLoginRequest(WebView view, String realm,
- String account, String args) {
+ @Nullable String account, String args) {
}
/**