diff options
author | Jeff Davidson <jpd@google.com> | 2018-02-08 15:30:06 -0800 |
---|---|---|
committer | Jeff Davidson <jpd@google.com> | 2018-02-08 15:30:06 -0800 |
commit | a192cc2a132cb0ee8588e2df755563ec7008c179 (patch) | |
tree | 380e4db22df19c819bd37df34bf06e7568916a50 /android/system | |
parent | 98fe7819c6d14f4f464a5cac047f9e82dee5da58 (diff) | |
download | android-28-a192cc2a132cb0ee8588e2df755563ec7008c179.tar.gz |
Update fullsdk to 4575844
/google/data/ro/projects/android/fetch_artifact \
--bid 4575844 \
--target sdk_phone_x86_64-sdk \
sdk-repo-linux-sources-4575844.zip
Test: TreeHugger
Change-Id: I81e0eb157b4ac3b38408d0ef86f9d6286471f87a
Diffstat (limited to 'android/system')
-rw-r--r-- | android/system/Os.java | 38 | ||||
-rw-r--r-- | android/system/OsConstants.java | 3 |
2 files changed, 13 insertions, 28 deletions
diff --git a/android/system/Os.java b/android/system/Os.java index cc24cc5e..a4b90e33 100644 --- a/android/system/Os.java +++ b/android/system/Os.java @@ -280,12 +280,7 @@ public final class Os { /** @hide */ public static int ioctlInt(FileDescriptor fd, int cmd, Int32Ref arg) throws ErrnoException { - libcore.util.MutableInt internalArg = new libcore.util.MutableInt(arg.value); - try { - return Libcore.os.ioctlInt(fd, cmd, internalArg); - } finally { - arg.value = internalArg.value; - } + return Libcore.os.ioctlInt(fd, cmd, arg); } /** @@ -472,18 +467,8 @@ public final class Os { /** * See <a href="http://man7.org/linux/man-pages/man2/sendfile.2.html">sendfile(2)</a>. */ - public static long sendfile(FileDescriptor outFd, FileDescriptor inFd, Int64Ref inOffset, long byteCount) throws ErrnoException { - if (inOffset == null) { - return Libcore.os.sendfile(outFd, inFd, null, byteCount); - } else { - libcore.util.MutableLong internalInOffset = new libcore.util.MutableLong( - inOffset.value); - try { - return Libcore.os.sendfile(outFd, inFd, internalInOffset, byteCount); - } finally { - inOffset.value = internalInOffset.value; - } - } + public static long sendfile(FileDescriptor outFd, FileDescriptor inFd, Int64Ref offset, long byteCount) throws ErrnoException { + return Libcore.os.sendfile(outFd, inFd, offset, byteCount); } /** @@ -587,6 +572,12 @@ public final class Os { public static void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { Libcore.os.socketpair(domain, type, protocol, fd1, fd2); } /** + * See <a href="http://man7.org/linux/man-pages/man2/splice.2.html">splice(2)</a>. + * @hide + */ + public static long splice(FileDescriptor fdIn, Int64Ref offIn, FileDescriptor fdOut, Int64Ref offOut, long len, int flags) throws ErrnoException { return Libcore.os.splice(fdIn, offIn, fdOut, offOut, len, flags); } + + /** * See <a href="http://man7.org/linux/man-pages/man2/stat.2.html">stat(2)</a>. */ public static StructStat stat(String path) throws ErrnoException { return Libcore.os.stat(path); } @@ -652,16 +643,7 @@ public final class Os { * @throws IllegalArgumentException if {@code status != null && status.length != 1} */ public static int waitpid(int pid, Int32Ref status, int options) throws ErrnoException { - if (status == null) { - return Libcore.os.waitpid(pid, null, options); - } else { - libcore.util.MutableInt internalStatus = new libcore.util.MutableInt(status.value); - try { - return Libcore.os.waitpid(pid, internalStatus, options); - } finally { - status.value = internalStatus.value; - } - } + return Libcore.os.waitpid(pid, status, options); } /** diff --git a/android/system/OsConstants.java b/android/system/OsConstants.java index 83a1b41a..1b8c2fff 100644 --- a/android/system/OsConstants.java +++ b/android/system/OsConstants.java @@ -486,6 +486,9 @@ public final class OsConstants { public static final int SO_SNDLOWAT = placeholder(); public static final int SO_SNDTIMEO = placeholder(); public static final int SO_TYPE = placeholder(); + /** @hide */ public static final int SPLICE_F_MOVE = placeholder(); + /** @hide */ public static final int SPLICE_F_NONBLOCK = placeholder(); + /** @hide */ public static final int SPLICE_F_MORE = placeholder(); public static final int STDERR_FILENO = placeholder(); public static final int STDIN_FILENO = placeholder(); public static final int STDOUT_FILENO = placeholder(); |