diff options
| author | 2017-05-16 22:39:04 +0000 | |
|---|---|---|
| committer | 2017-05-16 22:39:04 +0000 | |
| commit | 3cd801dc24ef6124f8c587d0c0bdace4befdeaa0 (patch) | |
| tree | 60508f1f5c0ed086626378142da3e09a8a66559e | |
| parent | fc945bf67479d0dabb415acef69281b8be516bc3 (diff) | |
| parent | 146e8f415f08fee2b81c8d3567f52d2a6d1c977b (diff) | |
Merge "Specify behavior around DocumentsProvider#openDocument()." into oc-dev
am: 146e8f415f
Change-Id: I014761972a0803a1865dd6c18a95cfeacec7beb4
| -rw-r--r-- | core/java/android/os/ParcelFileDescriptor.java | 3 | ||||
| -rw-r--r-- | core/java/android/provider/DocumentsProvider.java | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/core/java/android/os/ParcelFileDescriptor.java b/core/java/android/os/ParcelFileDescriptor.java index 3212139b55b6..c091420a31d4 100644 --- a/core/java/android/os/ParcelFileDescriptor.java +++ b/core/java/android/os/ParcelFileDescriptor.java @@ -547,7 +547,8 @@ public class ParcelFileDescriptor implements Parcelable, Closeable { * Converts a string representing a file mode, such as "rw", into a bitmask suitable for use * with {@link #open}. * <p> - * @param mode The string representation of the file mode. + * @param mode The string representation of the file mode. Can be "r", "w", "wt", "wa", "rw" + * or "rwt". * @return A bitmask representing the given file mode. * @throws IllegalArgumentException if the given string does not match a known file mode. */ diff --git a/core/java/android/provider/DocumentsProvider.java b/core/java/android/provider/DocumentsProvider.java index 2a83c4b6a6ba..3eef31ad56aa 100644 --- a/core/java/android/provider/DocumentsProvider.java +++ b/core/java/android/provider/DocumentsProvider.java @@ -655,8 +655,12 @@ public abstract class DocumentsProvider extends ContentProvider { * <p> * Your provider should return a reliable {@link ParcelFileDescriptor} to * detect when the remote caller has finished reading or writing the - * document. You may return a pipe or socket pair if the mode is exclusively - * "r" or "w", but complex modes like "rw" imply a normal file on disk that + * document. + * <p> + * Mode "r" should always be supported. Provider should throw + * {@link UnsupportedOperationException} if the passing mode is not supported. + * You may return a pipe or socket pair if the mode is exclusively "r" or + * "w", but complex modes like "rw" imply a normal file on disk that * supports seeking. * <p> * If you block while downloading content, you should periodically check |