summaryrefslogtreecommitdiffstats
path: root/services/tests
diff options
context:
space:
mode:
authorPaul Jensen <pauljensen@google.com>2015-08-05 07:07:24 -0400
committerPaul Jensen <pauljensen@google.com>2015-08-05 07:07:24 -0400
commit86e7d135acbdb0055de6a687817d44ac60603c9f (patch)
tree779b9f59252cf055c07e68e27ea86a1e520721c3 /services/tests
parent815a6b6bdf400413057c83fa0ee63db749785d85 (diff)
parentdbc4edccfced5cb739bae75e8cd15cecc39cf16e (diff)
downloadframeworks_base-86e7d135acbdb0055de6a687817d44ac60603c9f.zip
frameworks_base-86e7d135acbdb0055de6a687817d44ac60603c9f.tar.gz
frameworks_base-86e7d135acbdb0055de6a687817d44ac60603c9f.tar.bz2
resolved conflicts for merge of dbc4edcc to mnc-dr-dev
Change-Id: I3a8624b2b375e0d174983d7690082e0e6932c4de
Diffstat (limited to 'services/tests')
-rw-r--r--services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
index 19d29f3..696f106 100644
--- a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
@@ -937,6 +937,19 @@ public class ConnectivityServiceTest extends AndroidTestCase {
}
private void tryNetworkFactoryRequests(int capability) throws Exception {
+ // Verify NOT_RESTRICTED is set appropriately
+ final NetworkCapabilities nc = new NetworkRequest.Builder().addCapability(capability)
+ .build().networkCapabilities;
+ if (capability == NET_CAPABILITY_CBS || capability == NET_CAPABILITY_DUN ||
+ capability == NET_CAPABILITY_EIMS || capability == NET_CAPABILITY_FOTA ||
+ capability == NET_CAPABILITY_IA || capability == NET_CAPABILITY_IMS ||
+ capability == NET_CAPABILITY_RCS || capability == NET_CAPABILITY_XCAP ||
+ capability == NET_CAPABILITY_TRUSTED || capability == NET_CAPABILITY_NOT_VPN) {
+ assertFalse(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
+ } else {
+ assertTrue(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
+ }
+
NetworkCapabilities filter = new NetworkCapabilities();
filter.addCapability(capability);
final HandlerThread handlerThread = new HandlerThread("testNetworkFactoryRequests");