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:
commit
f12eff79db
1 changed files with 76 additions and 0 deletions
|
|
@ -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}.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue