fixed N_SE-8752
authorMyoungJune Park <mj2004.park@samsung.com>
Thu, 6 Sep 2012 05:15:32 +0000 (14:15 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Thu, 6 Sep 2012 05:15:32 +0000 (14:15 +0900)
- abnormal operation of the slider control in Brightness

setting-display/src/setting-display-brightness.c

index 68cdc03..6ac4df5 100755 (executable)
@@ -149,7 +149,7 @@ static int setting_display_brightness_create(void *cb)
 
        elm_object_part_content_set(sub_layout, "search_list2", genlist);
 
-       int auto_value, value;
+       int auto_value;
        int err;
        Elm_Object_Item *item = NULL;;
 
@@ -187,13 +187,6 @@ static int setting_display_brightness_create(void *cb)
        }
 
        /* check manual */
-       int ret = setting_get_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, &value,
-                                   &err);
-       if (ret == SETTING_RETURN_FAIL) {
-               value = SETTING_BRIGHTNESS_LEVEL5;
-       }
-
-       SETTING_TRACE("******* value = %d ", value);
        int max_brt;
        if (DEVICE_ERROR_NONE != device_get_max_brightness(BRIGHTNESS_DISPLAY, &max_brt)) {
                SETTING_TRACE("Fail to get the max brightness of the display.\n");
@@ -202,6 +195,19 @@ static int setting_display_brightness_create(void *cb)
                SETTING_TRACE("Max brightness of the display is %d\n", max_brt);
        }
 
+       // get initial value from vconf
+#if DISABLED_CODE
+       int ret = setting_get_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, &value, &err);
+       if (ret == SETTING_RETURN_FAIL) {
+               value = SETTING_BRIGHTNESS_LEVEL5;
+               SETTING_TRACE("******* value = %d ", value);
+       }
+#else
+       int value = SETTING_BRIGHTNESS_LEVEL7;
+       device_get_brightness(BRIGHTNESS_DISPLAY, &value);
+       SETTING_TRACE("******* value = %d ", value);
+#endif
+
        // [UI] Slider control for Bightness
        ad->data_br_sli =
            setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL,