Expose NetworkScore to external caller

NetworkScore will be a part of mainline module, so the external
callers cannot call its hidden APIs. Expose needed APIs to
the external callers.

CTS-Coverage-Bug: 182963397
Bug: 182963397
Test: m
Change-Id: Iddf8c71a5f51a40bc6ff78626b3e8ee530d1b7eb
Merged-In: Iddf8c71a5f51a40bc6ff78626b3e8ee530d1b7eb
  (cherry-picked from ag/13947595)
This commit is contained in:
lucaslin
2021-03-23 16:17:37 +08:00
committed by Lucas Lin
parent 074c7d7537
commit 39907ba9d6
2 changed files with 17 additions and 1 deletions

View File

@@ -17,6 +17,7 @@
package android.net;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -29,7 +30,7 @@ import com.android.internal.annotations.VisibleForTesting;
* network is considered for a particular use.
* @hide
*/
// TODO : @SystemApi when the implementation is complete
@SystemApi
public final class NetworkScore implements Parcelable {
// This will be removed soon. Do *NOT* depend on it for any new code that is not part of
// a migration.
@@ -62,6 +63,8 @@ public final class NetworkScore implements Parcelable {
/**
* @return whether this score has a particular policy.
*
* @hide
*/
@VisibleForTesting
public boolean hasPolicy(final int policy) {