display: Support dim brightness setting 61/315261/1 accepted/tizen/8.0/unified/20240731.160737
authorYunhee Seo <yuni.seo@samsung.com>
Mon, 29 Jul 2024 07:05:57 +0000 (16:05 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Mon, 29 Jul 2024 07:05:57 +0000 (16:05 +0900)
The dim brightness setting feature had been supported before
but it was no longer available after ce471ec18f19bb184848f4c84e813b834ef4bdee commit.
Although there were descriptions and functions provided for setting dim brightness,
it's not right that it cannot be used, so it is restored.

Change-Id: I6b03d7c12b359a3d24ecd4305f904f97f80decd1
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/display/display-backlight.c

index 7051d121aba2ba81ed792dde6ec3a0aa3e52032a..5a8aa83826c79b6cd1c781aff3df35c2618ee3a6 100644 (file)
@@ -283,8 +283,15 @@ int display_backlight_get_default_brightness(int *brightness)
 int display_backlight_set_brightness_by_dim_brightness(void)
 {
        int ret = 0;
+       int dim_brightness = 0;
 
-       ret = display_backlight_set_brightness(PM_DIM_BRIGHTNESS);
+       ret = vconf_get_int(VCONFKEY_SETAPPL_LCD_DIM_BRIGHTNESS, &dim_brightness);
+       if (ret < 0) {
+               _E("Failed to get vconf value for VCONFKEY_SETAPPL_LCD_DIM_BRIGHTNESS: %d", vconf_get_ext_errno());
+               return ret;
+       }
+
+       ret = display_backlight_set_brightness(dim_brightness);
 
 #ifdef ENABLE_PM_LOG
        enum syscommon_deviced_display_state current;