/base/powermgr/power_manager/test/unittest/src/ |
D | power_state_level_framework_test.cpp | 55 EXPECT_TRUE(static_cast<uint32_t>(PowerState::AWAKE) == AWAKE) << "PowerState AWAKE correct"; 56 EXPECT_TRUE(static_cast<uint32_t>(PowerState::FREEZE) == FREEZE) << "PowerState FREEZE correct"; 57 …EXPECT_TRUE(static_cast<uint32_t>(PowerState::INACTIVE) == INACTIVE) << "PowerState INACTIVE corre… 58 …EXPECT_TRUE(static_cast<uint32_t>(PowerState::STAND_BY) == STAND_BY) << "PowerState STAND_BY corre… 59 EXPECT_TRUE(static_cast<uint32_t>(PowerState::DOZE) == DOZE) << "PowerState DOZE correct"; 60 EXPECT_TRUE(static_cast<uint32_t>(PowerState::SLEEP) == SLEEP) << "PowerState SLEEP correct"; 61 …EXPECT_TRUE(static_cast<uint32_t>(PowerState::HIBERNATE) == HIBERNATE) << "PowerState HIBERNATE co… 62 …EXPECT_TRUE(static_cast<uint32_t>(PowerState::SHUTDOWN) == SHUTDOWN) << "PowerState HIBERNATE corr… 75 …auto ret = g_stateMachineTest->SetState(PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_… 77 EXPECT_TRUE(g_stateMachineTest->GetState() == PowerState::AWAKE); [all …]
|
D | native_power_state_machine_test.cpp | 29 void PowerStateTest1Callback::OnPowerStateChanged(PowerState state) in OnPowerStateChanged() 34 void PowerStateTest2Callback::OnPowerStateChanged(PowerState state) in OnPowerStateChanged() 64 …EXPECT_TRUE(stateMachine->SetState(PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_BATTE… 74 …bool ret = stateMachine->SetState(PowerState::UNKNOWN, StateChangeReason::STATE_CHANGE_REASON_BATT… 98 …stateMachine->SetState(PowerState::INACTIVE, StateChangeReason::STATE_CHANGE_REASON_RUNNING_LOCK, … 99 …EXPECT_TRUE(stateMachine->SetState(PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_RUNNI… 106 …stateMachine->SetState(PowerState::INACTIVE, StateChangeReason::STATE_CHANGE_REASON_TIMEOUT, true); 107 …EXPECT_TRUE(stateMachine->SetState(PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_TIMEO… 171 …bool ret = stateMachine->SetState(PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_TIMEOU… 225 PowerState::INACTIVE, stateMachine, TransitResultToStateChangeReason); [all …]
|
D | power_mgr_client_test.cpp | 59 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 85 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 111 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 137 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 163 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 189 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 288 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 344 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 396 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); 454 EXPECT_EQ(powerMgrClient.GetState(), PowerState::AWAKE); [all …]
|
D | power_suspend_test.cpp | 57 void OnPowerStateChanged(PowerState state) override in OnPowerStateChanged() 64 if (state == PowerState::AWAKE) { in OnPowerStateChanged() 95 callback->OnPowerStateChanged(PowerState::AWAKE); 289 PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_TIMEOUT); 291 EXPECT_TRUE(pmsTest_->suspendController_->stateMachine_->GetState() != PowerState::AWAKE); 295 PowerState::FREEZE, StateChangeReason::STATE_CHANGE_REASON_TIMEOUT); 302 EXPECT_TRUE(pmsTest_->suspendController_->stateMachine_->GetState() == PowerState::FREEZE); 328 EXPECT_TRUE(pmsTest_->suspendController_->stateMachine_->GetState() == PowerState::SLEEP); 351 EXPECT_TRUE(pmsTest_->suspendController_->stateMachine_->GetState() == PowerState::SLEEP); 374 EXPECT_TRUE(pmsTest_->suspendController_->stateMachine_->GetState() != PowerState::HIBERNATE);
|
D | power_wakeup_test.cpp | 139 static_cast<uint32_t>(PowerState::AWAKE)); 144 static_cast<uint32_t>(PowerState::AWAKE)); 147 PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_TIMEOUT); 150 static_cast<uint32_t>(PowerState::AWAKE)); 153 PowerState::INACTIVE, StateChangeReason::STATE_CHANGE_REASON_TIMEOUT); 157 static_cast<uint32_t>(PowerState::INACTIVE));
|
/base/powermgr/power_manager/services/native/include/ |
D | power_state_machine.h | 90 PowerState GetState() in GetState() 105 bool SetState(PowerState state, StateChangeReason reason, bool force = false); 145 StateController(PowerState state, std::shared_ptr<PowerStateMachine> owner, in StateController() 152 PowerState GetState() in GetState() 157 void RecordFailure(PowerState from, StateChangeReason trigger, TransitResult failReason); 160 PowerState failFrom_; 167 void MatchState(PowerState& currentState, DisplayState state); 168 void CorrectState(PowerState& currentState, PowerState correctState, DisplayState state); 169 PowerState state_; 189 void NotifyPowerStateChanged(PowerState state); [all …]
|
/base/powermgr/power_manager/services/native/src/ |
D | power_state_machine.cpp | 35 …PowerStateMachine(const wptr<PowerMgrService>& pms) : pms_(pms), currentState_(PowerState::UNKNOWN) in PowerStateMachine() 57 … lockMap_.emplace(PowerState::AWAKE, std::make_shared<std::vector<RunningLockType>>(awakeBlocker)); in PowerStateMachine() 58 …lockMap_.emplace(PowerState::FREEZE, std::make_shared<std::vector<RunningLockType>>(freezeBlocker)… in PowerStateMachine() 59 …lockMap_.emplace(PowerState::INACTIVE, std::make_shared<std::vector<RunningLockType>>(inactiveBloc… in PowerStateMachine() 60 …lockMap_.emplace(PowerState::STAND_BY, std::make_shared<std::vector<RunningLockType>>(standByBlock… in PowerStateMachine() 61 lockMap_.emplace(PowerState::DOZE, std::make_shared<std::vector<RunningLockType>>(dozeBlocker)); in PowerStateMachine() 62 … lockMap_.emplace(PowerState::SLEEP, std::make_shared<std::vector<RunningLockType>>(sleepBlocker)); in PowerStateMachine() 63 …lockMap_.emplace(PowerState::HIBERNATE, std::make_shared<std::vector<RunningLockType>>(hibernateBl… in PowerStateMachine() 64 …lockMap_.emplace(PowerState::SHUTDOWN, std::make_shared<std::vector<RunningLockType>>(shutdownBloc… in PowerStateMachine() 89 SetState(PowerState::AWAKE, StateChangeReason::STATE_CHANGE_REASON_INIT, true); in InitState() [all …]
|
/base/powermgr/power_manager/test/systemtest/src/ |
D | power_mgr_st_suspend_test.cpp | 45 PowerState::SLEEP, stateMachine_->GetReasionBySuspendType(reason)); in HandleAutoSleep() 73 EXPECT_EQ(PowerState::SLEEP, pms->GetState()); 107 EXPECT_EQ(PowerState::SLEEP, pms->GetState()); 138 EXPECT_EQ(PowerState::SLEEP, pms->GetState()); 144 EXPECT_EQ(PowerState::SLEEP, pms->GetState()); 174 EXPECT_EQ(PowerState::SLEEP, pms->GetState());
|
D | power_mgr_st_mock_test.cpp | 236 EXPECT_EQ(PowerState::SLEEP, pms->GetState()); 271 EXPECT_EQ(PowerState::SLEEP, pms->GetState()); 304 EXPECT_EQ(PowerState::INACTIVE, pms->GetState()); 314 EXPECT_EQ(PowerState::AWAKE, pms->GetState()); 353 EXPECT_EQ(PowerState::SLEEP, pms->GetState()); 356 EXPECT_EQ(PowerState::AWAKE, pms->GetState()); 415 EXPECT_EQ(PowerState::AWAKE, pms->GetState()); 452 EXPECT_EQ(PowerState::INACTIVE, pms->GetState()); 484 EXPECT_EQ(PowerState::SLEEP, pms->GetState()); 520 EXPECT_EQ(PowerState::AWAKE, pms->GetState()); [all …]
|
/base/powermgr/power_manager/test/unittest/src/servicetest/ |
D | powermgr_service_native_test.cpp | 60 void PowerMgrServiceNativeTest::PowerStateTestCallback::OnPowerStateChanged(PowerState state) in OnPowerStateChanged() 166 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); 189 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); 253 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); 286 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); 317 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); 544 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); 562 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); 580 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); 598 EXPECT_EQ(g_powerMgrServiceProxy->GetState(), PowerState::AWAKE); [all …]
|
/base/powermgr/power_manager/test/unittest/include/ |
D | native_power_state_machine_test.h | 55 virtual void OnPowerStateChanged(PowerState state) override; 62 virtual void OnPowerStateChanged(PowerState state) override;
|
D | power_state_machine_test.h | 52 virtual void OnPowerStateChanged(PowerState state) override; 58 virtual void OnPowerStateChanged(PowerState state) override;
|
D | power_mgr_client_native_test.h | 39 virtual void OnPowerStateChanged(PowerState state) override;
|
D | power_mgr_service_native_test.h | 43 virtual void OnPowerStateChanged(PowerState state) override;
|
/base/powermgr/power_manager/test/unittest/src/mock/ |
D | power_mock_object_test.cpp | 41 void PowerMockObjectTest::PowerStateTestCallback::OnPowerStateChanged(PowerState state) in OnPowerStateChanged() 61 PowerState state = PowerState::AWAKE; 68 EXPECT_EQ(state, PowerState::UNKNOWN);
|
/base/powermgr/power_manager/interfaces/inner_api/native/include/ |
D | ipower_state_callback.h | 28 virtual void OnPowerStateChanged(PowerState state) = 0;
|
/base/powermgr/power_manager/services/native/src/wakeup/ |
D | wakeup_controller.cpp | 186 if (stateMachine_->GetState() != PowerState::AWAKE) { in ControlListener() 192 …PowerState::AWAKE, stateMachine_->GetReasonByWakeType(static_cast<WakeupDeviceType>(reason)), true… in ControlListener() 230 PowerState state = pms->GetState(); in OnInputEvent() 231 if (state == PowerState::AWAKE || state == PowerState::FREEZE) { in OnInputEvent() 268 PowerState state = pms->GetState(); in OnInputEvent() 269 if (state == PowerState::AWAKE || state == PowerState::FREEZE) { in OnInputEvent()
|
/base/powermgr/power_manager/services/zidl/include/ |
D | power_state_callback_proxy.h | 37 virtual void OnPowerStateChanged(PowerState state) override;
|
D | power_state_callback_stub.h | 32 void OnPowerStateChanged(PowerState __attribute__((unused))state) override {} in OnPowerStateChanged()
|
/base/powermgr/power_manager/test/unittest/include/mock/ |
D | power_mock_proxy_test.h | 38 virtual void OnPowerStateChanged(PowerState state) override;
|
D | power_mock_parcel_test.h | 38 virtual void OnPowerStateChanged(PowerState state) override;
|
D | power_mock_object_test.h | 38 virtual void OnPowerStateChanged(PowerState state) override;
|
D | power_mock_peer_test.h | 38 virtual void OnPowerStateChanged(PowerState state) override;
|
/base/powermgr/power_manager/test/unittest/include/servicetest/mock/ |
D | powermgr_service_mock_parcel_test.h | 41 virtual void OnPowerStateChanged(PowerState state) override;
|
/base/powermgr/power_manager/services/zidl/src/ |
D | power_state_callback_proxy.cpp | 27 void PowerStateCallbackProxy::OnPowerStateChanged(PowerState state) in OnPowerStateChanged()
|