Snap for 4706961 from 4f9d750e91061923da90ef174a592fc59d0eff9e to pi-release
Change-Id: I4260634c95472eac375aa3dfc5ec4ec45426897c
This commit is contained in:
@@ -305,6 +305,8 @@ public class NetworkStatsManager {
|
|||||||
* {@link java.lang.System#currentTimeMillis}.
|
* {@link java.lang.System#currentTimeMillis}.
|
||||||
* @param uid UID of app
|
* @param uid UID of app
|
||||||
* @param tag TAG of interest. Use {@link NetworkStats.Bucket#TAG_NONE} for no tags.
|
* @param tag TAG of interest. Use {@link NetworkStats.Bucket#TAG_NONE} for no tags.
|
||||||
|
* @param state state of interest. Use {@link NetworkStats.Bucket#STATE_ALL} to aggregate
|
||||||
|
* traffic from all states.
|
||||||
* @return Statistics object or null if an error happened during statistics collection.
|
* @return Statistics object or null if an error happened during statistics collection.
|
||||||
* @throws SecurityException if permissions are insufficient to read network statistics.
|
* @throws SecurityException if permissions are insufficient to read network statistics.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -684,14 +684,15 @@ public final class IpSecManager {
|
|||||||
* tunneled traffic.
|
* tunneled traffic.
|
||||||
*
|
*
|
||||||
* @param address the local address for traffic inside the tunnel
|
* @param address the local address for traffic inside the tunnel
|
||||||
|
* @param prefixLen length of the InetAddress prefix
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
|
@RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
|
||||||
public void addAddress(@NonNull LinkAddress address) throws IOException {
|
public void addAddress(@NonNull InetAddress address, int prefixLen) throws IOException {
|
||||||
try {
|
try {
|
||||||
mService.addAddressToTunnelInterface(
|
mService.addAddressToTunnelInterface(
|
||||||
mResourceId, address, mOpPackageName);
|
mResourceId, new LinkAddress(address, prefixLen), mOpPackageName);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw e.rethrowFromSystemServer();
|
throw e.rethrowFromSystemServer();
|
||||||
}
|
}
|
||||||
@@ -703,14 +704,15 @@ public final class IpSecManager {
|
|||||||
* <p>Remove an address which was previously added to the IpSecTunnelInterface
|
* <p>Remove an address which was previously added to the IpSecTunnelInterface
|
||||||
*
|
*
|
||||||
* @param address to be removed
|
* @param address to be removed
|
||||||
|
* @param prefixLen length of the InetAddress prefix
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
|
@RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS)
|
||||||
public void removeAddress(@NonNull LinkAddress address) throws IOException {
|
public void removeAddress(@NonNull InetAddress address, int prefixLen) throws IOException {
|
||||||
try {
|
try {
|
||||||
mService.removeAddressFromTunnelInterface(
|
mService.removeAddressFromTunnelInterface(
|
||||||
mResourceId, address, mOpPackageName);
|
mResourceId, new LinkAddress(address, prefixLen), mOpPackageName);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw e.rethrowFromSystemServer();
|
throw e.rethrowFromSystemServer();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user