[NS08] Expose public NetworkScore API

This exposes the two bits settable by the network agents in
Android S on NetworkScore. This is meant to be extensible in
future releases, or possibly for OEM upstreams.

Test: builds
CTS-Coverage-Bug: 184037351
Bug: 167544279
Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Merged-In: Id7ee1bd3e2679f0bd5200d5c299f18a33b87847c
Change-Id: Id7ee1bd3e2679f0bd5200d5c299f18a33b87847c
  (cherry-picked from ag/14010221)
This commit is contained in:
Chalard Jean
2021-03-29 14:59:14 +09:00
committed by Junyu Lai
parent f3ff362210
commit e3d2481792
2 changed files with 8 additions and 4 deletions

View File

@@ -146,7 +146,7 @@ public final class NetworkScore implements Parcelable {
*
* @hide
*/
// TODO : @SystemApi
@SystemApi
public boolean isTransportPrimary() {
return hasPolicy(POLICY_TRANSPORT_PRIMARY);
}
@@ -163,7 +163,7 @@ public final class NetworkScore implements Parcelable {
*
* @hide
*/
// TODO : @SystemApi
@SystemApi
public boolean isExiting() {
return hasPolicy(POLICY_EXITING);
}
@@ -256,7 +256,7 @@ public final class NetworkScore implements Parcelable {
* @return this builder
* @hide
*/
// TODO : @SystemApi
@SystemApi
@NonNull
public Builder setTransportPrimary(final boolean val) {
if (val) {
@@ -281,7 +281,7 @@ public final class NetworkScore implements Parcelable {
* @return this builder
* @hide
*/
// TODO : @SystemApi
@SystemApi
@NonNull
public Builder setExiting(final boolean val) {
if (val) {