summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorVarun Shah <varunshah@google.com>2020-05-05 23:18:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-05-05 23:18:55 +0000
commit2806da306b98d53e613577e2a4ccadfe13cc631a (patch)
treed6f25d5a0f5b20680b39ac5a04a5bef028c13e2c /core/java/android
parentd1cfb337cf7647d9b6f0fe27aab2c9afefcba8fd (diff)
parent5de25896277862027612235d960e77a568f3df83 (diff)
Merge "Update some ContentResolver docs." into rvc-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/content/ContentResolver.java39
1 files changed, 23 insertions, 16 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 0a4627da223a..c409613589b0 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -1449,7 +1449,7 @@ public abstract class ContentResolver implements ContentInterface {
* on these schemes.
*
* @param uri The desired URI.
- * @return InputStream
+ * @return InputStream or {@code null} if the provider recently crashed.
* @throws FileNotFoundException if the provided URI could not be opened.
* @see #openAssetFileDescriptor(Uri, String)
*/
@@ -1484,6 +1484,9 @@ public abstract class ContentResolver implements ContentInterface {
/**
* Synonym for {@link #openOutputStream(Uri, String)
* openOutputStream(uri, "w")}.
+ *
+ * @param uri The desired URI.
+ * @return an OutputStream or {@code null} if the provider recently crashed.
* @throws FileNotFoundException if the provided URI could not be opened.
*/
public final @Nullable OutputStream openOutputStream(@NonNull Uri uri)
@@ -1506,7 +1509,7 @@ public abstract class ContentResolver implements ContentInterface {
*
* @param uri The desired URI.
* @param mode May be "w", "wa", "rw", or "rwt".
- * @return OutputStream
+ * @return an OutputStream or {@code null} if the provider recently crashed.
* @throws FileNotFoundException if the provided URI could not be opened.
* @see #openAssetFileDescriptor(Uri, String)
*/
@@ -1563,8 +1566,9 @@ public abstract class ContentResolver implements ContentInterface {
* @param uri The desired URI to open.
* @param mode The file mode to use, as per {@link ContentProvider#openFile
* ContentProvider.openFile}.
- * @return Returns a new ParcelFileDescriptor pointing to the file. You
- * own this descriptor and are responsible for closing it when done.
+ * @return Returns a new ParcelFileDescriptor pointing to the file or {@code null} if the
+ * provider recently crashed. You own this descriptor and are responsible for closing it
+ * when done.
* @throws FileNotFoundException Throws FileNotFoundException if no
* file exists under the URI or the mode is invalid.
* @see #openAssetFileDescriptor(Uri, String)
@@ -1608,8 +1612,9 @@ public abstract class ContentResolver implements ContentInterface {
* @param cancellationSignal A signal to cancel the operation in progress,
* or null if none. If the operation is canceled, then
* {@link OperationCanceledException} will be thrown.
- * @return Returns a new ParcelFileDescriptor pointing to the file. You
- * own this descriptor and are responsible for closing it when done.
+ * @return Returns a new ParcelFileDescriptor pointing to the file or {@code null} if the
+ * provider recently crashed. You own this descriptor and are responsible for closing it
+ * when done.
* @throws FileNotFoundException Throws FileNotFoundException if no
* file exists under the URI or the mode is invalid.
* @see #openAssetFileDescriptor(Uri, String)
@@ -1698,8 +1703,9 @@ public abstract class ContentResolver implements ContentInterface {
* @param uri The desired URI to open.
* @param mode The file mode to use, as per {@link ContentProvider#openAssetFile
* ContentProvider.openAssetFile}.
- * @return Returns a new ParcelFileDescriptor pointing to the file. You
- * own this descriptor and are responsible for closing it when done.
+ * @return Returns a new ParcelFileDescriptor pointing to the file or {@code null} if the
+ * provider recently crashed. You own this descriptor and are responsible for closing it
+ * when done.
* @throws FileNotFoundException Throws FileNotFoundException of no
* file exists under the URI or the mode is invalid.
*/
@@ -1754,8 +1760,9 @@ public abstract class ContentResolver implements ContentInterface {
* @param cancellationSignal A signal to cancel the operation in progress, or null if
* none. If the operation is canceled, then
* {@link OperationCanceledException} will be thrown.
- * @return Returns a new ParcelFileDescriptor pointing to the file. You
- * own this descriptor and are responsible for closing it when done.
+ * @return Returns a new ParcelFileDescriptor pointing to the file or {@code null} if the
+ * provider recently crashed. You own this descriptor and are responsible for closing it
+ * when done.
* @throws FileNotFoundException Throws FileNotFoundException of no
* file exists under the URI or the mode is invalid.
*/
@@ -1902,9 +1909,9 @@ public abstract class ContentResolver implements ContentInterface {
* it is returning.
* @param opts Additional provider-dependent options.
* @return Returns a new ParcelFileDescriptor from which you can read the
- * data stream from the provider. Note that this may be a pipe, meaning
- * you can't seek in it. The only seek you should do is if the
- * AssetFileDescriptor contains an offset, to move to that offset before
+ * data stream from the provider or {@code null} if the provider recently crashed.
+ * Note that this may be a pipe, meaning you can't seek in it. The only seek you
+ * should do is if the AssetFileDescriptor contains an offset, to move to that offset before
* reading. You own this descriptor and are responsible for closing it when done.
* @throws FileNotFoundException Throws FileNotFoundException of no
* data of the desired type exists under the URI.
@@ -1938,9 +1945,9 @@ public abstract class ContentResolver implements ContentInterface {
* or null if none. If the operation is canceled, then
* {@link OperationCanceledException} will be thrown.
* @return Returns a new ParcelFileDescriptor from which you can read the
- * data stream from the provider. Note that this may be a pipe, meaning
- * you can't seek in it. The only seek you should do is if the
- * AssetFileDescriptor contains an offset, to move to that offset before
+ * data stream from the provider or {@code null} if the provider recently crashed.
+ * Note that this may be a pipe, meaning you can't seek in it. The only seek you
+ * should do is if the AssetFileDescriptor contains an offset, to move to that offset before
* reading. You own this descriptor and are responsible for closing it when done.
* @throws FileNotFoundException Throws FileNotFoundException of no
* data of the desired type exists under the URI.