Change-Id: I48c5d3bb6d505c7eec3f41f0a676d5c26cefd74b
Signed-off-by: jk.pu <jk.pu@samsung.com>
int brightness = 0;
int is_custom_mode = 0;
- vconf_get_int(VCONFKEY_PM_CUSTOM_BRIGHTNESS_STATUS, &is_custom_mode);
+ auto error_code = PowerPlatformProxy::GetInstance().IsCustomBrightness(&is_custom_mode);
+
+ if (!error_code) {
+ LoggerE("Failed to check if custom brightness is set.");
+ return error_code;
+ }
+
if ((is_custom_mode && current_brightness_ != -1) || should_be_read_from_cache_) {
LoggerD("return custom brightness %d", current_brightness_);
*result = current_brightness_;
common::PlatformResult PowerPlatformProxy::GetBrightness(int* result) {
LoggerD("Entered");
- return dbus_op_.InvokeSyncGetInt("GetBrightness", nullptr, result);
+ return dbus_op_.InvokeSyncGetInt("CurrentBrightness", nullptr, result);
}
common::PlatformResult PowerPlatformProxy::IsCustomBrightness(int* result) {