Merge "Allow Android to override access(2) and stat(2)."
diff --git a/luni/src/main/java/libcore/io/ForwardingOs.java b/luni/src/main/java/libcore/io/ForwardingOs.java
index c14b84f..41d0ca4 100644
--- a/luni/src/main/java/libcore/io/ForwardingOs.java
+++ b/luni/src/main/java/libcore/io/ForwardingOs.java
@@ -65,6 +65,7 @@
}
public FileDescriptor accept(FileDescriptor fd, SocketAddress peerAddress) throws ErrnoException, SocketException { return os.accept(fd, peerAddress); }
+ @libcore.api.CorePlatformApi
public boolean access(String path, int mode) throws ErrnoException { return os.access(path, mode); }
public InetAddress[] android_getaddrinfo(String node, StructAddrinfo hints, int netId) throws GaiException { return os.android_getaddrinfo(node, hints, netId); }
public void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.bind(fd, address, port); }
@@ -194,6 +195,7 @@
public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
public long splice(FileDescriptor fdIn, Int64Ref offIn, FileDescriptor fdOut, Int64Ref offOut, long len, int flags) throws ErrnoException { return os.splice(fdIn, offIn, fdOut, offOut, len, flags); }
+ @libcore.api.CorePlatformApi
public StructStat stat(String path) throws ErrnoException { return os.stat(path); }
public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
public String strerror(int errno) { return os.strerror(errno); }
diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt
index a647295..1851150 100644
--- a/mmodules/core_platform_api/api/platform/current-api.txt
+++ b/mmodules/core_platform_api/api/platform/current-api.txt
@@ -1031,7 +1031,9 @@
public class ForwardingOs implements libcore.io.Os {
ctor protected ForwardingOs(libcore.io.Os);
+ method public boolean access(java.lang.String, int) throws android.system.ErrnoException;
method public java.io.FileDescriptor open(java.lang.String, int, int) throws android.system.ErrnoException;
+ method public android.system.StructStat stat(java.lang.String) throws android.system.ErrnoException;
}
public final class IoBridge {
diff --git a/mmodules/core_platform_api/api/platform/last-api.txt b/mmodules/core_platform_api/api/platform/last-api.txt
index a647295..1851150 100644
--- a/mmodules/core_platform_api/api/platform/last-api.txt
+++ b/mmodules/core_platform_api/api/platform/last-api.txt
@@ -1031,7 +1031,9 @@
public class ForwardingOs implements libcore.io.Os {
ctor protected ForwardingOs(libcore.io.Os);
+ method public boolean access(java.lang.String, int) throws android.system.ErrnoException;
method public java.io.FileDescriptor open(java.lang.String, int, int) throws android.system.ErrnoException;
+ method public android.system.StructStat stat(java.lang.String) throws android.system.ErrnoException;
}
public final class IoBridge {