From: Lee Hyuk Date: Thu, 23 Mar 2017 08:23:28 +0000 (+0900) Subject: Auto accept for requesting to headless device X-Git-Tag: accepted/tizen/common/20170324.122714~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac1ba21c5370b4c9322d5cbee5f03eeed1d784c6;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Auto accept for requesting to headless device Change-Id: I64043a8a5f812ed198a1392de83af67ee537efad Signed-off-by: Lee Hyuk --- diff --git a/bt-service/bt-service-agent.c b/bt-service/bt-service-agent.c index 82e18d1..3457d77 100644 --- a/bt-service/bt-service-agent.c +++ b/bt-service/bt-service-agent.c @@ -642,13 +642,16 @@ fail: request_type = BT_AGENT_EVENT_MAP_REQUEST; /* TODO: MAP is already here */ - if (trust) { - BT_INFO("Trusted device, so authorize\n"); + if (trust || !headed_plugin_info->plugin_headed_enabled) { + BT_INFO("Trusted or Headless device, so authorize\n"); gap_agent_reply_authorize(agent, GAP_AGENT_ACCEPT, NULL); - } else { - if (headed_plugin_info->plugin_headed_enabled) - headed_plugin_info->headed_plugin->bt_launch_system_popup(request_type, name, auth_info, NULL, NULL, + + goto done; + } + + if (headed_plugin_info->plugin_headed_enabled) { + headed_plugin_info->headed_plugin->bt_launch_system_popup(request_type, name, auth_info, NULL, NULL, _gap_agent_get_path(agent)); }