From: Andrzej Popowski Date: Tue, 4 Aug 2015 09:55:31 +0000 (+0200) Subject: [Power] - Changing method of getting the custom status X-Git-Tag: submit/tizen/20151026.073646^2^2~220 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d43f07f1235a5872b152f74ec9c0de3d95b557f4;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Power] - Changing method of getting the custom status [Verification] - TCT results of Power module are 100% Change-Id: I7eff4ec46a1c0b9329fdd6956042ad6f55ff4176 Signed-off-by: Andrzej Popowski --- 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();