[Power] - Changing method of getting the custom status
authorAndrzej Popowski <a.popowski@samsung.com>
Tue, 4 Aug 2015 09:55:31 +0000 (11:55 +0200)
committerAndrzej Popowski <a.popowski@samsung.com>
Tue, 4 Aug 2015 09:57:55 +0000 (18:57 +0900)
[Verification] - TCT results of Power module are 100%

Change-Id: I7eff4ec46a1c0b9329fdd6956042ad6f55ff4176
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
src/power/power_manager.cc
src/power/power_platform_proxy.cc
src/power/power_platform_proxy.h

index 37ecfc203bdbe122a92757ccb31f83344309cfa2..fff19a5810fc61e306c798de4bd0dca320894881 100755 (executable)
@@ -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_;
index e8ab75dbb56997f4e9d655b7647f7c6b815ea97c..568b71ed02bd277ac48b95b9c2f33690c9ba60f2 100755 (executable)
@@ -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
index bfa4d54b013ea717a9aafbd7f79ee75c17eeb59a..25cacff05174e6b224297fed02ac6c6e0bad0178 100755 (executable)
@@ -30,6 +30,7 @@ class PowerPlatformProxy {
        int SetBrightness(int val);
 
   int GetBrightness();
+  int IsCustomBrightness();
 
   static PowerPlatformProxy& GetInstance();