[NS08] Expose public NetworkScore API am: e3d2481792
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1723144 Change-Id: I6da6cfa821cbd2e0c9425de209370bb4e0b878a3
This commit is contained in:
@@ -343,6 +343,8 @@ package android.net {
|
||||
method public int describeContents();
|
||||
method public int getKeepConnectedReason();
|
||||
method public int getLegacyInt();
|
||||
method public boolean isExiting();
|
||||
method public boolean isTransportPrimary();
|
||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkScore> CREATOR;
|
||||
field public static final int KEEP_CONNECTED_FOR_HANDOVER = 1; // 0x1
|
||||
@@ -352,8 +354,10 @@ package android.net {
|
||||
public static final class NetworkScore.Builder {
|
||||
ctor public NetworkScore.Builder();
|
||||
method @NonNull public android.net.NetworkScore build();
|
||||
method @NonNull public android.net.NetworkScore.Builder setExiting(boolean);
|
||||
method @NonNull public android.net.NetworkScore.Builder setKeepConnectedReason(int);
|
||||
method @NonNull public android.net.NetworkScore.Builder setLegacyInt(int);
|
||||
method @NonNull public android.net.NetworkScore.Builder setTransportPrimary(boolean);
|
||||
}
|
||||
|
||||
public final class OemNetworkPreferences implements android.os.Parcelable {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user