diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-02 22:54:33 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-02 22:54:33 -0800 |
commit | 3dec7d563a2f3e1eb967ce2054a00b6620e3558c (patch) | |
tree | aa3b0365c47cb3c1607c0dc76c8d32b4046fc287 /core/jni/android_server_BluetoothEventLoop.cpp | |
parent | 15ab3eae2ec3d73b3e8aa60b33ae41445bf83f4b (diff) | |
download | frameworks_base-3dec7d563a2f3e1eb967ce2054a00b6620e3558c.zip frameworks_base-3dec7d563a2f3e1eb967ce2054a00b6620e3558c.tar.gz frameworks_base-3dec7d563a2f3e1eb967ce2054a00b6620e3558c.tar.bz2 |
auto import from //depot/cupcake/@137055
Diffstat (limited to 'core/jni/android_server_BluetoothEventLoop.cpp')
-rw-r--r-- | core/jni/android_server_BluetoothEventLoop.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/jni/android_server_BluetoothEventLoop.cpp b/core/jni/android_server_BluetoothEventLoop.cpp index 9100e81..adfd912 100644 --- a/core/jni/android_server_BluetoothEventLoop.cpp +++ b/core/jni/android_server_BluetoothEventLoop.cpp @@ -721,6 +721,7 @@ static jboolean waitForAndDispatchEventNative(JNIEnv *env, jobject object, #define BOND_RESULT_AUTH_REJECTED 2 #define BOND_RESULT_AUTH_CANCELED 3 #define BOND_RESULT_REMOTE_DEVICE_DOWN 4 +#define BOND_RESULT_DISCOVERY_IN_PROGRESS 5 void onCreateBondingResult(DBusMessage *msg, void *user) { LOGV(__FUNCTION__); @@ -755,10 +756,14 @@ void onCreateBondingResult(DBusMessage *msg, void *user) { // already bonded LOGV("... error = %s (%s)\n", err.name, err.message); result = BOND_RESULT_SUCCESS; - } else if (!strcmp(err.name, BLUEZ_DBUS_BASE_IFC ".Error.InProgress")) { - // don't make the java callback + } else if (!strcmp(err.name, BLUEZ_DBUS_BASE_IFC ".Error.InProgress") && + !strcmp(err.message, "Bonding in progress")) { LOGV("... error = %s (%s)\n", err.name, err.message); goto done; + } else if (!strcmp(err.name, BLUEZ_DBUS_BASE_IFC ".Error.InProgress") && + !strcmp(err.message, "Discover in progress")) { + LOGV("... error = %s (%s)\n", err.name, err.message); + result = BOND_RESULT_DISCOVERY_IN_PROGRESS; } else { LOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message); result = BOND_RESULT_ERROR; |