summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebChromeClient.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/WebChromeClient.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/WebChromeClient.java')
-rw-r--r--core/java/android/webkit/WebChromeClient.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index 3444d49c05e5..671ef37f4d5d 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -16,6 +16,7 @@
package android.webkit;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.content.Intent;
import android.content.pm.ActivityInfo;
@@ -383,6 +384,7 @@ public class WebChromeClient {
* @return Bitmap The image to use as a default poster, or {@code null} if no such image is
* available.
*/
+ @Nullable
public Bitmap getDefaultVideoPoster() {
return null;
}
@@ -394,6 +396,7 @@ public class WebChromeClient {
*
* @return View The View to be displayed whilst the video is loading.
*/
+ @Nullable
public View getVideoLoadingProgressView() {
return null;
}
@@ -452,6 +455,7 @@ public class WebChromeClient {
* @return the Uris of selected file(s) or {@code null} if the resultCode indicates
* activity canceled or any other error.
*/
+ @Nullable
public static Uri[] parseResult(int resultCode, Intent data) {
return WebViewFactory.getProvider().getStatics().parseFileChooserResult(resultCode, data);
}
@@ -477,14 +481,16 @@ public class WebChromeClient {
public abstract boolean isCaptureEnabled();
/**
- * Returns the title to use for this file selector, or null. If {@code null} a default
- * title should be used.
+ * Returns the title to use for this file selector. If {@code null} a default title should
+ * be used.
*/
+ @Nullable
public abstract CharSequence getTitle();
/**
* The file name of a default selection if specified, or {@code null}.
*/
+ @Nullable
public abstract String getFilenameHint();
/**