From 0ddc54ca5f335c198c0ecc236f57997a61b3e3b7 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 4 Oct 2011 15:31:54 -0300 Subject: [PATCH] Set auto connect from maemo6 plugin Inform the adapter that the system has been unlocked when the MCE sends the tklock_mode_ind signal. This signal will trigger the automatic re-connections for the devices selected by the profiles. Profiles register ATTIO callbacks to indicate that ATT connection is required. --- plugins/maemo6.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/maemo6.c b/plugins/maemo6.c index e380acd58..6c341167a 100644 --- a/plugins/maemo6.c +++ b/plugins/maemo6.c @@ -57,6 +57,7 @@ static gboolean mce_bt_on = FALSE; static gboolean mce_tklock_mode_cb(DBusConnection *connection, DBusMessage *message, void *user_data) { + struct btd_adapter *adapter = user_data; DBusMessageIter args; const char *sigvalue; @@ -68,6 +69,9 @@ static gboolean mce_tklock_mode_cb(DBusConnection *connection, dbus_message_iter_get_basic(&args, &sigvalue); DBG("got signal with value %s", sigvalue); + + if (g_strcmp0("unlocked", sigvalue) == 0 && mce_bt_on) + btd_adapter_enable_auto_connect(adapter); } return TRUE; -- 2.47.3