mirror of
https://gitee.com/openharmony/accessibility
synced 2024-11-27 17:11:49 +00:00
commit
d9b090c2c9
@ -19,6 +19,7 @@
|
||||
#include "iservice_registry.h"
|
||||
#include "parameter.h"
|
||||
#include "system_ability_definition.h"
|
||||
#include "display_power_mgr_client.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AccessibilityConfig {
|
||||
@ -986,6 +987,11 @@ void AccessibilityConfig::Impl::SetBrightnessDiscount(const float brightness)
|
||||
{
|
||||
HILOG_INFO("brightness = [%{public}f]", brightness);
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto& displayPowerMgrClient = DisplayPowerMgr::DisplayPowerMgrClient::GetInstance();
|
||||
if (!displayPowerMgrClient.DiscountBrightness(brightness)) {
|
||||
HILOG_ERROR("Failed to set brightness discount");
|
||||
return;
|
||||
}
|
||||
if (!serviceProxy_) {
|
||||
HILOG_ERROR("Failed to get accessibility service");
|
||||
return;
|
||||
|
@ -52,11 +52,13 @@ ohos_shared_library("accessibilityconfig") {
|
||||
external_deps = [
|
||||
"ability_base:want",
|
||||
"c_utils:utils",
|
||||
"display_manager:displaymgr",
|
||||
"eventhandler:libeventhandler",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"init:libbeget_proxy",
|
||||
"init:libbegetutil",
|
||||
"ipc:ipc_core",
|
||||
"power_manager:powermgr_client",
|
||||
"samgr:samgr_proxy",
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user