Home
last modified time | relevance | path

Searched refs:isAllowed (Results 1 - 25 of 45) sorted by relevance

12

/foundation/communication/netmanager_base/services/netpolicymanager/src/common/
H A Dnet_policy_service_common.cpp29 bool isAllowed = false; in IsUidNetAllowed() local
30 DelayedSingleton<NetPolicyService>::GetInstance()->IsUidNetAllowed(uid, metered, isAllowed); in IsUidNetAllowed()
31 return isAllowed; in IsUidNetAllowed()
/foundation/communication/netmanager_base/services/netpolicymanager/src/core/
H A Dnet_policy_firewall.cpp40 int32_t NetPolicyFirewall::SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) in SetDeviceIdleTrustlist() argument
46 UpdateFirewallPolicyList(FIREWALL_CHAIN_DEVICE_IDLE, uids, isAllowed); in SetDeviceIdleTrustlist()
48 deviceIdleFirewallRule_->SetAllowedList(uids, isAllowed ? FIREWALL_RULE_ALLOW : FIREWALL_RULE_DENY); in SetDeviceIdleTrustlist()
57 int32_t NetPolicyFirewall::SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) in SetPowerSaveTrustlist() argument
63 UpdateFirewallPolicyList(FIREWALL_CHAIN_POWER_SAVE, uids, isAllowed); in SetPowerSaveTrustlist()
69 powerSaveFirewallRule_->SetAllowedList(uids, isAllowed ? FIREWALL_RULE_ALLOW : FIREWALL_RULE_DENY); in SetPowerSaveTrustlist()
78 void NetPolicyFirewall::UpdateFirewallPolicyList(uint32_t chainType, const std::vector<uint32_t> &uids, bool isAllowed) in UpdateFirewallPolicyList() argument
82 if (isAllowed) { in UpdateFirewallPolicyList()
90 if (isAllowed) { in UpdateFirewallPolicyList()
H A Dnet_policy_callback.cpp166 int32_t NetPolicyCallback::NotifyNetBackgroundPolicyChangeAsync(bool isAllowed) in NotifyNetBackgroundPolicyChangeAsync() argument
168 NETMGR_LOG_D("NotifyNetBackgroundPolicyChange isAllowed[%{public}d]", isAllowed); in NotifyNetBackgroundPolicyChangeAsync()
175 netPolicyCallbackFfrtQueue_->submit_h([this, isAllowed, &ret]() { in NotifyNetBackgroundPolicyChangeAsync()
176 ret = this->NotifyNetBackgroundPolicyChange(isAllowed); in NotifyNetBackgroundPolicyChangeAsync()
182 int32_t NetPolicyCallback::NotifyNetBackgroundPolicyChange(bool isAllowed) in NotifyNetBackgroundPolicyChange() argument
186 callback->NetBackgroundPolicyChange(isAllowed); in NotifyNetBackgroundPolicyChange()
H A Dnet_policy_rule.cpp244 int32_t NetPolicyRule::IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) in IsUidNetAllowed() argument
254 isAllowed = false; in IsUidNetAllowed()
259 isAllowed = true; in IsUidNetAllowed()
264 isAllowed = false; in IsUidNetAllowed()
269 isAllowed = true; in IsUidNetAllowed()
274 isAllowed = true; in IsUidNetAllowed()
279 isAllowed = false; in IsUidNetAllowed()
283 isAllowed = true; in IsUidNetAllowed()
/foundation/communication/netmanager_base/interfaces/innerkits/netpolicyclient/include/
H A Dnet_policy_client.h72 * @param isAllowed Put the result into "isAllowed".
77 [[nodiscard]] int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed);
84 * @param isAllowed Put the result into "isAllowed".
89 [[nodiscard]] int32_t IsUidNetAllowed(uint32_t uid, const std::string &ifaceName, bool &isAllowed);
94 [[nodiscard]] int32_t IsUidNetAccess(uint32_t uid, bool isMetered, bool &isAllowed);
99 [[nodiscard]] int32_t IsUidNetAccess(uint32_t uid, const std::string &ifaceName, bool &isAllowed);
165 * @param isAllowed Allow apps to use data on background or not.
170 [[nodiscard]] int32_t SetBackgroundPolicy(bool isAllowed);
[all...]
H A Di_net_policy_service.h69 * @param isAllowed True means it's allowed to access the network.
73 virtual int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) = 0;
80 * @param isAllowed True means it's allowed to access the network.
84 virtual int32_t IsUidNetAllowed(uint32_t uid, const std::string &ifaceName, bool &isAllowed) = 0;
132 * @param isAllowed The UID is into allow list or not.
135 virtual int32_t SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) = 0;
164 * @param isAllowed Allow apps to use data on background.
167 virtual int32_t SetBackgroundPolicy(bool isAllowed) = 0;
200 * @param isAllowed The UID is into allow list or not.
203 virtual int32_t SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed)
[all...]
H A Dnet_policy_service_proxy.h34 int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) override;
35 int32_t IsUidNetAllowed(uint32_t uid, const std::string &ifaceName, bool &isAllowed) override;
45 int32_t SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) override;
49 int32_t SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) override;
/foundation/ability/ability_runtime/test/unittest/dialog_session_manager_test/
H A Ddialog_session_manager_test.cpp107 bool isAllowed = false; in HWTEST_F() local
108 int32_t ret = dialogSessionManager.SendDialogResult(want, TEST_DIALOG_SESSION_ID, isAllowed); in HWTEST_F()
111 isAllowed = true; in HWTEST_F()
112 ret = dialogSessionManager.SendDialogResult(want, TEST_DIALOG_SESSION_ID, isAllowed); in HWTEST_F()
116 ret = dialogSessionManager.SendDialogResult(want, TEST_DIALOG_SESSION_ID, isAllowed); in HWTEST_F()
132 bool isAllowed = true; in HWTEST_F() local
137 int32_t ret = dialogSessionManager.SendDialogResult(want, TEST_DIALOG_SESSION_ID, isAllowed); in HWTEST_F()
141 ret = dialogSessionManager.SendDialogResult(want, TEST_DIALOG_SESSION_ID, isAllowed); in HWTEST_F()
/foundation/communication/netmanager_base/services/netpolicymanager/include/
H A Dnet_policy_firewall.h34 * @param isAllowed The UID is into allow list or not.
37 int32_t SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed);
65 * @param isAllowed The UID is into allow list or not.
68 int32_t SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed);
95 void UpdateFirewallPolicyList(uint32_t chainType, const std::vector<uint32_t> &uids, bool isAllowed);
H A Dnet_policy_service.h84 * @param isAllowed Return true means it's allowed to access the network.
88 int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) override;
94 * @param isAllowed Return true means it's allowed to access the network.
98 int32_t IsUidNetAllowed(uint32_t uid, const std::string &ifaceName, bool &isAllowed) override;
171 * @param isAllowed The UID is into allowed list or not.
174 int32_t SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) override;
201 * @param isAllowed The UID is into allowed list or not.
204 int32_t SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) override;
H A Dnet_policy_callback.h86 int32_t NotifyNetBackgroundPolicyChangeAsync(bool isAllowed);
95 int32_t NotifyNetBackgroundPolicyChange(bool isAllowed);
/foundation/communication/netmanager_base/test/netpolicymanager/unittest/net_policy_manager_test/
H A Dut_net_policy_client.cpp142 bool isAllowed = false; in HWTEST_F() local
143 int32_t ret = g_netPolicyClient->IsUidNetAllowed(TEST_UID, false, isAllowed); in HWTEST_F()
146 ASSERT_TRUE(isAllowed == true); in HWTEST_F()
157 bool isAllowed = false; in HWTEST_F() local
159 int32_t ret = g_netPolicyClient->IsUidNetAllowed(TEST_UID, ifaceName, isAllowed); in HWTEST_F()
161 std::cout << "NetPolicyClient005 IsUidNetAllowed isAllowed:" << isAllowed << std::endl; in HWTEST_F()
162 ASSERT_TRUE(isAllowed == true); in HWTEST_F()
173 bool isAllowed = false; in HWTEST_F() local
174 int32_t ret = g_netPolicyClient->IsUidNetAccess(TEST_UID, false, isAllowed); in HWTEST_F()
188 bool isAllowed = false; HWTEST_F() local
482 bool isAllowed = true; HWTEST_F() local
[all...]
H A Dnet_policy_exception_service_test.cpp52 bool isAllowed = false; in HWTEST_F() local
53 int32_t ret = DelayedSingleton<NetPolicyService>::GetInstance()->IsUidNetAllowed(uit, metered, isAllowed); in HWTEST_F()
H A Dnet_policy_service_stub_test.cpp51 int32_t IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) override
56 int32_t IsUidNetAllowed(uint32_t uid, const std::string &ifaceName, bool &isAllowed) override
86 int32_t SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) override
106 int32_t SetBackgroundPolicy(bool isAllowed) override
126 int32_t SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) override
H A Dut_net_policy_rule.cpp97 bool isAllowed = false; in HWTEST_F() local
98 g_netPolicyRule->IsUidNetAllowed(15000, false, isAllowed); in HWTEST_F()
99 ASSERT_TRUE(isAllowed); in HWTEST_F()
H A Dut_net_policy_service.cpp94 bool isAllowed = false; in HWTEST_F() local
95 int32_t ret = instance_->IsUidNetAllowed(uid, policy, isAllowed); in HWTEST_F()
108 bool isAllowed = false; in HWTEST_F() local
109 int32_t ret = instance_->IsUidNetAllowed(uid, ifaceName, isAllowed); in HWTEST_F()
H A Dnet_policy_manager_test.cpp177 bool isAllowed = false; in HWTEST_F() local
178 int32_t result = DelayedSingleton<NetPolicyClient>::GetInstance()->IsUidNetAllowed(TEST_UID7, false, isAllowed); in HWTEST_F()
180 ASSERT_TRUE(isAllowed); in HWTEST_F()
191 bool isAllowed = false; in HWTEST_F() local
193 DelayedSingleton<NetPolicyClient>::GetInstance()->IsUidNetAllowed(TEST_UID7, std::string("test"), isAllowed); in HWTEST_F()
195 ASSERT_TRUE(isAllowed); in HWTEST_F()
/foundation/communication/netmanager_base/frameworks/native/netpolicyclient/src/
H A Dnet_policy_client.cpp64 int32_t NetPolicyClient::IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) in IsUidNetAllowed() argument
71 return proxy->IsUidNetAllowed(uid, metered, isAllowed); in IsUidNetAllowed()
74 int32_t NetPolicyClient::IsUidNetAllowed(uint32_t uid, const std::string &ifaceName, bool &isAllowed) in IsUidNetAllowed() argument
82 return proxy->IsUidNetAllowed(uid, ifaceName, isAllowed); in IsUidNetAllowed()
85 int32_t NetPolicyClient::IsUidNetAccess(uint32_t uid, bool isMetered, bool &isAllowed) in IsUidNetAccess() argument
87 return IsUidNetAllowed(uid, isMetered, isAllowed); in IsUidNetAccess()
90 int32_t NetPolicyClient::IsUidNetAccess(uint32_t uid, const std::string &ifaceName, bool &isAllowed) in IsUidNetAccess() argument
92 return IsUidNetAllowed(uid, ifaceName, isAllowed); in IsUidNetAccess()
320 int32_t NetPolicyClient::SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) in SetDeviceIdleTrustlist() argument
328 return proxy->SetDeviceIdleTrustlist(uids, isAllowed); in SetDeviceIdleTrustlist()
369 SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) SetPowerSaveTrustlist() argument
[all...]
H A Dnet_policy_service_proxy.cpp148 int32_t NetPolicyServiceProxy::IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) in IsUidNetAllowed() argument
181 if (!reply.ReadBool(isAllowed)) { in IsUidNetAllowed()
188 int32_t NetPolicyServiceProxy::IsUidNetAllowed(uint32_t uid, const std::string &ifaceName, bool &isAllowed) in IsUidNetAllowed() argument
221 if (!reply.ReadBool(isAllowed)) { in IsUidNetAllowed()
489 int32_t NetPolicyServiceProxy::SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) in SetDeviceIdleTrustlist() argument
501 if (!data.WriteBool(isAllowed)) { in SetDeviceIdleTrustlist()
628 int32_t NetPolicyServiceProxy::SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) in SetPowerSaveTrustlist() argument
647 if (!data.WriteBool(isAllowed)) { in SetPowerSaveTrustlist()
/foundation/communication/netmanager_base/services/netpolicymanager/src/stub/
H A Dnet_policy_service_stub.cpp294 bool isAllowed = false; in OnIsUidNetAllowedMetered() local
295 int32_t result = IsUidNetAllowed(uid, metered, isAllowed); in OnIsUidNetAllowedMetered()
302 if (!reply.WriteBool(isAllowed)) { in OnIsUidNetAllowedMetered()
326 bool isAllowed = false; in OnIsUidNetAllowedIfaceName() local
327 int32_t result = IsUidNetAllowed(uid, ifaceName, isAllowed); in OnIsUidNetAllowedIfaceName()
333 if (!reply.WriteBool(isAllowed)) { in OnIsUidNetAllowedIfaceName()
546 bool isAllowed = false; in OnSetDeviceIdleTrustlist() local
547 if (!data.ReadBool(isAllowed)) { in OnSetDeviceIdleTrustlist()
552 int32_t result = SetDeviceIdleTrustlist(uids, isAllowed); in OnSetDeviceIdleTrustlist()
585 bool isAllowed in OnSetDeviceIdlePolicy() local
629 bool isAllowed = false; OnSetPowerSaveTrustlist() local
648 bool isAllowed = false; OnSetPowerSavePolicy() local
[all...]
/foundation/communication/netmanager_base/services/netpolicymanager/src/
H A Dnet_policy_service.cpp155 int32_t NetPolicyService::IsUidNetAllowed(uint32_t uid, bool metered, bool &isAllowed) in IsUidNetAllowed() argument
159 isAllowed = true; in IsUidNetAllowed()
163 return netPolicyRule_->IsUidNetAllowed(uid, metered, isAllowed); in IsUidNetAllowed()
168 int32_t NetPolicyService::IsUidNetAllowed(uint32_t uid, const std::string &ifaceName, bool &isAllowed) in IsUidNetAllowed() argument
173 return IsUidNetAllowed(uid, true, isAllowed); in IsUidNetAllowed()
175 return IsUidNetAllowed(uid, false, isAllowed); in IsUidNetAllowed()
282 int32_t NetPolicyService::SetDeviceIdleTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) in SetDeviceIdleTrustlist() argument
289 return netPolicyFirewall_->SetDeviceIdleTrustlist(uids, isAllowed); in SetDeviceIdleTrustlist()
322 int32_t NetPolicyService::SetPowerSaveTrustlist(const std::vector<uint32_t> &uids, bool isAllowed) in SetPowerSaveTrustlist() argument
329 return netPolicyFirewall_->SetPowerSaveTrustlist(uids, isAllowed); in SetPowerSaveTrustlist()
[all...]
/foundation/ability/ability_runtime/services/abilitymgr/src/interceptor/
H A Ddisposed_rule_interceptor.cpp141 bool isAllowed = disposedRule.controlType == AppExecFwk::ControlType::ALLOWED_LIST; in CheckDisposedRule() local
143 return !isAllowed; in CheckDisposedRule()
152 return !isAllowed; in CheckDisposedRule()
155 return isAllowed; in CheckDisposedRule()
/foundation/communication/netmanager_base/services/netpolicymanager/src/firewall_rule/
H A Dfirewall_rule.cpp145 void FirewallRule::SetUidFirewallRule(uint uid, bool isAllowed) in SetUidFirewallRule() argument
147 netsys_->FirewallSetUidRule(chainType_, {uid}, isAllowed ? FIREWALL_RULE_ALLOW : FIREWALL_RULE_DENY); in SetUidFirewallRule()
/foundation/multimedia/camera_framework/services/camera_service/src/
H A Dcamera_util.cpp345 bool isAllowed = true; in IsInForeGround() local
347 MEDIA_DEBUG_LOG("HCameraService::IsInForeGround isAllowed!"); in IsInForeGround()
348 return isAllowed; in IsInForeGround()
351 isAllowed = Security::AccessToken::PrivacyKit::IsAllowedUsingPermission(callerToken, OHOS_PERMISSION_CAMERA); in IsInForeGround()
353 return isAllowed; in IsInForeGround()
/foundation/communication/netmanager_ext/test/vpnmanager/unittest/conn_vpn_manager_test/
H A Dut_net_policy_service.cpp94 bool isAllowed = false; in HWTEST_F() local
95 int32_t ret = instance_->IsUidNetAllowed(uid, policy, isAllowed); in HWTEST_F()
108 bool isAllowed = false; in HWTEST_F() local
109 int32_t ret = instance_->IsUidNetAllowed(uid, ifaceName, isAllowed); in HWTEST_F()

Completed in 26 milliseconds

12