summaryrefslogtreecommitdiffstats
path: root/services/tests/servicestests/src
diff options
context:
space:
mode:
authorPaul Jensen <pauljensen@google.com>2015-08-19 11:06:15 -0400
committerPaul Jensen <pauljensen@google.com>2015-08-19 11:08:38 -0400
commitaae613d96134245af7c55976731a49fa59e77470 (patch)
treefecd59637ca65eeac8b93bedfeeba0305669118a /services/tests/servicestests/src
parent8b8fa3e934e3ddf01790e647b4401dc88b24bf67 (diff)
downloadframeworks_base-aae613d96134245af7c55976731a49fa59e77470.zip
frameworks_base-aae613d96134245af7c55976731a49fa59e77470.tar.gz
frameworks_base-aae613d96134245af7c55976731a49fa59e77470.tar.bz2
Don't mark NetworkRequests restricted when they don't have restricted caps
Requests without NET_CAPABILITIES_INTERNET and just the default network capabilities should not be marked restricted. Without this fix apps can hit permissions exceptions if they inadvertently make requests without NET_CAPABILITIES_INTERNET. Bug:23164917 Change-Id: I4c7136821315bcb05dfc42ffbc505a5d4f6109e6
Diffstat (limited to 'services/tests/servicestests/src')
-rw-r--r--services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
index 696f106..b4c76b7 100644
--- a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
@@ -943,8 +943,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
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) {
+ capability == NET_CAPABILITY_RCS || capability == NET_CAPABILITY_XCAP) {
assertFalse(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
} else {
assertTrue(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));