diff options
| author | 2021-06-03 09:36:30 +0000 | |
|---|---|---|
| committer | 2021-06-03 09:36:30 +0000 | |
| commit | 0603614a1ef2d15dd6a655fc3e5314699730e01c (patch) | |
| tree | e1f36f0147ee6022d8317e0447fb23b4d2fe1457 | |
| parent | d404946c56a7a13585a489c2e28791ec28d9da38 (diff) | |
| parent | 3729ef8690fb114f347405051622e54d66a4bcb7 (diff) | |
Merge "Add NDK API for getprocnetwork" am: 3729ef8690
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1722536
Change-Id: I5e338caa19200c783a96fafe670412c993bbc345
| -rw-r--r-- | include/android/multinetwork.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/android/multinetwork.h b/include/android/multinetwork.h index 424299d664..fa7759393c 100644 --- a/include/android/multinetwork.h +++ b/include/android/multinetwork.h @@ -83,7 +83,7 @@ int android_setsocknetwork(net_handle_t network, int fd) __INTRODUCED_IN(23); * * To clear a previous process binding, invoke with NETWORK_UNSPECIFIED. * - * This is the equivalent of: [android.net.ConnectivityManager#setProcessDefaultNetwork()](https://developer.android.com/reference/android/net/ConnectivityManager.html#setProcessDefaultNetwork(android.net.Network)) + * This is the equivalent of: [android.net.ConnectivityManager#bindProcessToNetwork()](https://developer.android.com/reference/android/net/ConnectivityManager.html#bindProcessToNetwork(android.net.Network)) * * Available since API level 23. */ @@ -91,6 +91,19 @@ int android_setprocnetwork(net_handle_t network) __INTRODUCED_IN(23); /** + * Gets the |network| bound to the current process, as per android_setprocnetwork. + * + * This is the equivalent of: [android.net.ConnectivityManager#getBoundNetworkForProcess()](https://developer.android.com/reference/android/net/ConnectivityManager.html#getBoundNetworkForProcess(android.net.Network)) + * Returns 0 on success, or -1 setting errno to EINVAL if a null pointer is + * passed in. + * + * + * Available since API level 31. + */ +int android_getprocnetwork(net_handle_t *network) __INTRODUCED_IN(31); + + +/** * Perform hostname resolution via the DNS servers associated with |network|. * * All arguments (apart from |network|) are used identically as those passed |