/base/powermgr/power_manager/services/native/src/actions/default/display/ |
D | device_state_action.cpp | 59 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 …]
|
D | default_device_state_action.cpp | 41 DisplayState DefaultDeviceStateAction::GetDisplayState() in GetDisplayState() 43 return DisplayState::DISPLAY_UNKNOWN; in GetDisplayState() 46 uint32_t DefaultDeviceStateAction::SetDisplayState(const DisplayState state, StateChangeReason reas… in SetDisplayState()
|
D | device_state_action.h | 34 DisplayState GetDisplayState() override; 35 uint32_t SetDisplayState(const DisplayState state, 45 …void OnDisplayStateChanged(uint32_t displayId, DisplayPowerMgr::DisplayState state, uint32_t reaso…
|
D | default_device_state_action.h | 33 DisplayState GetDisplayState() override; 34 uint32_t SetDisplayState(DisplayState state,
|
/base/powermgr/display_manager/test/unittest/src/ |
D | display_power_mgr_service_test.cpp | 30 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/ |
D | screen_action.cpp | 60 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 …]
|
D | screen_controller.cpp | 88 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 …]
|
D | display_power_mgr_service.cpp | 142 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/ |
D | device_state_action_native_test.cpp | 50 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/ |
D | screen_action.h | 38 DisplayState GetDisplayState(); 39 bool SetDisplayState(DisplayState state, const std::function<void(DisplayState)>& callback); 40 bool SetDisplayPower(DisplayState state, uint32_t reason);
|
D | screen_controller.h | 50 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_;
|
D | display_power_mgr_service.h | 43 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/ |
D | stats_display_test.cpp | 34 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/ |
D | stats_service_display_test.cpp | 43 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/ |
D | power_state_machine.cpp | 101 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/ |
D | mock_state_action.h | 33 MOCK_METHOD0(GetDisplayState, DisplayState()); 34 MOCK_METHOD2(SetDisplayState, uint32_t(DisplayState state, StateChangeReason reason));
|
/base/powermgr/power_manager/test/systemtest/mock/ |
D | mock_state_action.h | 33 MOCK_METHOD0(GetDisplayState, DisplayState()); 34 MOCK_METHOD2(SetDisplayState, uint32_t(DisplayState state, StateChangeReason reason));
|
/base/powermgr/display_manager/test/unittest/src/mock/ |
D | display_mock_object_test.cpp | 43 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)…
|
D | display_mock_parcel_test.cpp | 55 …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));
|
D | display_mock_test.cpp | 49 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/ |
D | power_mgr_st_mock_test.cpp | 187 .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/ |
D | idevice_state_action.h | 45 virtual DisplayState GetDisplayState() = 0; 46 virtual uint32_t SetDisplayState(DisplayState state,
|
/base/powermgr/display_manager/interfaces/inner_api/native/include/ |
D | idisplay_power_mgr.h | 30 virtual bool SetDisplayState(uint32_t id, DisplayState state, uint32_t reason) = 0; 31 virtual DisplayState GetDisplayState(uint32_t id) = 0;
|
D | display_power_info.h | 24 enum class DisplayState : uint32_t { enum
|
D | idisplay_power_callback.h | 28 virtual void OnDisplayStateChanged(uint32_t displayId, DisplayState state, uint32_t reason) = 0;
|