Remove auto-accpept concept as latest wearable product 27/80327/1 accepted/tizen/common/20160718.155227 accepted/tizen/ivi/20160717.035303 accepted/tizen/mobile/20160717.035316 accepted/tizen/tv/20160717.035202 accepted/tizen/wearable/20160717.035220 submit/tizen/20160716.123214
authorDoHyun Pyun <dh79.pyun@samsung.com>
Sat, 16 Jul 2016 12:13:27 +0000 (21:13 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Sat, 16 Jul 2016 12:13:27 +0000 (21:13 +0900)
Change-Id: I5499bbbb13dade0796f57500be2ba202cccd1952
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service/bt-service-agent.c

index c65d602..4ebd138 100644 (file)
@@ -677,55 +677,10 @@ static gboolean __confirm_request(GapAgentPrivate *agent, GDBusProxy *device,
        if (!name)
                name = address;
 
-#ifdef TIZEN_WEARABLE
-       uint32_t device_class = 0x00;
-       uint32_t major_class;
-
-       tmp_value = g_variant_lookup_value(reply, "Class", G_VARIANT_TYPE_UINT32);
-       g_variant_get(tmp_value, "u", &device_class);
-       G_VARIANT_UNREF(tmp_value);
-
-       major_class = (device_class & 0x1f00) >> 8;
-
-       if (major_class == BLUETOOTH_DEVICE_MAJOR_CLASS_AUDIO) {
-               BT_DBG("Audio device. Launch passkey pop-up");
-               _bt_launch_system_popup(BT_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST, name,
-                               str_passkey, NULL, _gap_agent_get_path(agent));
-               goto done;
-       }
-
-       if (__is_reset_required(address)) {
-               BT_INFO("Launch system reset pop-up");
-               _bt_launch_system_popup(BT_AGENT_EVENT_SYSTEM_RESET_REQUEST, name,
-                               NULL, NULL, _gap_agent_get_path(agent));
-       } else {
-               BT_INFO("Launch passkey pop-up");
-               _bt_launch_system_popup(BT_AGENT_EVENT_PASSKEY_AUTO_ACCEPTED, name,
-                               str_passkey, NULL, _gap_agent_get_path(agent));
-
-               gap_agent_reply_confirmation(agent, GAP_AGENT_ACCEPT, NULL);
-       }
-#else
-#ifdef AUTO_ACCEPT
-       BT_DBG("Confirm reply");
-       gap_agent_reply_confirmation(agent, GAP_AGENT_ACCEPT, NULL);
-#else
-       if (syspopup_mode) {
-               BT_DBG("LAUNCH SYSPOPUP");
-               _bt_launch_system_popup(BT_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST, name,
-                               str_passkey, NULL,
-                               _gap_agent_get_path(agent));
-       } else {
-               int result = BLUETOOTH_ERROR_NONE;
-               GVariant *param;
-
-               BT_DBG("Send BLUETOOTH_EVENT_PASSKEY_CONFIRM_REQUEST");
-               param = g_variant_new("(isss)", result, address, name, str_passkey);
-               _bt_send_event(BT_ADAPTER_EVENT,
-                               BLUETOOTH_EVENT_PASSKEY_CONFIRM_REQUEST, param);
-       }
-#endif
-#endif
+       BT_DBG("LAUNCH SYSPOPUP");
+       _bt_launch_system_popup(BT_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST, name,
+                       str_passkey, NULL,
+                       _gap_agent_get_path(agent));
 
 done:
        g_variant_unref(reply);