Fix the bug for bluetooth file share 90/89990/1 accepted/tizen/3.0/ivi/20161011.055316 accepted/tizen/3.0/mobile/20161015.033913 accepted/tizen/3.0/tv/20161016.005146 accepted/tizen/3.0/wearable/20161015.083942 accepted/tizen/common/20160928.164303 accepted/tizen/ivi/20160929.002009 accepted/tizen/mobile/20160929.001905 accepted/tizen/tv/20160929.001918 accepted/tizen/wearable/20160929.002045 submit/tizen/20160928.062430 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000005 submit/tizen_3.0_mobile/20161015.000005 submit/tizen_3.0_tv/20161015.000004 submit/tizen_3.0_wearable/20161015.000005
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 28 Sep 2016 04:14:40 +0000 (13:14 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 28 Sep 2016 04:14:40 +0000 (13:14 +0900)
Change-Id: I7d89f4209873644e3f5e346f5d3199e39e4339a6
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bt-syspopup-m.c

index 22797044f4d3e3f8adb487a63f60d5a96fdd6c1f..90c424cd9d29b5f20e5affb45c2a89542302e359 100644 (file)
@@ -884,6 +884,8 @@ static void __bluetooth_authorization_request_cb(void *data,
                reply_val = BT_AGENT_CANCEL;
        }
 
+       BT_DBG("reply_val: %d", reply_val);
+
        g_dbus_proxy_call(ad->agent_proxy,
                                "ReplyAuthorize",
                                g_variant_new("(u)", reply_val),
@@ -1908,11 +1910,29 @@ static void __bluetooth_delete_input_view(struct bt_popup_appdata *ad)
 static GDBusProxy* __bluetooth_create_agent_proxy(GDBusConnection *conn,
                                                                const char *path)
 {
-       return g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
-                       NULL, "org.projectx.bt",
-                       path,
-                       "org.bluez.Agent1",
-                       NULL, NULL);
+       if (g_strcmp0(path, "/org/bluez/hfp_agent") == 0) {
+               BT_INFO("AG Agent requested");
+               return g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
+                               NULL, "org.bluez.ag_agent",
+                               path,
+                               "org.bluez.Profile1",
+                               NULL, NULL);
+       } else if(g_strcmp0(path, "/org/obex/server_agent") == 0) {
+               BT_INFO("bt-service %s requested", path);
+               return g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
+                               NULL, "org.projectx.bt",
+                               path,
+                               "org.bluez.obex.reply",
+                               NULL, NULL);
+
+       } else {
+               return g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
+                               NULL, "org.projectx.bt",
+                               path,
+                               "org.bluez.Agent1",
+                               NULL, NULL);
+       }
+
 }
 
 static void