Home
last modified time | relevance | path

Searched refs:policyMeta (Results 1 – 4 of 4) sorted by relevance

/packages/services/Car/cpp/powerpolicy/server/tests/
DPolicyManagerTest.cpp379 auto policyMeta = policyManager.getPowerPolicy(kExistingPowerPolicyId_OtherOff); in checkPolicies() local
380 ASSERT_TRUE(policyMeta.ok()); in checkPolicies()
381 ASSERT_TRUE(isEqual(*policyMeta->powerPolicy, kExistingPowerPolicy_OtherOff)); in checkPolicies()
383 policyMeta = policyManager.getPowerPolicy(kExistingPowerPolicyId_OtherOn); in checkPolicies()
384 ASSERT_TRUE(policyMeta.ok()); in checkPolicies()
385 ASSERT_TRUE(isEqual(*policyMeta->powerPolicy, kExistingPowerPolicy_OtherOn)); in checkPolicies()
387 policyMeta = policyManager.getPowerPolicy(kExistingPowerPolicyId_OtherUntouched); in checkPolicies()
388 ASSERT_TRUE(policyMeta.ok()); in checkPolicies()
389 ASSERT_TRUE(isEqual(*policyMeta->powerPolicy, kExistingPowerPolicy_OtherUntouched)); in checkPolicies()
391 policyMeta = policyManager.getPowerPolicy(kExistingPowerPolicyId_OtherNone); in checkPolicies()
[all …]
DCarPowerPolicyServerTest.cpp272 auto policyMeta = mServer->mPolicyManager.getPowerPolicy(kSystemPolicyIdInitialOn); in applyInitialPolicy() local
273 ASSERT_TRUE(policyMeta.ok()); in applyInitialPolicy()
274 mServer->mCurrentPowerPolicyMeta = *policyMeta; in applyInitialPolicy()
/packages/services/Car/cpp/powerpolicy/server/src/
DCarPowerPolicyServer.cpp919 auto policyMeta = mPolicyManager.getPowerPolicy(policyId); in applyPowerPolicy() local
920 if (!policyMeta.ok()) { in applyPowerPolicy()
921 return Error() << "Failed to apply power policy: " << policyMeta.error().message(); in applyPowerPolicy()
932 if (!canApplyPowerPolicyLocked(*policyMeta, force, /*out*/ clients)) { in applyPowerPolicy()
936 applyAndNotifyPowerPolicy(*policyMeta, clients, /*notifyCarService=*/false); in applyPowerPolicy()
940 bool CarPowerPolicyServer::canApplyPowerPolicyLocked(const CarPowerPolicyMeta& policyMeta, in canApplyPowerPolicyLocked() argument
943 const std::string& policyId = policyMeta.powerPolicy->policyId; in canApplyPowerPolicyLocked()
950 if (policyMeta.isPreemptive) { in canApplyPowerPolicyLocked()
966 mCurrentPowerPolicyMeta = policyMeta; in canApplyPowerPolicyLocked()
973 void CarPowerPolicyServer::applyAndNotifyPowerPolicy(const CarPowerPolicyMeta& policyMeta, in applyAndNotifyPowerPolicy() argument
[all …]
DCarPowerPolicyServer.h308 bool canApplyPowerPolicyLocked(const CarPowerPolicyMeta& policyMeta, const bool force,
311 void applyAndNotifyPowerPolicy(const CarPowerPolicyMeta& policyMeta,