Update AG and HF agent codes from wearable product
[platform/core/connectivity/bluetooth-agent.git] / hf-agent / bluetooth-hf-agent.c
index 1bf622f..90435e4 100644 (file)
@@ -2895,6 +2895,24 @@ static void __bt_establish_initialization(bt_hf_agent_info_t *bt_hf_info)
        else
                ERR("BT_HF_XSAT sending failed");
 
+       if (TIZEN_PROFILE_WEARABLE) {
+               /* send Bluetooth Samsung Support Feature cmd */
+               ret = __bt_hf_send_and_read(bt_hf_info, BT_HF_BSSF, buf,
+                                                       sizeof(BT_HF_BSSF) - 1);
+
+               /* If we got a 'OK' reply, peer AG is samsung device.
+                * Otherwise, non-samsung device */
+               if (ret && strstr(buf, "OK"))
+                       bt_hf_info->is_companion_dev = TRUE;
+               else
+                       bt_hf_info->is_companion_dev = FALSE;
+
+               if (ret)
+                       INFO("SLC completed with [%s] device",
+                               bt_hf_info->is_companion_dev ? "SS Companion" : "Other");
+               else
+                       ERR("BT_HF_BSSF sending failed");
+       }
 }
 
 static void __bt_hf_agent_sigterm_handler(int signo)