Merge "Track deprecation/replacement of Os methods that depend on Mutable*"
This commit is contained in:
@@ -38005,6 +38005,16 @@ package android.system {
|
||||
field public final int errno;
|
||||
}
|
||||
|
||||
public class Int32Ref {
|
||||
ctor public Int32Ref(int);
|
||||
field public int value;
|
||||
}
|
||||
|
||||
public class Int64Ref {
|
||||
ctor public Int64Ref(long);
|
||||
field public long value;
|
||||
}
|
||||
|
||||
public final class Os {
|
||||
method public static java.io.FileDescriptor accept(java.io.FileDescriptor, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static boolean access(java.lang.String, int) throws android.system.ErrnoException;
|
||||
@@ -38074,7 +38084,8 @@ package android.system {
|
||||
method public static void remove(java.lang.String) throws android.system.ErrnoException;
|
||||
method public static void removexattr(java.lang.String, java.lang.String) throws android.system.ErrnoException;
|
||||
method public static void rename(java.lang.String, java.lang.String) throws android.system.ErrnoException;
|
||||
method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.util.MutableLong, long) throws android.system.ErrnoException;
|
||||
method public static deprecated long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.util.MutableLong, long) throws android.system.ErrnoException;
|
||||
method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.system.Int64Ref, long) throws android.system.ErrnoException;
|
||||
method public static int sendto(java.io.FileDescriptor, java.nio.ByteBuffer, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static void setegid(int) throws android.system.ErrnoException;
|
||||
@@ -38099,7 +38110,8 @@ package android.system {
|
||||
method public static int umask(int);
|
||||
method public static android.system.StructUtsname uname();
|
||||
method public static void unsetenv(java.lang.String) throws android.system.ErrnoException;
|
||||
method public static int waitpid(int, android.util.MutableInt, int) throws android.system.ErrnoException;
|
||||
method public static deprecated int waitpid(int, android.util.MutableInt, int) throws android.system.ErrnoException;
|
||||
method public static int waitpid(int, android.system.Int32Ref, int) throws android.system.ErrnoException;
|
||||
method public static int write(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
method public static int write(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
method public static int writev(java.io.FileDescriptor, java.lang.Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
|
||||
@@ -41219,6 +41219,16 @@ package android.system {
|
||||
field public final int errno;
|
||||
}
|
||||
|
||||
public class Int32Ref {
|
||||
ctor public Int32Ref(int);
|
||||
field public int value;
|
||||
}
|
||||
|
||||
public class Int64Ref {
|
||||
ctor public Int64Ref(long);
|
||||
field public long value;
|
||||
}
|
||||
|
||||
public final class Os {
|
||||
method public static java.io.FileDescriptor accept(java.io.FileDescriptor, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static boolean access(java.lang.String, int) throws android.system.ErrnoException;
|
||||
@@ -41288,7 +41298,8 @@ package android.system {
|
||||
method public static void remove(java.lang.String) throws android.system.ErrnoException;
|
||||
method public static void removexattr(java.lang.String, java.lang.String) throws android.system.ErrnoException;
|
||||
method public static void rename(java.lang.String, java.lang.String) throws android.system.ErrnoException;
|
||||
method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.util.MutableLong, long) throws android.system.ErrnoException;
|
||||
method public static deprecated long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.util.MutableLong, long) throws android.system.ErrnoException;
|
||||
method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.system.Int64Ref, long) throws android.system.ErrnoException;
|
||||
method public static int sendto(java.io.FileDescriptor, java.nio.ByteBuffer, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static void setegid(int) throws android.system.ErrnoException;
|
||||
@@ -41313,7 +41324,8 @@ package android.system {
|
||||
method public static int umask(int);
|
||||
method public static android.system.StructUtsname uname();
|
||||
method public static void unsetenv(java.lang.String) throws android.system.ErrnoException;
|
||||
method public static int waitpid(int, android.util.MutableInt, int) throws android.system.ErrnoException;
|
||||
method public static deprecated int waitpid(int, android.util.MutableInt, int) throws android.system.ErrnoException;
|
||||
method public static int waitpid(int, android.system.Int32Ref, int) throws android.system.ErrnoException;
|
||||
method public static int write(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
method public static int write(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
method public static int writev(java.io.FileDescriptor, java.lang.Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
|
||||
@@ -38212,6 +38212,16 @@ package android.system {
|
||||
field public final int errno;
|
||||
}
|
||||
|
||||
public class Int32Ref {
|
||||
ctor public Int32Ref(int);
|
||||
field public int value;
|
||||
}
|
||||
|
||||
public class Int64Ref {
|
||||
ctor public Int64Ref(long);
|
||||
field public long value;
|
||||
}
|
||||
|
||||
public final class Os {
|
||||
method public static java.io.FileDescriptor accept(java.io.FileDescriptor, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static boolean access(java.lang.String, int) throws android.system.ErrnoException;
|
||||
@@ -38281,7 +38291,8 @@ package android.system {
|
||||
method public static void remove(java.lang.String) throws android.system.ErrnoException;
|
||||
method public static void removexattr(java.lang.String, java.lang.String) throws android.system.ErrnoException;
|
||||
method public static void rename(java.lang.String, java.lang.String) throws android.system.ErrnoException;
|
||||
method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.util.MutableLong, long) throws android.system.ErrnoException;
|
||||
method public static deprecated long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.util.MutableLong, long) throws android.system.ErrnoException;
|
||||
method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.system.Int64Ref, long) throws android.system.ErrnoException;
|
||||
method public static int sendto(java.io.FileDescriptor, java.nio.ByteBuffer, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
|
||||
method public static void setegid(int) throws android.system.ErrnoException;
|
||||
@@ -38306,7 +38317,8 @@ package android.system {
|
||||
method public static int umask(int);
|
||||
method public static android.system.StructUtsname uname();
|
||||
method public static void unsetenv(java.lang.String) throws android.system.ErrnoException;
|
||||
method public static int waitpid(int, android.util.MutableInt, int) throws android.system.ErrnoException;
|
||||
method public static deprecated int waitpid(int, android.util.MutableInt, int) throws android.system.ErrnoException;
|
||||
method public static int waitpid(int, android.system.Int32Ref, int) throws android.system.ErrnoException;
|
||||
method public static int write(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
method public static int write(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
method public static int writev(java.io.FileDescriptor, java.lang.Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
|
||||
|
||||
@@ -16,18 +16,18 @@
|
||||
|
||||
package android.net;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.FileDescriptor;
|
||||
import java.net.SocketOptions;
|
||||
|
||||
import android.system.ErrnoException;
|
||||
import android.system.Int32Ref;
|
||||
import android.system.Os;
|
||||
import android.system.OsConstants;
|
||||
import android.system.StructLinger;
|
||||
import android.system.StructTimeval;
|
||||
import android.util.MutableInt;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.SocketOptions;
|
||||
|
||||
/**
|
||||
* Socket implementation used for android.net.LocalSocket and
|
||||
@@ -62,7 +62,7 @@ class LocalSocketImpl
|
||||
FileDescriptor myFd = fd;
|
||||
if (myFd == null) throw new IOException("socket closed");
|
||||
|
||||
MutableInt avail = new MutableInt(0);
|
||||
Int32Ref avail = new Int32Ref(0);
|
||||
try {
|
||||
Os.ioctlInt(myFd, OsConstants.FIONREAD, avail);
|
||||
} catch (ErrnoException e) {
|
||||
@@ -167,7 +167,7 @@ class LocalSocketImpl
|
||||
if (myFd == null) throw new IOException("socket closed");
|
||||
|
||||
// Loop until the output buffer is empty.
|
||||
MutableInt pending = new MutableInt(0);
|
||||
Int32Ref pending = new Int32Ref(0);
|
||||
while (true) {
|
||||
try {
|
||||
// See linux/net/unix/af_unix.c
|
||||
|
||||
Reference in New Issue
Block a user