Bug 794791 - [b2g-bluetooth] Update Device/Adapter properties table; r=qdot
authorEric Chou <echou@mozilla.com>
Thu, 27 Sep 2012 10:28:19 -0700
changeset 108319 e670c29ea6feefbaecca1fe2c43bc421110acff3
parent 108318 1efdcc6dc41b20f0b715321af436e316a7fee3d9
child 108320 198e780680c1943cfc4836b71a2e81e36a5e712d
push idunknown
push userunknown
push dateunknown
reviewersqdot
bugs794791
milestone18.0a1
Bug 794791 - [b2g-bluetooth] Update Device/Adapter properties table; r=qdot
dom/bluetooth/BluetoothDevice.cpp
dom/bluetooth/linux/BluetoothDBusService.cpp
--- a/dom/bluetooth/BluetoothDevice.cpp
+++ b/dom/bluetooth/BluetoothDevice.cpp
@@ -115,25 +115,17 @@ BluetoothDevice::SetPropertyByValue(cons
     mPath = value.get_nsString();
   } else if (name.EqualsLiteral("Address")) {
     mAddress = value.get_nsString();
   } else if (name.EqualsLiteral("Class")) {
     mClass = value.get_uint32_t();
   } else if (name.EqualsLiteral("Icon")) {
     mIcon = value.get_nsString();
   } else if (name.EqualsLiteral("Connected")) {
-#ifdef MOZ_WIDGET_GONK
-    // Connected is an 2-byte array
-    // arr[0]: boolean value, true means connected, false means disconnected
-    // arr[1]: disconnection reason
-    InfallibleTArray<uint8_t> arr = value.get_ArrayOfuint8_t();
-    mConnected = (arr[0] == 1);
-#else
     mConnected = value.get_bool();
-#endif
   } else if (name.EqualsLiteral("Paired")) {
     mPaired = value.get_bool();
   } else if (name.EqualsLiteral("UUIDs")) {
     mUuids = value.get_ArrayOfnsString();
     nsresult rv;
     nsIScriptContext* sc = GetContextForEventHandlers(&rv);
     if (sc) {
       rv =
--- a/dom/bluetooth/linux/BluetoothDBusService.cpp
+++ b/dom/bluetooth/linux/BluetoothDBusService.cpp
@@ -76,21 +76,17 @@ typedef struct {
 
 static Properties sDeviceProperties[] = {
   {"Address", DBUS_TYPE_STRING},
   {"Name", DBUS_TYPE_STRING},
   {"Icon", DBUS_TYPE_STRING},
   {"Class", DBUS_TYPE_UINT32},
   {"UUIDs", DBUS_TYPE_ARRAY},
   {"Paired", DBUS_TYPE_BOOLEAN},
-#ifdef MOZ_WIDGET_GONK
-  {"Connected", DBUS_TYPE_ARRAY},
-#else
   {"Connected", DBUS_TYPE_BOOLEAN},
-#endif
   {"Trusted", DBUS_TYPE_BOOLEAN},
   {"Blocked", DBUS_TYPE_BOOLEAN},
   {"Alias", DBUS_TYPE_STRING},
   {"Nodes", DBUS_TYPE_ARRAY},
   {"Adapter", DBUS_TYPE_OBJECT_PATH},
   {"LegacyPairing", DBUS_TYPE_BOOLEAN},
   {"RSSI", DBUS_TYPE_INT16},
   {"TX", DBUS_TYPE_UINT32},