Expose NetworkSpecifier methods as SystemApi

Support for Wi-Fi mainline module.

Bug: 135998869
Test: build and make system-api-stubs-docs-update-current-api
Test: atest FrameworksNetTests
Change-Id: I88f00ca4f4cd51c71f7668b34f101fe7d1332c5c
Merged-In: Id705ee0f2b5c464f6d8ccc91f20dcb39dcf6f2b8
This commit is contained in:
Chiachang Wang
2020-01-09 10:22:47 +08:00
parent 9c8b644b83
commit 914a0fff2e
2 changed files with 24 additions and 1 deletions

View File

@@ -16,6 +16,9 @@
package android.net;
import android.annotation.Nullable;
import android.annotation.SystemApi;
/**
* Describes specific properties of a requested network for use in a {@link NetworkRequest}.
*
@@ -31,7 +34,8 @@ public abstract class NetworkSpecifier {
*
* @hide
*/
public abstract boolean satisfiedBy(NetworkSpecifier other);
@SystemApi
public abstract boolean satisfiedBy(@Nullable NetworkSpecifier other);
/**
* Optional method which can be overridden by concrete implementations of NetworkSpecifier to
@@ -45,6 +49,7 @@ public abstract class NetworkSpecifier {
*
* @hide
*/
@SystemApi
public void assertValidFromUid(int requestorUid) {
// empty
}
@@ -68,6 +73,8 @@ public abstract class NetworkSpecifier {
*
* @hide
*/
@SystemApi
@Nullable
public NetworkSpecifier redact() {
// TODO (b/122160111): convert default to null once all platform NetworkSpecifiers
// implement this method.