diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-05-17 02:16:56 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-05-17 02:17:01 +0000 |
| commit | 487231e79cecdded08f3ab060b77902ad5b9b0b1 (patch) | |
| tree | 0edffa4074b2c3d3d33f71d71a8ffd31e0b487db /core/java | |
| parent | 52f57cb7201ade08fb69cd7ee99671811c937be0 (diff) | |
| parent | 0a3b2c60f8edb45d3e9593c3a21a6cad33a995cf (diff) | |
Merge "Add more JSDoc about ErrnoException" into oc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/ProxyFileDescriptorCallback.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/core/java/android/os/ProxyFileDescriptorCallback.java b/core/java/android/os/ProxyFileDescriptorCallback.java index e69fb55abe8a..9f568026535c 100644 --- a/core/java/android/os/ProxyFileDescriptorCallback.java +++ b/core/java/android/os/ProxyFileDescriptorCallback.java @@ -22,7 +22,23 @@ import android.system.OsConstants; /** * Callback that handles file system requests from ProxyFileDescriptor. * - * @see android.os.storage.StorageManager#openProxyFileDescriptor(int, ProxyFileDescriptorCallback) + * All callback methods except for onRelease should throw {@link android.system.ErrnoException} + * with proper errno on errors. See + * <a href="http://man7.org/linux/man-pages/man3/errno.3.html">errno(3)</a> and + * {@link android.system.OsConstants}. + * + * Typical errnos are + * + * <ul> + * <li>{@link android.system.OsConstants#EIO} for general I/O issues + * <li>{@link android.system.OsConstants#ENOENT} when the file is not found + * <li>{@link android.system.OsConstants#EBADF} if the file doesn't allow read/write operations + * based on how it was opened. (For example, trying to write a file that was opened read-only.) + * <li>{@link android.system.OsConstants#ENOSPC} if you cannot handle a write operation to + * space/quota limitations. + * </ul> + * @see android.os.storage.StorageManager#openProxyFileDescriptor(int, ProxyFileDescriptorCallback, + * Handler) */ public abstract class ProxyFileDescriptorCallback { /** |
