Add a new ssid field in NetworkCapabilities.
Clean cherry-pick of ag/3887737 Bug: 77891227 Test: frameworks-net Change-Id: Icefe1657bca52b913a72b56705342a7285769658 Merged-In: Ia1f4e51b7c2e9118789242cf6d9e7576c4167cda Merged-In: I6dd1aba6fde5a502b4a9145cf16393d8ce623c89
This commit is contained in:
@@ -70,6 +70,7 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
mUids = nc.mUids;
|
mUids = nc.mUids;
|
||||||
mEstablishingVpnAppUid = nc.mEstablishingVpnAppUid;
|
mEstablishingVpnAppUid = nc.mEstablishingVpnAppUid;
|
||||||
mUnwantedNetworkCapabilities = nc.mUnwantedNetworkCapabilities;
|
mUnwantedNetworkCapabilities = nc.mUnwantedNetworkCapabilities;
|
||||||
|
mSSID = nc.mSSID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,6 +86,7 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
mSignalStrength = SIGNAL_STRENGTH_UNSPECIFIED;
|
mSignalStrength = SIGNAL_STRENGTH_UNSPECIFIED;
|
||||||
mUids = null;
|
mUids = null;
|
||||||
mEstablishingVpnAppUid = INVALID_UID;
|
mEstablishingVpnAppUid = INVALID_UID;
|
||||||
|
mSSID = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -922,7 +924,7 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Sets the signal strength. This is a signed integer, with higher values indicating a stronger
|
* Sets the signal strength. This is a signed integer, with higher values indicating a stronger
|
||||||
* signal. The exact units are bearer-dependent. For example, Wi-Fi uses the same RSSI units
|
* signal. The exact units are bearer-dependent. For example, Wi-Fi uses the same RSSI units
|
||||||
* reported by WifiManager.
|
* reported by wifi code.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that when used to register a network callback, this specifies the minimum acceptable
|
* Note that when used to register a network callback, this specifies the minimum acceptable
|
||||||
* signal strength. When received as the state of an existing network it specifies the current
|
* signal strength. When received as the state of an existing network it specifies the current
|
||||||
@@ -1054,7 +1056,7 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests if the set of UIDs that this network applies to is the same of the passed set of UIDs.
|
* Tests if the set of UIDs that this network applies to is the same as the passed network.
|
||||||
* <p>
|
* <p>
|
||||||
* This test only checks whether equal range objects are in both sets. It will
|
* This test only checks whether equal range objects are in both sets. It will
|
||||||
* return false if the ranges are not exactly the same, even if the covered UIDs
|
* return false if the ranges are not exactly the same, even if the covered UIDs
|
||||||
@@ -1144,6 +1146,62 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
mUids.addAll(nc.mUids);
|
mUids.addAll(nc.mUids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SSID of the network, or null if not applicable or unknown.
|
||||||
|
* <p>
|
||||||
|
* This is filled in by wifi code.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
private String mSSID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the SSID of this network.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public NetworkCapabilities setSSID(String ssid) {
|
||||||
|
mSSID = ssid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the SSID of this network, or null if none or unknown.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public String getSSID() {
|
||||||
|
return mSSID;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if the SSID of this network is the same as the SSID of the passed network.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean equalsSSID(NetworkCapabilities nc) {
|
||||||
|
return Objects.equals(mSSID, nc.mSSID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the SSID requirements of this object are matched by the passed object.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean satisfiedBySSID(NetworkCapabilities nc) {
|
||||||
|
return mSSID == null || mSSID.equals(nc.mSSID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Combine SSIDs of the capabilities.
|
||||||
|
* <p>
|
||||||
|
* This is only legal if either the SSID of this object is null, or both SSIDs are
|
||||||
|
* equal.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
private void combineSSIDs(NetworkCapabilities nc) {
|
||||||
|
if (mSSID != null && !mSSID.equals(nc.mSSID)) {
|
||||||
|
throw new IllegalStateException("Can't combine two SSIDs");
|
||||||
|
}
|
||||||
|
setSSID(nc.mSSID);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combine a set of Capabilities to this one. Useful for coming up with the complete set.
|
* Combine a set of Capabilities to this one. Useful for coming up with the complete set.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -1159,6 +1217,7 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
combineSpecifiers(nc);
|
combineSpecifiers(nc);
|
||||||
combineSignalStrength(nc);
|
combineSignalStrength(nc);
|
||||||
combineUids(nc);
|
combineUids(nc);
|
||||||
|
combineSSIDs(nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1177,7 +1236,8 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
&& (onlyImmutable || satisfiedByLinkBandwidths(nc))
|
&& (onlyImmutable || satisfiedByLinkBandwidths(nc))
|
||||||
&& satisfiedBySpecifier(nc)
|
&& satisfiedBySpecifier(nc)
|
||||||
&& (onlyImmutable || satisfiedBySignalStrength(nc))
|
&& (onlyImmutable || satisfiedBySignalStrength(nc))
|
||||||
&& (onlyImmutable || satisfiedByUids(nc)));
|
&& (onlyImmutable || satisfiedByUids(nc))
|
||||||
|
&& (onlyImmutable || satisfiedBySSID(nc)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1266,7 +1326,8 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
&& equalsLinkBandwidths(that)
|
&& equalsLinkBandwidths(that)
|
||||||
&& equalsSignalStrength(that)
|
&& equalsSignalStrength(that)
|
||||||
&& equalsSpecifier(that)
|
&& equalsSpecifier(that)
|
||||||
&& equalsUids(that));
|
&& equalsUids(that)
|
||||||
|
&& equalsSSID(that));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1281,7 +1342,8 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
+ (mLinkDownBandwidthKbps * 19)
|
+ (mLinkDownBandwidthKbps * 19)
|
||||||
+ Objects.hashCode(mNetworkSpecifier) * 23
|
+ Objects.hashCode(mNetworkSpecifier) * 23
|
||||||
+ (mSignalStrength * 29)
|
+ (mSignalStrength * 29)
|
||||||
+ Objects.hashCode(mUids) * 31;
|
+ Objects.hashCode(mUids) * 31
|
||||||
|
+ Objects.hashCode(mSSID) * 37;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1298,6 +1360,7 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
dest.writeParcelable((Parcelable) mNetworkSpecifier, flags);
|
dest.writeParcelable((Parcelable) mNetworkSpecifier, flags);
|
||||||
dest.writeInt(mSignalStrength);
|
dest.writeInt(mSignalStrength);
|
||||||
dest.writeArraySet(mUids);
|
dest.writeArraySet(mUids);
|
||||||
|
dest.writeString(mSSID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Creator<NetworkCapabilities> CREATOR =
|
public static final Creator<NetworkCapabilities> CREATOR =
|
||||||
@@ -1315,6 +1378,7 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
netCap.mSignalStrength = in.readInt();
|
netCap.mSignalStrength = in.readInt();
|
||||||
netCap.mUids = (ArraySet<UidRange>) in.readArraySet(
|
netCap.mUids = (ArraySet<UidRange>) in.readArraySet(
|
||||||
null /* ClassLoader, null for default */);
|
null /* ClassLoader, null for default */);
|
||||||
|
netCap.mSSID = in.readString();
|
||||||
return netCap;
|
return netCap;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@@ -1365,6 +1429,10 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
sb.append(" EstablishingAppUid: ").append(mEstablishingVpnAppUid);
|
sb.append(" EstablishingAppUid: ").append(mEstablishingVpnAppUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null != mSSID) {
|
||||||
|
sb.append(" SSID: ").append(mSSID);
|
||||||
|
}
|
||||||
|
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1354,7 +1354,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
if (nai != null) {
|
if (nai != null) {
|
||||||
synchronized (nai) {
|
synchronized (nai) {
|
||||||
if (nai.networkCapabilities != null) {
|
if (nai.networkCapabilities != null) {
|
||||||
return networkCapabilitiesWithoutUidsUnlessAllowed(nai.networkCapabilities,
|
return networkCapabilitiesRestrictedForCallerPermissions(
|
||||||
|
nai.networkCapabilities,
|
||||||
Binder.getCallingPid(), Binder.getCallingUid());
|
Binder.getCallingPid(), Binder.getCallingUid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1368,10 +1369,12 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
return getNetworkCapabilitiesInternal(getNetworkAgentInfoForNetwork(network));
|
return getNetworkCapabilitiesInternal(getNetworkAgentInfoForNetwork(network));
|
||||||
}
|
}
|
||||||
|
|
||||||
private NetworkCapabilities networkCapabilitiesWithoutUidsUnlessAllowed(
|
private NetworkCapabilities networkCapabilitiesRestrictedForCallerPermissions(
|
||||||
NetworkCapabilities nc, int callerPid, int callerUid) {
|
NetworkCapabilities nc, int callerPid, int callerUid) {
|
||||||
if (checkSettingsPermission(callerPid, callerUid)) return new NetworkCapabilities(nc);
|
final NetworkCapabilities newNc = new NetworkCapabilities(nc);
|
||||||
return new NetworkCapabilities(nc).setUids(null);
|
if (!checkSettingsPermission(callerPid, callerUid)) newNc.setUids(null);
|
||||||
|
if (!checkNetworkStackPermission(callerPid, callerUid)) newNc.setSSID(null);
|
||||||
|
return newNc;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void restrictRequestUidsForCaller(NetworkCapabilities nc) {
|
private void restrictRequestUidsForCaller(NetworkCapabilities nc) {
|
||||||
@@ -1630,6 +1633,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
android.Manifest.permission.NETWORK_SETTINGS, pid, uid);
|
android.Manifest.permission.NETWORK_SETTINGS, pid, uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean checkNetworkStackPermission(int pid, int uid) {
|
||||||
|
return PERMISSION_GRANTED == mContext.checkPermission(
|
||||||
|
android.Manifest.permission.NETWORK_STACK, pid, uid);
|
||||||
|
}
|
||||||
|
|
||||||
private void enforceTetherAccessPermission() {
|
private void enforceTetherAccessPermission() {
|
||||||
mContext.enforceCallingOrSelfPermission(
|
mContext.enforceCallingOrSelfPermission(
|
||||||
android.Manifest.permission.ACCESS_NETWORK_STATE,
|
android.Manifest.permission.ACCESS_NETWORK_STATE,
|
||||||
@@ -4185,6 +4193,15 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This checks that the passed capabilities either do not request a specific SSID, or the
|
||||||
|
// calling app has permission to do so.
|
||||||
|
private void ensureSufficientPermissionsForRequest(NetworkCapabilities nc,
|
||||||
|
int callerPid, int callerUid) {
|
||||||
|
if (null != nc.getSSID() && !checkNetworkStackPermission(callerPid, callerUid)) {
|
||||||
|
throw new SecurityException("Insufficient permissions to request a specific SSID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private ArrayList<Integer> getSignalStrengthThresholds(NetworkAgentInfo nai) {
|
private ArrayList<Integer> getSignalStrengthThresholds(NetworkAgentInfo nai) {
|
||||||
final SortedSet<Integer> thresholds = new TreeSet();
|
final SortedSet<Integer> thresholds = new TreeSet();
|
||||||
synchronized (nai) {
|
synchronized (nai) {
|
||||||
@@ -4254,6 +4271,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
enforceMeteredApnPolicy(networkCapabilities);
|
enforceMeteredApnPolicy(networkCapabilities);
|
||||||
}
|
}
|
||||||
ensureRequestableCapabilities(networkCapabilities);
|
ensureRequestableCapabilities(networkCapabilities);
|
||||||
|
ensureSufficientPermissionsForRequest(networkCapabilities,
|
||||||
|
Binder.getCallingPid(), Binder.getCallingUid());
|
||||||
// Set the UID range for this request to the single UID of the requester, or to an empty
|
// Set the UID range for this request to the single UID of the requester, or to an empty
|
||||||
// set of UIDs if the caller has the appropriate permission and UIDs have not been set.
|
// set of UIDs if the caller has the appropriate permission and UIDs have not been set.
|
||||||
// This will overwrite any allowed UIDs in the requested capabilities. Though there
|
// This will overwrite any allowed UIDs in the requested capabilities. Though there
|
||||||
@@ -4332,6 +4351,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
enforceNetworkRequestPermissions(networkCapabilities);
|
enforceNetworkRequestPermissions(networkCapabilities);
|
||||||
enforceMeteredApnPolicy(networkCapabilities);
|
enforceMeteredApnPolicy(networkCapabilities);
|
||||||
ensureRequestableCapabilities(networkCapabilities);
|
ensureRequestableCapabilities(networkCapabilities);
|
||||||
|
ensureSufficientPermissionsForRequest(networkCapabilities,
|
||||||
|
Binder.getCallingPid(), Binder.getCallingUid());
|
||||||
ensureValidNetworkSpecifier(networkCapabilities);
|
ensureValidNetworkSpecifier(networkCapabilities);
|
||||||
restrictRequestUidsForCaller(networkCapabilities);
|
restrictRequestUidsForCaller(networkCapabilities);
|
||||||
|
|
||||||
@@ -4387,6 +4408,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
|
NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
|
||||||
|
ensureSufficientPermissionsForRequest(networkCapabilities,
|
||||||
|
Binder.getCallingPid(), Binder.getCallingUid());
|
||||||
restrictRequestUidsForCaller(nc);
|
restrictRequestUidsForCaller(nc);
|
||||||
// Apps without the CHANGE_NETWORK_STATE permission can't use background networks, so
|
// Apps without the CHANGE_NETWORK_STATE permission can't use background networks, so
|
||||||
// make all their listens include NET_CAPABILITY_FOREGROUND. That way, they will get
|
// make all their listens include NET_CAPABILITY_FOREGROUND. That way, they will get
|
||||||
@@ -4413,6 +4436,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
enforceAccessPermission();
|
enforceAccessPermission();
|
||||||
}
|
}
|
||||||
ensureValidNetworkSpecifier(networkCapabilities);
|
ensureValidNetworkSpecifier(networkCapabilities);
|
||||||
|
ensureSufficientPermissionsForRequest(networkCapabilities,
|
||||||
|
Binder.getCallingPid(), Binder.getCallingUid());
|
||||||
|
|
||||||
final NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
|
final NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
|
||||||
restrictRequestUidsForCaller(nc);
|
restrictRequestUidsForCaller(nc);
|
||||||
@@ -4984,7 +5009,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
}
|
}
|
||||||
case ConnectivityManager.CALLBACK_CAP_CHANGED: {
|
case ConnectivityManager.CALLBACK_CAP_CHANGED: {
|
||||||
// networkAgent can't be null as it has been accessed a few lines above.
|
// networkAgent can't be null as it has been accessed a few lines above.
|
||||||
final NetworkCapabilities nc = networkCapabilitiesWithoutUidsUnlessAllowed(
|
final NetworkCapabilities nc = networkCapabilitiesRestrictedForCallerPermissions(
|
||||||
networkAgent.networkCapabilities, nri.mPid, nri.mUid);
|
networkAgent.networkCapabilities, nri.mPid, nri.mUid);
|
||||||
putParcelable(bundle, nc);
|
putParcelable(bundle, nc);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -40,12 +40,14 @@ import static org.junit.Assert.assertEquals;
|
|||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
import static org.junit.Assert.assertNotEquals;
|
import static org.junit.Assert.assertNotEquals;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.support.test.runner.AndroidJUnit4;
|
import android.support.test.runner.AndroidJUnit4;
|
||||||
import android.test.suitebuilder.annotation.SmallTest;
|
import android.test.suitebuilder.annotation.SmallTest;
|
||||||
import android.util.ArraySet;
|
import android.util.ArraySet;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@@ -54,6 +56,8 @@ import java.util.Set;
|
|||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public class NetworkCapabilitiesTest {
|
public class NetworkCapabilitiesTest {
|
||||||
|
private static final String TEST_SSID = "TEST_SSID";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMaybeMarkCapabilitiesRestricted() {
|
public void testMaybeMarkCapabilitiesRestricted() {
|
||||||
// verify EIMS is restricted
|
// verify EIMS is restricted
|
||||||
@@ -268,6 +272,8 @@ public class NetworkCapabilitiesTest {
|
|||||||
.addCapability(NET_CAPABILITY_EIMS)
|
.addCapability(NET_CAPABILITY_EIMS)
|
||||||
.addCapability(NET_CAPABILITY_NOT_METERED);
|
.addCapability(NET_CAPABILITY_NOT_METERED);
|
||||||
assertEqualsThroughMarshalling(netCap);
|
assertEqualsThroughMarshalling(netCap);
|
||||||
|
netCap.setSSID(TEST_SSID);
|
||||||
|
assertEqualsThroughMarshalling(netCap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -361,6 +367,21 @@ public class NetworkCapabilitiesTest {
|
|||||||
assertTrue(nc1.equalsNetCapabilities(nc2));
|
assertTrue(nc1.equalsNetCapabilities(nc2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSSID() {
|
||||||
|
NetworkCapabilities nc1 = new NetworkCapabilities();
|
||||||
|
NetworkCapabilities nc2 = new NetworkCapabilities();
|
||||||
|
assertTrue(nc2.satisfiedBySSID(nc1));
|
||||||
|
|
||||||
|
nc1.setSSID(TEST_SSID);
|
||||||
|
assertTrue(nc2.satisfiedBySSID(nc1));
|
||||||
|
nc2.setSSID("different " + TEST_SSID);
|
||||||
|
assertFalse(nc2.satisfiedBySSID(nc1));
|
||||||
|
|
||||||
|
assertTrue(nc1.satisfiedByImmutableNetworkCapabilities(nc2));
|
||||||
|
assertFalse(nc1.satisfiedByNetworkCapabilities(nc2));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCombineCapabilities() {
|
public void testCombineCapabilities() {
|
||||||
NetworkCapabilities nc1 = new NetworkCapabilities();
|
NetworkCapabilities nc1 = new NetworkCapabilities();
|
||||||
@@ -382,6 +403,19 @@ public class NetworkCapabilitiesTest {
|
|||||||
// will never be satisfied.
|
// will never be satisfied.
|
||||||
assertTrue(nc2.hasCapability(NET_CAPABILITY_NOT_ROAMING));
|
assertTrue(nc2.hasCapability(NET_CAPABILITY_NOT_ROAMING));
|
||||||
assertTrue(nc2.hasUnwantedCapability(NET_CAPABILITY_NOT_ROAMING));
|
assertTrue(nc2.hasUnwantedCapability(NET_CAPABILITY_NOT_ROAMING));
|
||||||
|
|
||||||
|
nc1.setSSID(TEST_SSID);
|
||||||
|
nc2.combineCapabilities(nc1);
|
||||||
|
assertTrue(TEST_SSID.equals(nc2.getSSID()));
|
||||||
|
|
||||||
|
// Because they now have the same SSID, the folllowing call should not throw
|
||||||
|
nc2.combineCapabilities(nc1);
|
||||||
|
|
||||||
|
nc1.setSSID("different " + TEST_SSID);
|
||||||
|
try {
|
||||||
|
nc2.combineCapabilities(nc1);
|
||||||
|
fail("Expected IllegalStateException: can't combine different SSIDs");
|
||||||
|
} catch (IllegalStateException expected) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user