From d43f07f1235a5872b152f74ec9c0de3d95b557f4 Mon Sep 17 00:00:00 2001 From: Andrzej Popowski Date: Tue, 4 Aug 2015 11:55:31 +0200 Subject: [PATCH] [Power] - Changing method of getting the custom status [Verification] - TCT results of Power module are 100% Change-Id: I7eff4ec46a1c0b9329fdd6956042ad6f55ff4176 Signed-off-by: Andrzej Popowski --- src/power/power_manager.cc | 3 +-- src/power/power_platform_proxy.cc | 5 +++++ src/power/power_platform_proxy.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/power/power_manager.cc b/src/power/power_manager.cc index 37ecfc20..fff19a58 100755 --- a/src/power/power_manager.cc +++ b/src/power/power_manager.cc @@ -392,8 +392,7 @@ int PowerManager::GetPlatformBrightness(){ int brightness = 0; - int is_custom_mode = 0; - vconf_get_int(VCONFKEY_PM_CUSTOM_BRIGHTNESS_STATUS, &is_custom_mode); + int is_custom_mode = PowerPlatformProxy::GetInstance().IsCustomBrightness(); if ((is_custom_mode && current_brightness_ != -1) || should_be_read_from_cache_) { LoggerD("return custom brightness %d", current_brightness_); return current_brightness_; diff --git a/src/power/power_platform_proxy.cc b/src/power/power_platform_proxy.cc index e8ab75db..568b71ed 100755 --- a/src/power/power_platform_proxy.cc +++ b/src/power/power_platform_proxy.cc @@ -87,5 +87,10 @@ int PowerPlatformProxy::GetBrightness() { return dbus_op_.InvokeSyncGetInt("CurrentBrightness", NULL); } +int PowerPlatformProxy::IsCustomBrightness() { + LoggerD("Entered"); + return dbus_op_.InvokeSyncGetInt("CustomBrightness", NULL); +} + } // namespace power } // namespace extension diff --git a/src/power/power_platform_proxy.h b/src/power/power_platform_proxy.h index bfa4d54b..25cacff0 100755 --- a/src/power/power_platform_proxy.h +++ b/src/power/power_platform_proxy.h @@ -30,6 +30,7 @@ class PowerPlatformProxy { int SetBrightness(int val); int GetBrightness(); + int IsCustomBrightness(); static PowerPlatformProxy& GetInstance(); -- 2.34.1