Bug 881606 - BluetoothA2dpManager doesn't receive any sink property changed, r=echou
authorGina Yeh <gyeh@mozilla.com>
Tue, 11 Jun 2013 14:47:48 +0800
changeset 134614 89aaa839391c23491c1627c623b21223c5723d65
parent 134613 761e842067d8c5bdb5824cdada9341b4d6b411bc
child 134615 291fa6a3c170e65fa09e18b3599b731de0ed2e15
push idunknown
push userunknown
push dateunknown
reviewersechou
bugs881606
milestone24.0a1
Bug 881606 - BluetoothA2dpManager doesn't receive any sink property changed, r=echou
dom/bluetooth/linux/BluetoothDBusService.cpp
--- a/dom/bluetooth/linux/BluetoothDBusService.cpp
+++ b/dom/bluetooth/linux/BluetoothDBusService.cpp
@@ -1561,18 +1561,23 @@ EventFilter(DBusConnection* aConn, DBusM
   }
 
   if (!errorStr.IsEmpty()) {
     NS_WARNING(NS_ConvertUTF16toUTF8(errorStr).get());
     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
   }
 
   BluetoothSignal signal(signalName, signalPath, v);
-  nsRefPtr<DistributeBluetoothSignalTask> task
-    = new DistributeBluetoothSignalTask(signal);
+  nsRefPtr<nsRunnable> task;
+  if (signalInterface.EqualsLiteral(DBUS_SINK_IFACE)) {
+    task = new SinkPropertyChangedHandler(signal);
+  } else {
+    task = new DistributeBluetoothSignalTask(signal);
+  }
+
   NS_DispatchToMainThread(task);
 
   return DBUS_HANDLER_RESULT_HANDLED;
 }
 
 static bool
 GetDefaultAdapterPath(BluetoothValue& aValue, nsString& aError)
 {