Searched refs:hasPolicy (Results 1 – 4 of 4) sorted by relevance
/packages/modules/Connectivity/service/src/com/android/server/connectivity/ |
D | NetworkRanker.java | 112 return candidate.getScore().hasPolicy(POLICY_EVER_VALIDATED_NOT_AVOIDED_WHEN_BAD) in isBadWiFi() 132 if (!CollectionUtils.any(accepted, n -> n.getScore().hasPolicy(POLICY_YIELD_TO_BAD_WIFI))) { in applyYieldToBadWifiPolicy() 140 if (CollectionUtils.all(accepted, n -> n.getScore().hasPolicy(POLICY_YIELD_TO_BAD_WIFI))) { in applyYieldToBadWifiPolicy() 152 partitionInto(acceptedWithYielders, n -> !n.getScore().hasPolicy(POLICY_YIELD_TO_BAD_WIFI), in applyYieldToBadWifiPolicy() 183 partitionInto(candidates, nai -> nai.getScore().hasPolicy(POLICY_IS_INVINCIBLE), in getBestNetworkByPolicy() 189 partitionInto(candidates, nai -> nai.getScore().hasPolicy(POLICY_IS_VPN), in getBestNetworkByPolicy() 196 partitionInto(candidates, nai -> nai.getScore().hasPolicy(POLICY_EVER_USER_SELECTED) in getBestNetworkByPolicy() 197 && nai.getScore().hasPolicy(POLICY_ACCEPT_UNVALIDATED), in getBestNetworkByPolicy() 204 partitionInto(candidates, nai -> nai.getScore().hasPolicy(POLICY_IS_VALIDATED) in getBestNetworkByPolicy() 205 || nai.getScore().hasPolicy(POLICY_ACCEPT_UNVALIDATED), in getBestNetworkByPolicy() [all …]
|
D | FullScore.java | 295 if (hasPolicy(POLICY_EVER_USER_SELECTED) in getLegacyInt() 296 && (hasPolicy(POLICY_ACCEPT_UNVALIDATED) || pretendValidated)) { in getLegacyInt() 303 if (!hasPolicy(POLICY_IS_VALIDATED) && !pretendValidated && !hasPolicy(POLICY_IS_VPN)) { in getLegacyInt() 314 public boolean hasPolicy(final int policy) { in hasPolicy() method in FullScore 336 if (hasPolicy(i)) sj.add(policyNameOf(i)); in toString() 339 if (hasPolicy(i)) sj.add(policyNameOf(i)); in toString()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | FullScoreTest.kt | 113 assertFalse(ns.hasPolicy(POLICY_IS_VALIDATED)) in <lambda>() 114 assertFalse(ns.hasPolicy(POLICY_IS_VPN)) in <lambda>() 115 assertFalse(ns.hasPolicy(POLICY_EVER_USER_SELECTED)) in <lambda>() 116 assertFalse(ns.hasPolicy(POLICY_ACCEPT_UNVALIDATED)) in <lambda>() 117 assertTrue(ns.withPolicies(validated = true).hasPolicy(POLICY_IS_VALIDATED)) in <lambda>() 118 assertTrue(ns.withPolicies(vpn = true).hasPolicy(POLICY_IS_VPN)) in <lambda>() 119 assertTrue(ns.withPolicies(onceChosen = true).hasPolicy(POLICY_EVER_USER_SELECTED)) in <lambda>() 120 assertTrue(ns.withPolicies(acceptUnvalidated = true).hasPolicy(POLICY_ACCEPT_UNVALIDATED)) in <lambda>()
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | NetworkScore.java | 124 public boolean hasPolicy(final int policy) { in hasPolicy() method in NetworkScore 148 return hasPolicy(POLICY_YIELD_TO_BAD_WIFI); in shouldYieldToBadWifi() 162 return hasPolicy(POLICY_TRANSPORT_PRIMARY); in isTransportPrimary() 179 return hasPolicy(POLICY_EXITING); in isExiting()
|