Home
last modified time | relevance | path

Searched refs:PowerState (Results 1 – 25 of 51) sorted by relevance

123

/base/powermgr/power_manager/test/unittest/src/
Dpower_state_level_framework_test.cpp55 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 …]
Dnative_power_state_machine_test.cpp29 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 …]
Dpower_mgr_client_test.cpp59 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 …]
Dpower_suspend_test.cpp57 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);
Dpower_wakeup_test.cpp139 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/
Dpower_state_machine.h90 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/
Dpower_state_machine.cpp35 …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/
Dpower_mgr_st_suspend_test.cpp45 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());
Dpower_mgr_st_mock_test.cpp236 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/
Dpowermgr_service_native_test.cpp60 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/
Dnative_power_state_machine_test.h55 virtual void OnPowerStateChanged(PowerState state) override;
62 virtual void OnPowerStateChanged(PowerState state) override;
Dpower_state_machine_test.h52 virtual void OnPowerStateChanged(PowerState state) override;
58 virtual void OnPowerStateChanged(PowerState state) override;
Dpower_mgr_client_native_test.h39 virtual void OnPowerStateChanged(PowerState state) override;
Dpower_mgr_service_native_test.h43 virtual void OnPowerStateChanged(PowerState state) override;
/base/powermgr/power_manager/test/unittest/src/mock/
Dpower_mock_object_test.cpp41 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/
Dipower_state_callback.h28 virtual void OnPowerStateChanged(PowerState state) = 0;
/base/powermgr/power_manager/services/native/src/wakeup/
Dwakeup_controller.cpp186 if (stateMachine_->GetState() != PowerState::AWAKE) { in ControlListener()
192PowerState::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/
Dpower_state_callback_proxy.h37 virtual void OnPowerStateChanged(PowerState state) override;
Dpower_state_callback_stub.h32 void OnPowerStateChanged(PowerState __attribute__((unused))state) override {} in OnPowerStateChanged()
/base/powermgr/power_manager/test/unittest/include/mock/
Dpower_mock_proxy_test.h38 virtual void OnPowerStateChanged(PowerState state) override;
Dpower_mock_parcel_test.h38 virtual void OnPowerStateChanged(PowerState state) override;
Dpower_mock_object_test.h38 virtual void OnPowerStateChanged(PowerState state) override;
Dpower_mock_peer_test.h38 virtual void OnPowerStateChanged(PowerState state) override;
/base/powermgr/power_manager/test/unittest/include/servicetest/mock/
Dpowermgr_service_mock_parcel_test.h41 virtual void OnPowerStateChanged(PowerState state) override;
/base/powermgr/power_manager/services/zidl/src/
Dpower_state_callback_proxy.cpp27 void PowerStateCallbackProxy::OnPowerStateChanged(PowerState state) in OnPowerStateChanged()

123