/foundation/resourceschedule/work_scheduler/interfaces/kits/cj/work_scheduler/ |
H A D | work_scheduler_ffi.cpp | 152 workInfo.RequestChargerType(false, WorkCondition::Charger::CHARGING_UNPLUGGED); in GetChargeInfo() 155 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_ANY); in GetChargeInfo() 156 } else if (cwork.chargerType >= WorkCondition::Charger::CHARGING_PLUGGED_ANY && in GetChargeInfo() 157 cwork.chargerType <= WorkCondition::Charger::CHARGING_PLUGGED_WIRELESS) { in GetChargeInfo() 158 workInfo.RequestChargerType(true, WorkCondition::Charger(cwork.chargerType)); in GetChargeInfo() 161 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_ANY); in GetChargeInfo() 247 if (chargerType >= WorkCondition::Charger::CHARGING_UNPLUGGED) { in ParseWorkInfo()
|
/foundation/resourceschedule/work_scheduler/frameworks/include/ |
H A D | work_info.h | 68 void RequestChargerType(bool isCharging, WorkCondition::Charger condition); 189 WorkCondition::Charger GetChargerType();
|
H A D | work_condition.h | 49 enum Charger { enum in OHOS::WorkScheduler::WorkCondition
|
/foundation/resourceschedule/work_scheduler/interfaces/kits/js/napi/src/ |
H A D | init.cpp | 127 napi_create_uint32(env, static_cast<uint32_t>(WorkCondition::Charger::CHARGING_PLUGGED_ANY), in InitChargingType() 129 napi_create_uint32(env, static_cast<uint32_t>(WorkCondition::Charger::CHARGING_PLUGGED_AC), in InitChargingType() 131 napi_create_uint32(env, static_cast<uint32_t>(WorkCondition::Charger::CHARGING_PLUGGED_USB), in InitChargingType() 133 napi_create_uint32(env, static_cast<uint32_t>(WorkCondition::Charger::CHARGING_PLUGGED_WIRELESS), in InitChargingType()
|
H A D | common.cpp | 112 workInfo.RequestChargerType(false, WorkCondition::Charger::CHARGING_UNPLUGGED); in GetChargeInfo() 116 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_ANY); in GetChargeInfo() 117 } else if (chargerType >= WorkCondition::Charger::CHARGING_PLUGGED_ANY && in GetChargeInfo() 118 chargerType <= WorkCondition::Charger::CHARGING_PLUGGED_WIRELESS) { in GetChargeInfo() 119 workInfo.RequestChargerType(true, WorkCondition::Charger(chargerType)); in GetChargeInfo() 121 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_ANY); in GetChargeInfo() 480 WorkCondition::Charger charger = workInfo-> GetChargerType(); in GetConditionInfo() 481 if (charger != WorkCondition::Charger::CHARGING_UNKNOWN) { in GetConditionInfo() 483 if (charger == WorkCondition::Charger::CHARGING_UNPLUGGED) { in GetConditionInfo()
|
/foundation/resourceschedule/work_scheduler/frameworks/test/unittest/src/ |
H A D | workinfo_test.cpp | 96 EXPECT_EQ(workInfo.GetChargerType(), WorkCondition::Charger::CHARGING_UNKNOWN); in HWTEST_F() 97 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_ANY); in HWTEST_F() 98 EXPECT_EQ(workInfo.GetChargerType(), WorkCondition::Charger::CHARGING_PLUGGED_ANY); in HWTEST_F() 110 workInfo.RequestChargerType(false, WorkCondition::Charger::CHARGING_UNPLUGGED); in HWTEST_F() 111 EXPECT_EQ(workInfo.GetChargerType(), WorkCondition::Charger::CHARGING_UNPLUGGED); in HWTEST_F() 316 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_ANY); in HWTEST_F() 521 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_ANY); in HWTEST_F()
|
/foundation/resourceschedule/work_scheduler/services/test/src/ |
H A D | work_status_test.cpp | 348 workInfo_->RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_AC); in HWTEST_F() 350 chargingCondition->enumVal = WorkCondition::Charger::CHARGING_PLUGGED_USB; in HWTEST_F() 369 workInfo_->RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_AC); in HWTEST_F() 371 chargingCondition->enumVal = WorkCondition::Charger::CHARGING_PLUGGED_USB; in HWTEST_F() 390 workInfo_->RequestChargerType(false, WorkCondition::Charger::CHARGING_PLUGGED_AC); in HWTEST_F() 392 chargingCondition->enumVal = WorkCondition::Charger::CHARGING_PLUGGED_USB; in HWTEST_F() 411 workInfo_->RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_AC); in HWTEST_F() 413 chargingCondition->enumVal = WorkCondition::Charger::CHARGING_PLUGGED_AC; in HWTEST_F() 430 chargingCondition->enumVal = WorkCondition::Charger::CHARGING_PLUGGED_AC; in HWTEST_F()
|
H A D | work_conn_manager_test.cpp | 266 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_AC); in HWTEST_F()
|
H A D | work_queue_test.cpp | 97 EXPECT_TRUE(ret->enumVal == WorkCondition::Charger::CHARGING_PLUGGED_ANY); in HWTEST_F()
|
/foundation/resourceschedule/work_scheduler/frameworks/src/ |
H A D | work_info.cpp | 63 void WorkInfo::RequestChargerType(bool isCharging, WorkCondition::Charger condition) in RequestChargerType() 216 WorkCondition::Charger WorkInfo::GetChargerType() in GetChargerType() 220 WorkCondition::Charger charger = WorkCondition::Charger(enumVal); in GetChargerType() 221 return WorkCondition::Charger(charger); in GetChargerType() 223 return WorkCondition::Charger::CHARGING_UNKNOWN; in GetChargerType() 623 WorkCondition::Charger(conditions["chargerType"].asInt())); in ParseConditionFromJsonStr()
|
/foundation/resourceschedule/work_scheduler/frameworks/extension/src/ |
H A D | js_work_scheduler_extension.cpp | 237 void SetChargerTypeInfo(napi_env env, napi_value workInfoData, WorkCondition::Charger charger) in SetChargerTypeInfo() 239 if (charger != WorkCondition::Charger::CHARGING_UNKNOWN) { in SetChargerTypeInfo() 240 if (charger == WorkCondition::Charger::CHARGING_UNPLUGGED) { in SetChargerTypeInfo() 354 WorkCondition::Charger charger = workInfo.GetChargerType(); in OnWorkStart() 406 WorkCondition::Charger charger = workInfo.GetChargerType(); in OnWorkStop()
|
/foundation/resourceschedule/work_scheduler/services/native/src/ |
H A D | work_policy_manager.cpp | 428 && topWork->workInfo_->GetChargerType() != WorkCondition::Charger::CHARGING_UNKNOWN in UpdateWatchdogTime() 429 && topWork->workInfo_->GetChargerType() != WorkCondition::Charger::CHARGING_UNPLUGGED) { in UpdateWatchdogTime() 445 chargerStatus = static_cast<int32_t>(WorkCondition::Charger::CHARGING_UNKNOWN); in UpdateWatchdogTime() 447 if (chargerStatus == static_cast<int32_t>(WorkCondition::Charger::CHARGING_UNPLUGGED) in UpdateWatchdogTime() 448 || chargerStatus == static_cast<int32_t>(WorkCondition::Charger::CHARGING_UNKNOWN)) { in UpdateWatchdogTime()
|
H A D | work_status.cpp | 299 static_cast<int32_t>(WorkCondition::Charger::CHARGING_PLUGGED_ANY)) { in IsChargerReady() 303 if (conditionCurrent->enumVal != static_cast<int32_t>(WorkCondition::Charger::CHARGING_UNPLUGGED)) { in IsChargerReady()
|
/foundation/resourceschedule/work_scheduler/test/fuzztest/workschedulerstopandclearworks_fuzzer/ |
H A D | workschedulerstopandclearworks_fuzzer.cpp | 79 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_USB); in TirggerChargerListener()
|
/foundation/resourceschedule/work_scheduler/test/fuzztest/workschedulerstartwork_fuzzer/ |
H A D | workschedulerstartwork_fuzzer.cpp | 62 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_AC); in CreateWorkInfo()
|