Fix usage of "ENABLE_TIZEN_2_4" 54/102754/3
authorNagaraj D R <nagaraj.dr@samsung.com>
Tue, 6 Dec 2016 11:16:56 +0000 (16:46 +0530)
committerPyun DoHyun <dh79.pyun@samsung.com>
Tue, 27 Dec 2016 05:18:42 +0000 (21:18 -0800)
If "ENABLE_TIZEN_2_4" is not defined, only then UPS
related changes in bt-core should be included.

Change-Id: I2cf4a8999253b95f4dcdb0997e9ab5d53a472f9a

bt-core/bt-core-noti-handler.c

index fcb450d..5c4b568 100644 (file)
@@ -247,7 +247,6 @@ static void __bt_core_flight_mode_cb(keynode_t *node, void *data)
 #endif
 
 #ifndef TIZEN_PROFILE_WEARABLE
-#ifdef ENABLE_TIZEN_2_4
 static void __bt_core_power_saving_mode_cb(keynode_t *node, void *data)
 {
        int power_saving_mode = 0;
@@ -266,14 +265,11 @@ static void __bt_core_power_saving_mode_cb(keynode_t *node, void *data)
        __bt_core_handle_adapter_with_power_saving_mode(power_saving_mode);
 }
 #endif
-#endif
 
 void _bt_core_init_vconf_value(void)
 {
        gboolean flight_mode = FALSE;
-#ifndef ENABLE_TIZEN_2_4
        int power_saving_mode = 0;
-#endif
        int bt_flight_mode = 0;
        int bt_ps_mode = 0;
 
@@ -283,12 +279,10 @@ void _bt_core_init_vconf_value(void)
        flight_mode = _bt_core_is_flight_mode_enabled();
 
 #ifndef TIZEN_PROFILE_WEARABLE
-#ifndef ENABLE_TIZEN_2_4
        if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &power_saving_mode) != 0)
                BT_ERR("Fail to get the power_saving_mode status value");
        BT_DBG("flight_mode = %d, power_saving_mode = %d", flight_mode, power_saving_mode);
 #endif
-#endif
        BT_DBG("flight_mode = %d, power_saving_mode = %d", flight_mode, power_saving_mode);
 
        if (vconf_get_int(BT_OFF_DUE_TO_FLIGHT_MODE, &bt_flight_mode))
@@ -301,10 +295,8 @@ void _bt_core_init_vconf_value(void)
 
        if (flight_mode == TRUE)
                __bt_core_handle_adapter_with_flight_mode(flight_mode);
-#ifndef ENABLE_TIZEN_2_4
        else if (power_saving_mode > 0)
                __bt_core_handle_adapter_with_power_saving_mode(power_saving_mode);
-#endif
        else
                BT_ERR("");
 }
@@ -329,7 +321,6 @@ void _bt_core_handle_power_saving_mode_noti(void)
 {
 #ifndef TIZEN_PROFILE_WEARABLE
        BT_DBG("+");
-#ifdef ENABLE_TIZEN_2_4
        int ret = 0;
 
        ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_PSMODE,
@@ -337,7 +328,6 @@ void _bt_core_handle_power_saving_mode_noti(void)
        if (ret < 0)
                BT_ERR("Unable to register key handler");
 #endif
-#endif
 }
 
 void _bt_core_unregister_vconf_handler(void)
@@ -348,11 +338,9 @@ void _bt_core_unregister_vconf_handler(void)
 #endif
 
 #ifndef TIZEN_PROFILE_WEARABLE
-#ifdef ENABLE_TIZEN_2_4
        vconf_ignore_key_changed(VCONFKEY_SETAPPL_PSMODE,
                        (vconf_callback_fn)__bt_core_power_saving_mode_cb);
 #endif
-#endif
 
        return;
 }