/packages/modules/Connectivity/tests/unit/java/android/net/ |
D | NetworkStackBpfNetMapsTest.kt | 137 fun isUidNetworkingBlocked(uid: Int, metered: Boolean = false) = in isUidNetworkingBlocked() method in android.net.NetworkStackBpfNetMapsTest 138 bpfNetMapsReader.isUidNetworkingBlocked(uid, metered) in isUidNetworkingBlocked() 145 assertFalse(isUidNetworkingBlocked(TEST_UID1)) in isUidNetworkingBlocked() 150 assertTrue(isUidNetworkingBlocked(TEST_UID1)) in isUidNetworkingBlocked() 151 assertTrue(isUidNetworkingBlocked(TEST_UID2)) in isUidNetworkingBlocked() 156 assertFalse(isUidNetworkingBlocked(TEST_UID1)) in isUidNetworkingBlocked() 157 assertTrue(isUidNetworkingBlocked(TEST_UID2)) in isUidNetworkingBlocked() 167 assertFalse(isUidNetworkingBlocked(TEST_UID1)) in testIsUidNetworkingBlockedByFirewallChains_denyChain() 168 assertFalse(isUidNetworkingBlocked(TEST_UID2)) in testIsUidNetworkingBlockedByFirewallChains_denyChain() 173 assertTrue(isUidNetworkingBlocked(TEST_UID1)) in testIsUidNetworkingBlockedByFirewallChains_denyChain() [all …]
|
/packages/modules/Connectivity/tests/cts/hostside-network-policy/app/src/com/android/cts/netpolicy/hostside/ |
D | NetworkPolicyManagerTest.java | 26 import static com.android.cts.netpolicy.hostside.NetworkPolicyTestUtils.isUidNetworkingBlocked; 78 assertFalse(isUidNetworkingBlocked(mUid, METERED)); // Match NTWK_ALLOWED_DEFAULT in testIsUidNetworkingBlocked_withUidNotBlocked() 79 assertFalse(isUidNetworkingBlocked(mUid, NON_METERED)); // Match NTWK_ALLOWED_NON_METERED in testIsUidNetworkingBlocked_withUidNotBlocked() 88 assertFalse(isUidNetworkingBlocked(SYSTEM_UID, METERED)); // Match NTWK_ALLOWED_SYSTEM in testIsUidNetworkingBlocked_withSystemUid() 89 assertFalse(isUidNetworkingBlocked(SYSTEM_UID, NON_METERED)); // Match NTWK_ALLOWED_SYSTEM in testIsUidNetworkingBlocked_withSystemUid() 97 isUidNetworkingBlocked(SYSTEM_UID, NON_METERED)); // Match NTWK_ALLOWED_SYSTEM in testIsUidNetworkingBlocked_withSystemUid() 124 isUidNetworkingBlocked(mUid, NON_METERED)); // Match NTWK_ALLOWED_NON_METERED in testIsUidNetworkingBlocked_withDataSaverMode() 134 isUidNetworkingBlocked(mUid, NON_METERED)); // Match NTWK_ALLOWED_NON_METERED in testIsUidNetworkingBlocked_withDataSaverMode() 142 isUidNetworkingBlocked(mUid, NON_METERED)); // Match NTWK_ALLOWED_NON_METERED in testIsUidNetworkingBlocked_withDataSaverMode() 179 assertTrue(isUidNetworkingBlocked(mUid, in testIsUidNetworkingBlocked_withRestrictedNetworkingMode() [all …]
|
D | NetworkPolicyTestUtils.java | 455 PollingCheck.waitFor(() -> (expectedResult == isUidNetworkingBlocked(uid, metered)), 467 public static boolean isUidNetworkingBlocked(int uid, boolean meteredNetwork) { 471 return getNetworkPolicyManager().isUidNetworkingBlocked(uid, meteredNetwork);
|
/packages/modules/Connectivity/DnsResolver/ |
D | DnsBpfHelperTest.cpp | 129 auto result = mDnsBpfHelper.isUidNetworkingBlocked(config.uid, /*metered=*/false); in TEST_F() 138 auto result = mDnsBpfHelper.isUidNetworkingBlocked(AID_APP_START, /*metered=*/false); in TEST_F() 142 result = mDnsBpfHelper.isUidNetworkingBlocked(AID_SYSTEM, /*metered=*/false); in TEST_F() 203 auto result = mDnsBpfHelper.isUidNetworkingBlocked(AID_APP_START, /*metered=*/true); in TEST_F()
|
D | DnsHelper.cpp | 32 auto result = sDnsBpfHelper.isUidNetworkingBlocked(uid, metered); in ADnsHelper_isUidNetworkingBlocked()
|
D | DnsBpfHelper.h | 34 base::Result<bool> isUidNetworkingBlocked(uid_t uid, bool metered);
|
D | DnsBpfHelper.cpp | 47 base::Result<bool> DnsBpfHelper::isUidNetworkingBlocked(uid_t uid, bool metered) { in isUidNetworkingBlocked() function in android::net::DnsBpfHelper
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | NetworkStackBpfNetMaps.java | 166 public boolean isUidNetworkingBlocked(final int uid, boolean isNetworkMetered) { in isUidNetworkingBlocked() method in NetworkStackBpfNetMaps 167 return BpfNetMapsUtils.isUidNetworkingBlocked(uid, isNetworkMetered, in isUidNetworkingBlocked()
|
D | BpfNetMapsUtils.java | 327 public static boolean isUidNetworkingBlocked(final int uid, boolean isNetworkMetered, in isUidNetworkingBlocked() method in BpfNetMapsUtils
|
D | ConnectivityManager.java | 6426 public boolean isUidNetworkingBlocked(int uid, boolean isNetworkMetered) { in isUidNetworkingBlocked() method in ConnectivityManager 6437 return reader.isUidNetworkingBlocked(uid, isNetworkMetered); in isUidNetworkingBlocked()
|
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/netlink/ |
D | TcpSocketTrackerTest.java | 355 verify(mCm, never()).isUidNetworkingBlocked(anyInt(), anyBoolean()); in testPollSocketsInfo_ignoreBlockedUid_featureDisabled_UOrAbove() 394 doReturn(true).when(mCm).isUidNetworkingBlocked(TEST_UID2, false /* metered */); in testPollSocketsInfo_ignoreBlockedUid_featureEnabled() 407 doReturn(false).when(mCm).isUidNetworkingBlocked(TEST_UID2, false /* metered */); in testPollSocketsInfo_ignoreBlockedUid_featureEnabled() 434 verify(mCm).isUidNetworkingBlocked(TEST_UID1, false /* metered */); in testPollSocketsInfo_ignoreBlockedUid_featureEnabled_dataSaver() 440 verify(mCm).isUidNetworkingBlocked(TEST_UID1, true /* metered */); in testPollSocketsInfo_ignoreBlockedUid_featureEnabled_dataSaver()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivityservice/ |
D | CSActiveNetworkInfoTest.kt | 75 doReturn(true).`when`(bpfNetMaps).isUidNetworkingBlocked(anyInt(), anyBoolean()) in nc()
|
/packages/modules/Connectivity/common/ |
D | flags.aconfig | 19 description: "This flag controls whether isUidNetworkingBlocked is supported"
|
/packages/modules/DnsResolver/ |
D | DnsProxyListener.cpp | 707 bool isUidNetworkingBlocked(uid_t uid, unsigned netId) { in isUidNetworkingBlocked() function 919 const bool isUidBlocked = isUidNetworkingBlocked(mNetContext.uid, mNetContext.dns_netid); in run() 1132 const bool isUidBlocked = isUidNetworkingBlocked(mNetContext.uid, mNetContext.dns_netid); in run() 1337 const bool isUidBlocked = isUidNetworkingBlocked(mNetContext.uid, mNetContext.dns_netid); in run() 1501 const bool isUidBlocked = isUidNetworkingBlocked(mNetContext.uid, mNetContext.dns_netid); in run()
|
/packages/modules/Connectivity/service/src/com/android/server/ |
D | BpfNetMaps.java | 931 public boolean isUidNetworkingBlocked(final int uid, boolean isNetworkMetered) { in isUidNetworkingBlocked() method in BpfNetMaps 932 return BpfNetMapsUtils.isUidNetworkingBlocked(uid, isNetworkMetered, in isUidNetworkingBlocked()
|
D | ConnectivityService.java | 2346 final boolean blockedByUidRules = mBpfNetMaps.isUidNetworkingBlocked(uid, metered); 2353 return mPolicyManager.isUidNetworkingBlocked(uid, metered);
|
/packages/modules/NetworkStack/src/com/android/networkstack/netlink/ |
D | TcpSocketTracker.java | 305 final boolean uidBlocked = mCm.isUidNetworkingBlocked(newInfo.uid, metered); in pollSocketsInfo()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/ |
D | BpfNetMapsTest.java | 1261 assertTrue(BpfNetMapsUtils.isUidNetworkingBlocked(TEST_UID, false, mConfigurationMap, in testIsUidNetworkingBlockedForCoreUids() 1274 assertFalse(BpfNetMapsUtils.isUidNetworkingBlocked(uid, false, mConfigurationMap, in testIsUidNetworkingBlockedForCoreUids()
|
D | ConnectivityServiceTest.java | 1732 ).when(mNetworkPolicyManager).isUidNetworkingBlocked(anyInt(), anyBoolean()); in mockUidNetworkingBlocked() 1734 ).when(mBpfNetMaps).isUidNetworkingBlocked(anyInt(), anyBoolean()); in mockUidNetworkingBlocked()
|
/packages/modules/NetworkStack/src/com/android/server/ |
D | NetworkStackService.java | 550 pw.println(cm.isUidNetworkingBlocked(uid, metered /* isNetworkMetered */)); in onCommand()
|
/packages/modules/Connectivity/framework/api/ |
D | module-lib-current.txt | 17 …t.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public boolean isUidNetworkingBlocked(int, boole…
|