Home
last modified time | relevance | path

Searched refs:DisplayState (Results 1 – 25 of 49) sorted by relevance

12

/base/powermgr/power_manager/services/native/src/actions/default/display/
Ddevice_state_action.cpp59 DisplayState DeviceStateAction::GetDisplayState() in GetDisplayState()
61 DisplayPowerMgr::DisplayState state = DisplayPowerMgrClient::GetInstance().GetDisplayState(); in GetDisplayState()
63 DisplayState ret = DisplayState::DISPLAY_UNKNOWN; in GetDisplayState()
65 case DisplayPowerMgr::DisplayState::DISPLAY_ON: in GetDisplayState()
66 ret = DisplayState::DISPLAY_ON; in GetDisplayState()
68 case DisplayPowerMgr::DisplayState::DISPLAY_DIM: in GetDisplayState()
69 ret = DisplayState::DISPLAY_DIM; in GetDisplayState()
71 case DisplayPowerMgr::DisplayState::DISPLAY_OFF: in GetDisplayState()
72 ret = DisplayState::DISPLAY_OFF; in GetDisplayState()
74 case DisplayPowerMgr::DisplayState::DISPLAY_SUSPEND: in GetDisplayState()
[all …]
Ddefault_device_state_action.cpp41 DisplayState DefaultDeviceStateAction::GetDisplayState() in GetDisplayState()
43 return DisplayState::DISPLAY_UNKNOWN; in GetDisplayState()
46 uint32_t DefaultDeviceStateAction::SetDisplayState(const DisplayState state, StateChangeReason reas… in SetDisplayState()
Ddevice_state_action.h34 DisplayState GetDisplayState() override;
35 uint32_t SetDisplayState(const DisplayState state,
45 …void OnDisplayStateChanged(uint32_t displayId, DisplayPowerMgr::DisplayState state, uint32_t reaso…
Ddefault_device_state_action.h33 DisplayState GetDisplayState() override;
34 uint32_t SetDisplayState(DisplayState state,
/base/powermgr/display_manager/test/unittest/src/
Ddisplay_power_mgr_service_test.cpp30 DisplayState beforeDisplayState;
45 DisplayState state = DisplayPowerMgrClient::GetInstance().GetDisplayState(); in TearDown()
79 auto ret = DisplayPowerMgrClient::GetInstance().SetDisplayState(DisplayState::DISPLAY_OFF);
91 auto ret = DisplayPowerMgrClient::GetInstance().SetDisplayState(DisplayState::DISPLAY_ON);
103 auto ret = DisplayPowerMgrClient::GetInstance().SetDisplayState(DisplayState::DISPLAY_DIM);
115 auto ret = DisplayPowerMgrClient::GetInstance().SetDisplayState(DisplayState::DISPLAY_SUSPEND);
127 auto ret = DisplayPowerMgrClient::GetInstance().SetDisplayState(DisplayState::DISPLAY_UNKNOWN);
139 DisplayPowerMgrClient::GetInstance().SetDisplayState(DisplayState::DISPLAY_OFF);
140 auto ret = DisplayPowerMgrClient::GetInstance().SetDisplayState(DisplayState::DISPLAY_ON);
142 DisplayState state = DisplayPowerMgrClient::GetInstance().GetDisplayState();
[all …]
/base/powermgr/display_manager/service/native/src/
Dscreen_action.cpp60 DisplayState ScreenAction::GetDisplayState() in GetDisplayState()
62 DisplayState state = DisplayState::DISPLAY_UNKNOWN; in GetDisplayState()
67 state = DisplayState::DISPLAY_ON; in GetDisplayState()
70 state = DisplayState::DISPLAY_DIM; in GetDisplayState()
73 state = DisplayState::DISPLAY_SUSPEND; in GetDisplayState()
76 state = DisplayState::DISPLAY_OFF; in GetDisplayState()
85 bool ScreenAction::SetDisplayState(DisplayState state, const std::function<void(DisplayState)>& cal… in SetDisplayState()
90 Rosen::DisplayState rds = Rosen::DisplayState::UNKNOWN; in SetDisplayState()
92 case DisplayState::DISPLAY_ON: in SetDisplayState()
93 rds = Rosen::DisplayState::ON; in SetDisplayState()
[all …]
Dscreen_controller.cpp88 DisplayState ScreenController::GetState() in GetState()
93 DisplayState ScreenController::SetDelayOffState() in SetDelayOffState()
96 state_ = DisplayState::DISPLAY_DELAY_OFF; in SetDelayOffState()
100 DisplayState ScreenController::SetOnState() in SetOnState()
103 state_ = DisplayState::DISPLAY_ON; in SetOnState()
107 bool ScreenController::UpdateState(DisplayState state, uint32_t reason) in UpdateState()
114 case DisplayState::DISPLAY_ON: in UpdateState()
115 case DisplayState::DISPLAY_OFF: { in UpdateState()
116 function<void(DisplayState)> callback = in UpdateState()
125 case DisplayState::DISPLAY_DIM: in UpdateState()
[all …]
Ddisplay_power_mgr_service.cpp142 void DisplayPowerMgrService::ScreenOffDelay(uint32_t id, DisplayState state, uint32_t reason) in ScreenOffDelay()
158 bool DisplayPowerMgrService::SetDisplayState(uint32_t id, DisplayState state, uint32_t reason) in SetDisplayState()
170 if (state == DisplayState::DISPLAY_ON) { in SetDisplayState()
172 } else if (state == DisplayState::DISPLAY_OFF) { in SetDisplayState()
177 if (state == DisplayState::DISPLAY_OFF) { in SetDisplayState()
189 } else if (state == DisplayState::DISPLAY_ON) { in SetDisplayState()
201 DisplayState DisplayPowerMgrService::GetDisplayState(uint32_t id) in GetDisplayState()
206 return DisplayState::DISPLAY_UNKNOWN; in GetDisplayState()
277 …if (GetDisplayState(GetMainDisplayId()) != DisplayState::DISPLAY_ON || delayMs == DELAY_TIME_UNSET… in OverrideDisplayOffDelay()
355 if (GetDisplayState(GetMainDisplayId()) == DisplayState::DISPLAY_ON) { in AutoAdjustBrightness()
[all …]
/base/powermgr/power_manager/test/unittest/src/
Ddevice_state_action_native_test.cpp50 DisplayState state = DisplayState::DISPLAY_OFF;
53 EXPECT_TRUE(deviceStateAction->GetDisplayState() == DisplayState::DISPLAY_OFF);
54 state = DisplayState::DISPLAY_DIM;
56 EXPECT_TRUE(deviceStateAction->GetDisplayState() == DisplayState::DISPLAY_DIM);
57 state = DisplayState::DISPLAY_ON;
59 EXPECT_TRUE(deviceStateAction->GetDisplayState() == DisplayState::DISPLAY_ON);
60 state = DisplayState::DISPLAY_SUSPEND;
62 EXPECT_TRUE(deviceStateAction->GetDisplayState() == DisplayState::DISPLAY_SUSPEND);
63 state = DisplayState::DISPLAY_UNKNOWN;
65 EXPECT_FALSE(deviceStateAction->GetDisplayState() == DisplayState::DISPLAY_UNKNOWN);
[all …]
/base/powermgr/display_manager/service/native/include/
Dscreen_action.h38 DisplayState GetDisplayState();
39 bool SetDisplayState(DisplayState state, const std::function<void(DisplayState)>& callback);
40 bool SetDisplayPower(DisplayState state, uint32_t reason);
Dscreen_controller.h50 DisplayState GetState();
51 DisplayState SetDelayOffState();
52 DisplayState SetOnState();
53 bool UpdateState(DisplayState state, uint32_t reason);
54 bool UpdateState(DisplayState state);
79 void OnStateChanged(DisplayState state, uint32_t reason);
91 DisplayState state_;
Ddisplay_power_mgr_service.h43 virtual bool SetDisplayState(uint32_t id, DisplayState state, uint32_t reason) override;
44 virtual DisplayState GetDisplayState(uint32_t id) override;
65 void NotifyStateChangeCallback(uint32_t displayId, DisplayState state, uint32_t reason);
118 void ScreenOffDelay(uint32_t id, DisplayState state, uint32_t reason);
139 DisplayState displayState_ {DisplayState::DISPLAY_UNKNOWN};
140 DisplayState tempState_ {DisplayState::DISPLAY_UNKNOWN};
/base/powermgr/battery_statistics/test/unittest/src/clienttest/
Dstats_display_test.cpp34 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); in SetLastBrightness()
35 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF); in SetLastBrightness()
87 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON);
88 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF);
118 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON);
119 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF);
148 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON);
149 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF);
182 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON);
183 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF);
[all …]
/base/powermgr/battery_statistics/test/unittest/src/servicetest/
Dstats_service_display_test.cpp43 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); in SetLastBrightness()
44 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF); in SetLastBrightness()
111 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON);
112 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF);
147 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON);
148 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF);
182 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON);
183 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF);
221 int32_t stateOn = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON);
222 int32_t stateOff = static_cast<int32_t>(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_OFF);
[all …]
/base/powermgr/power_manager/services/native/src/
Dpower_state_machine.cpp101 uint32_t ret = this->stateAction_->SetDisplayState(DisplayState::DISPLAY_ON, reason); in EmplaceAwake()
128 DisplayState state = DisplayState::DISPLAY_OFF; in EmplaceInactive()
131 state = DisplayState::DISPLAY_SUSPEND; in EmplaceInactive()
341 DisplayState state = stateAction_->GetDisplayState(); in IsScreenOn()
342 if (state == DisplayState::DISPLAY_ON || state == DisplayState::DISPLAY_DIM) { in IsScreenOn()
473 static const std::string GetDisplayStateString(DisplayState state) in GetDisplayStateString()
476 case DisplayState::DISPLAY_OFF: in GetDisplayStateString()
478 case DisplayState::DISPLAY_DIM: in GetDisplayStateString()
480 case DisplayState::DISPLAY_ON: in GetDisplayStateString()
482 case DisplayState::DISPLAY_SUSPEND: in GetDisplayStateString()
[all …]
/base/powermgr/power_manager/test/mock/action/
Dmock_state_action.h33 MOCK_METHOD0(GetDisplayState, DisplayState());
34 MOCK_METHOD2(SetDisplayState, uint32_t(DisplayState state, StateChangeReason reason));
/base/powermgr/power_manager/test/systemtest/mock/
Dmock_state_action.h33 MOCK_METHOD0(GetDisplayState, DisplayState());
34 MOCK_METHOD2(SetDisplayState, uint32_t(DisplayState state, StateChangeReason reason));
/base/powermgr/display_manager/test/unittest/src/mock/
Ddisplay_mock_object_test.cpp43 uint32_t displayId, DisplayPowerMgr::DisplayState state, uint32_t reason) in OnDisplayStateChanged()
59 …EXPECT_FALSE(sptrDisplayProxy->SetDisplayState(DISPLAY_ID, DisplayPowerMgr::DisplayState::DISPLAY_…
60 …EXPECT_NE(DisplayPowerMgr::DisplayState::DISPLAY_ON, sptrDisplayProxy->GetDisplayState(DISPLAY_ID)…
Ddisplay_mock_parcel_test.cpp55 …EXPECT_FALSE(sptrDisplayProxy->SetDisplayState(DISPLAY_ID, DisplayPowerMgr::DisplayState::DISPLAY_… in DisplayProxyTestFunc()
56 …EXPECT_NE(DisplayPowerMgr::DisplayState::DISPLAY_ON, sptrDisplayProxy->GetDisplayState(DISPLAY_ID)… in DisplayProxyTestFunc()
76 uint32_t displayId, DisplayPowerMgr::DisplayState state, uint32_t reason) in OnDisplayStateChanged()
93 EXPECT_FALSE(client.SetDisplayState(DisplayPowerMgr::DisplayState::DISPLAY_ON));
94 EXPECT_NE(DisplayPowerMgr::DisplayState::DISPLAY_ON, client.GetDisplayState(DISPLAY_ID));
Ddisplay_mock_test.cpp49 uint32_t displayId, DisplayPowerMgr::DisplayState state, uint32_t reason) in OnDisplayStateChanged()
96 …EXPECT_FALSE(sptrDisplayProxy->SetDisplayState(DISPLAY_ID, DisplayPowerMgr::DisplayState::DISPLAY_…
97 …EXPECT_NE(DisplayPowerMgr::DisplayState::DISPLAY_ON, sptrDisplayProxy->GetDisplayState(DISPLAY_ID)…
/base/powermgr/power_manager/test/systemtest/src/
Dpower_mgr_st_mock_test.cpp187 .WillRepeatedly(::testing::Return(DisplayState::DISPLAY_OFF));
188 EXPECT_CALL(*g_stateAction, SetDisplayState(DisplayState::DISPLAY_ON, ::testing::_))
200 .WillRepeatedly(::testing::Return(DisplayState::DISPLAY_OFF));
201 EXPECT_CALL(*g_stateAction, SetDisplayState(DisplayState::DISPLAY_ON, ::testing::_))
299 .WillRepeatedly(::testing::Return(DisplayState::DISPLAY_ON));
300 EXPECT_CALL(*g_stateAction, SetDisplayState(DisplayState::DISPLAY_OFF, ::testing::_))
307 .WillRepeatedly(::testing::Return(DisplayState::DISPLAY_OFF));
308 EXPECT_CALL(*g_stateAction, SetDisplayState(DisplayState::DISPLAY_ON, ::testing::_))
348 .WillRepeatedly(::testing::Return(DisplayState::DISPLAY_OFF));
349 EXPECT_CALL(*g_stateAction, SetDisplayState(DisplayState::DISPLAY_ON, ::testing::_))
[all …]
/base/powermgr/power_manager/services/native/include/actions/
Didevice_state_action.h45 virtual DisplayState GetDisplayState() = 0;
46 virtual uint32_t SetDisplayState(DisplayState state,
/base/powermgr/display_manager/interfaces/inner_api/native/include/
Didisplay_power_mgr.h30 virtual bool SetDisplayState(uint32_t id, DisplayState state, uint32_t reason) = 0;
31 virtual DisplayState GetDisplayState(uint32_t id) = 0;
Ddisplay_power_info.h24 enum class DisplayState : uint32_t { enum
Didisplay_power_callback.h28 virtual void OnDisplayStateChanged(uint32_t displayId, DisplayState state, uint32_t reason) = 0;

12