Add NetworkUtils utilities to SystemApi
attach*Filter and addArpEntry are necessary for the NetworkStack but are only usable for apps that have system permissions. Also includes system API for IpPrefix, LinkAddress, LinkProperties, Network, and static modifier in ApfCapabilities that were missed in previous CLs. Test: Builds, flashed, WiFi works Bug: 112869080 Change-Id: If141ae6a2f9145f5af64ba002ca44938f39b90a9
This commit is contained in:
parent
37053eb78e
commit
c7fe99fdbe
1 changed files with 14 additions and 3 deletions
|
|
@ -176,6 +176,7 @@ public class LinkAddress implements Parcelable {
|
|||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public LinkAddress(InetAddress address, int prefixLength) {
|
||||
this(address, prefixLength, 0, 0);
|
||||
this.scope = scopeForUnicastAddress(address);
|
||||
|
|
@ -199,6 +200,7 @@ public class LinkAddress implements Parcelable {
|
|||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public LinkAddress(String address) {
|
||||
this(address, 0, 0);
|
||||
this.scope = scopeForUnicastAddress(this.address);
|
||||
|
|
@ -212,6 +214,8 @@ public class LinkAddress implements Parcelable {
|
|||
* @param scope The address scope.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public LinkAddress(String address, int flags, int scope) {
|
||||
// This may throw an IllegalArgumentException; catching it is the caller's responsibility.
|
||||
// TODO: consider rejecting mapped IPv4 addresses such as "::ffff:192.0.2.5/24".
|
||||
|
|
|
|||
Loading…
Reference in a new issue