Merge "Disable sockets and DNS if process lacks INTERNET permission." into rvc-dev am: bbcd3b326b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11881939

Change-Id: I7c285a848ac947e0acf1acc8bc32f3ece3456412
This commit is contained in:
Luke Huang 2020-06-18 03:23:46 +00:00 • committed by Automerger Merge Worker
commit f12eff79db

View file

@ -154,6 +154,14 @@ public class NetworkUtils {
*/
public static native Network getDnsNetwork() throws ErrnoException;
/**
* Allow/Disallow creating AF_INET/AF_INET6 sockets and DNS lookups for current process.
*
* @param allowNetworking whether to allow or disallow creating AF_INET/AF_INET6 sockets
* and DNS lookups.
*/
public static native void setAllowNetworkingForProcess(boolean allowNetworking);
/**
* Get the tcp repair window associated with the {@code fd}.
*