Set the visible mode to off for mobile profile 43/87443/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 8 Sep 2016 04:46:28 +0000 (13:46 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 8 Sep 2016 04:46:28 +0000 (13:46 +0900)
Change-Id: Ibbab928ef018373c7b8e0ea644a368aafc0d480f
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service/bt-service-adapter.c

index ee04807..5d075ad 100644 (file)
@@ -470,49 +470,6 @@ static void __bt_phone_name_changed_cb(keynode_t *node, void *data)
        }
 }
 
-#ifdef TIZEN_PROFILE_MOBILE
-static void __bt_set_visible_mode(void)
-{
-       int timeout = 0;
-
-       if (vconf_get_int(BT_FILE_VISIBLE_TIME, &timeout) != 0)
-                BT_ERR("Fail to get the timeout value");
-
-#ifdef TIZEN_DPM_ENABLE
-       if (timeout == -1 ||
-       _bt_dpm_get_bluetooth_limited_discoverable_state() == DPM_RESTRICTED) {
-               if (_bt_set_discoverable_mode(
-                       BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE,
-                       timeout) != BLUETOOTH_ERROR_NONE) {
-                       if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
-                               BT_ERR("Set vconf failed");
-               }
-       } else {
-               if (_bt_set_discoverable_mode(
-                       BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE,
-                       timeout) != BLUETOOTH_ERROR_NONE) {
-                               BT_ERR("Set connectable mode failed");
-               }
-       }
-#else
-       if (timeout == -1) {
-               if (_bt_set_discoverable_mode(
-                       BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE,
-                       timeout) != BLUETOOTH_ERROR_NONE) {
-                       if (vconf_set_int(BT_FILE_VISIBLE_TIME, 0) != 0)
-                               BT_ERR("Set vconf failed");
-               }
-       } else {
-               if (_bt_set_discoverable_mode(
-                       BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE,
-                       timeout) != BLUETOOTH_ERROR_NONE) {
-                               BT_ERR("Set connectable mode failed");
-               }
-       }
-#endif
-}
-#endif
-
 static void __bt_set_local_name(void)
 {
        bluetooth_device_name_t local_name;
@@ -556,7 +513,10 @@ static int __bt_set_enabled(void)
        }
 
 #ifdef TIZEN_PROFILE_MOBILE
-       __bt_set_visible_mode();
+       /* BT setting UI will control Mobile's visible mode. So in the FRWK...set the visible mode as off: */
+       if (_bt_set_discoverable_mode(
+               BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE, 0) != BLUETOOTH_ERROR_NONE)
+                       BT_ERR("Set connectable mode failed");
 #else
 #ifdef TIZEN_TV
        if (_bt_set_discoverable_mode(