Home
last modified time | relevance | path

Searched refs:isUidNetworkingBlocked (Results 1 – 21 of 21) sorted by relevance

/packages/modules/Connectivity/tests/unit/java/android/net/
DNetworkStackBpfNetMapsTest.kt137 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/
DNetworkPolicyManagerTest.java26 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 …]
DNetworkPolicyTestUtils.java455 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/
DDnsBpfHelperTest.cpp129 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()
DDnsHelper.cpp32 auto result = sDnsBpfHelper.isUidNetworkingBlocked(uid, metered); in ADnsHelper_isUidNetworkingBlocked()
DDnsBpfHelper.h34 base::Result<bool> isUidNetworkingBlocked(uid_t uid, bool metered);
DDnsBpfHelper.cpp47 base::Result<bool> DnsBpfHelper::isUidNetworkingBlocked(uid_t uid, bool metered) { in isUidNetworkingBlocked() function in android::net::DnsBpfHelper
/packages/modules/Connectivity/framework/src/android/net/
DNetworkStackBpfNetMaps.java166 public boolean isUidNetworkingBlocked(final int uid, boolean isNetworkMetered) { in isUidNetworkingBlocked() method in NetworkStackBpfNetMaps
167 return BpfNetMapsUtils.isUidNetworkingBlocked(uid, isNetworkMetered, in isUidNetworkingBlocked()
DBpfNetMapsUtils.java327 public static boolean isUidNetworkingBlocked(final int uid, boolean isNetworkMetered, in isUidNetworkingBlocked() method in BpfNetMapsUtils
DConnectivityManager.java6426 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/
DTcpSocketTrackerTest.java355 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/
DCSActiveNetworkInfoTest.kt75 doReturn(true).`when`(bpfNetMaps).isUidNetworkingBlocked(anyInt(), anyBoolean()) in nc()
/packages/modules/Connectivity/common/
Dflags.aconfig19 description: "This flag controls whether isUidNetworkingBlocked is supported"
/packages/modules/DnsResolver/
DDnsProxyListener.cpp707 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/
DBpfNetMaps.java931 public boolean isUidNetworkingBlocked(final int uid, boolean isNetworkMetered) { in isUidNetworkingBlocked() method in BpfNetMaps
932 return BpfNetMapsUtils.isUidNetworkingBlocked(uid, isNetworkMetered, in isUidNetworkingBlocked()
DConnectivityService.java2346 final boolean blockedByUidRules = mBpfNetMaps.isUidNetworkingBlocked(uid, metered);
2353 return mPolicyManager.isUidNetworkingBlocked(uid, metered);
/packages/modules/NetworkStack/src/com/android/networkstack/netlink/
DTcpSocketTracker.java305 final boolean uidBlocked = mCm.isUidNetworkingBlocked(newInfo.uid, metered); in pollSocketsInfo()
/packages/modules/Connectivity/tests/unit/java/com/android/server/
DBpfNetMapsTest.java1261 assertTrue(BpfNetMapsUtils.isUidNetworkingBlocked(TEST_UID, false, mConfigurationMap, in testIsUidNetworkingBlockedForCoreUids()
1274 assertFalse(BpfNetMapsUtils.isUidNetworkingBlocked(uid, false, mConfigurationMap, in testIsUidNetworkingBlockedForCoreUids()
DConnectivityServiceTest.java1732 ).when(mNetworkPolicyManager).isUidNetworkingBlocked(anyInt(), anyBoolean()); in mockUidNetworkingBlocked()
1734 ).when(mBpfNetMaps).isUidNetworkingBlocked(anyInt(), anyBoolean()); in mockUidNetworkingBlocked()
/packages/modules/NetworkStack/src/com/android/server/
DNetworkStackService.java550 pw.println(cm.isUidNetworkingBlocked(uid, metered /* isNetworkMetered */)); in onCommand()
/packages/modules/Connectivity/framework/api/
Dmodule-lib-current.txt17 …t.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public boolean isUidNetworkingBlocked(int, boole…