From de2558e5ccfb2612ec82f3ee627c01019ba03544 Mon Sep 17 00:00:00 2001 From: Erin Yueh Date: Fri, 23 Oct 2009 16:28:17 +0800 Subject: [PATCH] add obexd/obex-client service start and stop. --- bluedroid/bluetooth.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/bluedroid/bluetooth.c b/bluedroid/bluetooth.c index 4559eee..a22ad51 100644 --- a/bluedroid/bluetooth.c +++ b/bluedroid/bluetooth.c @@ -183,6 +183,16 @@ int bt_enable() { LOGE("Failed to start hcid"); goto out; } + LOGI("Starting obex deamon"); + if (property_set("ctl.start", "obexd") < 0) { + LOGE("Failed to start obexd"); + goto out; + } + LOGI("Starting obex client"); + if (property_set("ctl.start", "obex-client") < 0) { + LOGE("Failed to start obex-client"); + goto out; + } sleep(HCID_START_DELAY_SEC); ret = 0; @@ -215,6 +225,16 @@ int bt_disable() { goto out; } + LOGI("Stopping obex deamon"); + if (property_set("ctl.stop", "obexd") < 0) { + LOGE("Error stopping obexd"); + goto out; + } + LOGI("Stopping obex client"); + if (property_set("ctl.stop", "obex-client") < 0) { + LOGE("Error stopping obex-client"); + goto out; + } if (set_bluetooth_power(0) < 0) { goto out; } -- 1.6.0.4