Merge changes from topics "api-fix-networkagent", "networkprovider_api", "satisfiedby" into rvc-dev am: 199c91b659
Change-Id: Ie0cf94ac30f7edd36aaf82344c68a18d13d7a45c
This commit is contained in:
@@ -1122,7 +1122,7 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
}
|
||||
|
||||
private boolean satisfiedBySpecifier(NetworkCapabilities nc) {
|
||||
return mNetworkSpecifier == null || mNetworkSpecifier.satisfiedBy(nc.mNetworkSpecifier)
|
||||
return mNetworkSpecifier == null || mNetworkSpecifier.canBeSatisfiedBy(nc.mNetworkSpecifier)
|
||||
|| nc.mNetworkSpecifier instanceof MatchAllNetworkSpecifier;
|
||||
}
|
||||
|
||||
|
||||
@@ -474,7 +474,7 @@ public class NetworkRequest implements Parcelable {
|
||||
* @param nc Capabilities that should satisfy this NetworkRequest. null capabilities do not
|
||||
* satisfy any request.
|
||||
*/
|
||||
public boolean satisfiedBy(@Nullable NetworkCapabilities nc) {
|
||||
public boolean canBeSatisfiedBy(@Nullable NetworkCapabilities nc) {
|
||||
return networkCapabilities.satisfiedByNetworkCapabilities(nc);
|
||||
}
|
||||
|
||||
|
||||
@@ -2911,7 +2911,7 @@ public class ConnectivityServiceTest {
|
||||
class ConfidentialMatchAllNetworkSpecifier extends NetworkSpecifier implements
|
||||
Parcelable {
|
||||
@Override
|
||||
public boolean satisfiedBy(NetworkSpecifier other) {
|
||||
public boolean canBeSatisfiedBy(NetworkSpecifier other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2939,7 +2939,7 @@ public class ConnectivityServiceTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean satisfiedBy(NetworkSpecifier other) {
|
||||
public boolean canBeSatisfiedBy(NetworkSpecifier other) {
|
||||
if (other instanceof LocalStringNetworkSpecifier) {
|
||||
return TextUtils.equals(mString,
|
||||
((LocalStringNetworkSpecifier) other).mString);
|
||||
@@ -3060,7 +3060,10 @@ public class ConnectivityServiceTest {
|
||||
});
|
||||
|
||||
class NonParcelableSpecifier extends NetworkSpecifier {
|
||||
public boolean satisfiedBy(NetworkSpecifier other) { return false; }
|
||||
@Override
|
||||
public boolean canBeSatisfiedBy(NetworkSpecifier other) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
class ParcelableSpecifier extends NonParcelableSpecifier implements Parcelable {
|
||||
@Override public int describeContents() { return 0; }
|
||||
|
||||
Reference in New Issue
Block a user