Home
last modified time | relevance | path

Searched refs:Charger (Results 1 - 15 of 15) sorted by relevance

/foundation/resourceschedule/work_scheduler/interfaces/kits/cj/work_scheduler/
H A Dwork_scheduler_ffi.cpp152 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 Dwork_info.h68 void RequestChargerType(bool isCharging, WorkCondition::Charger condition);
189 WorkCondition::Charger GetChargerType();
H A Dwork_condition.h49 enum Charger { enum in OHOS::WorkScheduler::WorkCondition
/foundation/resourceschedule/work_scheduler/interfaces/kits/js/napi/src/
H A Dinit.cpp127 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 Dcommon.cpp112 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 Dworkinfo_test.cpp96 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 Dwork_status_test.cpp348 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 Dwork_conn_manager_test.cpp266 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_AC); in HWTEST_F()
H A Dwork_queue_test.cpp97 EXPECT_TRUE(ret->enumVal == WorkCondition::Charger::CHARGING_PLUGGED_ANY); in HWTEST_F()
/foundation/resourceschedule/work_scheduler/frameworks/src/
H A Dwork_info.cpp63 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 Djs_work_scheduler_extension.cpp237 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 Dwork_policy_manager.cpp428 && 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 Dwork_status.cpp299 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 Dworkschedulerstopandclearworks_fuzzer.cpp79 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_USB); in TirggerChargerListener()
/foundation/resourceschedule/work_scheduler/test/fuzztest/workschedulerstartwork_fuzzer/
H A Dworkschedulerstartwork_fuzzer.cpp62 workInfo.RequestChargerType(true, WorkCondition::Charger::CHARGING_PLUGGED_AC); in CreateWorkInfo()

Completed in 11 milliseconds