Граф коммитов

852 Коммитов

Автор SHA1 Сообщение Дата
Shawn Huang 470f62290d Bug 977023 - [bluedroid][KK] AVRCP 1.3/1.4 Pass Through command for fastwd and rewind command. r=gyeh 2014-04-04 08:19:48 -04:00
Carsten "Tomcat" Book 873720ec22 Backed out changeset 3ad927b99e82 (bug 972249) for permanent test failure in marionette on a CLOSED TREE 2014-04-03 15:09:43 +02:00
Thomas Zimmermann dcd2bcd10b Bug 972249: Remove |sGetPropertyMonitor|, r=echou
This bug has probably been solved by bug 983576, so we can remove
the extra locking.
2014-04-03 13:01:09 +02:00
Jamin Liu ce3a6d74e2 Bug 860698 - B2G Bluetooth: Add a test case for discover remote device through BluetoothAdapter. r=vyang, r=echou 2014-04-02 08:51:46 -04:00
Ben Tian 78473067ed Bug 990428 - Do not reset mSlcConnected=false when indicator status update is disabled, f=jaliu, r=echou 2014-04-01 14:40:49 +08:00
Dave Hylands 8d3c875bf6 Bug 984269 - Fix bustage on a CLOSED TREE 2014-04-01 16:32:21 -07:00
Ryan VanderMeulen 0d5b7940ce Merge inbound to m-c. 2014-04-01 16:45:00 -04:00
Jamin Liu ff14390381 Bug 988111 - Unregister Bluetooth signal handler when BT objects were disconnected from owner window. r=echou, f=shuang 2014-04-01 08:58:56 -04:00
Jamin Liu 02da1fe1b4 Bug 980039 - Don't create BT adapter if the owner window of BT manager was cleaned up. r=echou, f=shuang
It's meaningless to create a adapter for a BluetoothManager which was disconnected from its owner window.
2014-04-01 08:58:55 -04:00
Jamin Liu 3a8f5a713d Bug 860697 - B2G Bluetooth: Add test cases to set/get properties of BluetoothAdapter. r=vyang, r=echou 2014-04-01 08:58:54 -04:00
Ben Tian f9d9512acb Bug 984284 - [m-c] a2dp headset icon show on the notification bar, r=echou 2014-03-26 17:02:40 +08:00
Masayuki Nakano 930436ef24 Bug 984269 Rename nsDOMEventTargetHelper to mozilla::DOMEventTargetHelper r=smaug
--HG--
rename : dom/events/nsDOMEventTargetHelper.cpp => dom/events/DOMEventTargetHelper.cpp
rename : dom/events/nsDOMEventTargetHelper.h => dom/events/DOMEventTargetHelper.h
2014-04-01 15:13:50 +09:00
Thomas Zimmermann 41ccdb8f5d Bug 983576: Annotate all assertions for non-main threads in BlueZ backend, r=echou
This patch adds an annotation to each assertion for non-main threads in
the BlueZ backend of Bluetooth. This should make is easy and obvious to
see in which context a method or function is expected to run.
2014-03-27 11:43:49 +01:00
Thomas Zimmermann f756e17674 Bug 983576: Annotate global BlueZ variables, r=echou
The global variables in BluetoothDBusService.cpp are now annotated
for their multi-threading access. Some code still seems to access
some of these variables in an unprotected manner. Follow-up patches
should clean this up.

As a side effect, this patch makes several variables as constant,
which improves correctness of the code.
2014-03-27 11:43:49 +01:00
Thomas Zimmermann 49823019b0 Bug 983576: Fail if sDBusConnection is not set, r=echou
Until now, we had corner cases in Bluetooth where DBus messages might
have been received on connections that are shutting down. This can't
happen any longer and this patch replaces the respective tests with
assertions.
2014-03-27 11:43:49 +01:00
Thomas Zimmermann 371fc3f23b Bug 983576: Refactor BlueZ start/stop code, r=echou
With this patch, the start code of Bluetooth's BlueZ back mostly
runs on the I/O thread. Only the loading of the BT firmware and
the blocking connection setup is done on the BT thread.

The stop code has been moved to the I/O thread, except for some
initial waiting and the final cleanup of the firmware. The code
doesn't wait for errors anymore when cleaning up the connection
to DBus. This makes it run completely non-blocking. The initial
waiting may later be replaced by something more sophisticated.
2014-03-27 11:43:48 +01:00
Thomas Zimmermann b2c765fcbf Bug 983576: Move DispatchToBtThread to mozilla::bluetooth namespace, r=echou
This patch moves DispatchToBtThread to mozilla::bluetooth, so that
it is available on the I/O thread.
2014-03-27 11:43:48 +01:00
Jocelyn Liu 11efa3b360 Bug 986375 - Use defined constants for HFP result code to avoid typo. r=echou 2014-03-26 19:08:00 +01:00
Thomas Zimmermann 697d1bf608 Bug 985949: Correctly forget pointer references in Bluedroid backend, r=echou
This patch fixes a regression from bug 967364. An nsRefPtr is now
correctly cleared by |forget| without causing a crash.
2014-03-24 10:44:29 +01:00
Thomas Zimmermann f48e139273 Bug 985949: Fix pointer handling in BlueZ backend, r=echou
This is caused by bug 967364. We need to hand over data structures
to DBus operations and forget about them if the operation returned
success. Until now, we could just tell their nsRefPtrs to |forget|
about them, but with bug 967364 applied we need to swap an empty
value into the pointer.
2014-03-24 10:44:28 +01:00
Shawn Huang 187be6656a Bug 986352 - [bluedroid] Fix hfp-fallback build break due to miss Reset() for BluetoothHfpManager, r=echou 2014-03-21 17:12:16 +08:00
Thomas Zimmermann 23eb2cae61 Bug 979370: Remove |BluetoothService::IsEnabledInternal|, r=echou
The method |IsEnabledInternal| of |BluetoothService| is not used
any longer. This patch removes it.
2014-03-14 10:50:29 +01:00
Thomas Zimmermann a7b1e31f1b Bug 979370: Remove |ToggleBtTask|, r=echou
|ToggleBtTask| runs on the same thread as the start and stop methods
of |BluetoothService|. This patch merges the code of |ToggleBtTask|
into the start and stop methods and removes the class.
2014-03-14 10:50:18 +01:00
Thomas Zimmermann 7cdb5bf24d Bug 979370: Split |BluetoothService::StartStopBluetooth|, r=echou
This patch splits |BluetoothService::StartStopBluetooth| into two
separate functions. Both have mostly different code paths.
2014-03-14 10:50:02 +01:00
Thomas Zimmermann cdaa2663bf Bug 979370: Move Bluetooth thread into BlueZ backend, r=echou
The Bluetooth thread is only necessary for starting and stopping
Bluetooth with the BlueZ backend. Bluedroid implements its multi-
threading internally.

This patch moves the Bluetooth thread into the BlueZ backend. Two
runnables implement the starting and stopping code. The methods
|StartInternal| and |StopInternal| of |BluetoothDBusService| each
create an instance of the respective runnable and send it to the
internal BT thread. The code in |BluetoothService| runs completely
on the main thread.

For the Bluedroid back end, the patch changes a number of thread
assertions.
2014-03-14 10:49:33 +01:00
Shawn Huang 276d7a631f Bug 976485 - [bluedroid] Fix sometimes Avrcp 1.3 play status is out of sync. r=gyeh 2014-03-13 09:12:41 -04:00
Ben Tian 1201c02cee Bug 981458 - Revise +CIEV string for battery charge indicator, r=gyeh 2014-03-12 17:21:07 +08:00
Vicamo Yang e02ccd0835 Bug 957917 - 2/2: test cases. r=hsinyi 2014-03-11 22:18:00 +08:00
Shawn Huang feba044fd1 Bug 979160 - Outgoing connection failure shall trigger OnConnect instead of OnDisconnect, r=echou 2014-03-10 10:33:32 +08:00
Ryan VanderMeulen cb6ce085e9 Backed out changesets a7ea2d51414d and 901717199390 (bug 957917) for causing bug 980375. 2014-03-06 16:30:35 -05:00
Thomas Zimmermann 1e4c0c54eb Bug 978809: Send ToggleBtAck after finishing BlueZ connection setup, r=echou
With this patch, ToggleBtAck is sent by the BlueZ backend of
Bluetooth after the connection has been set up completely.
2014-03-06 12:45:16 +01:00
Thomas Zimmermann e36fd9541b Bug 978809: Remove sToggleBtMonitor from Bluedroid backend, r=echou
When enabling or disabling Bluetooth, the Bluedroid backend waits
on sToggleBtMonitor until a BT adapter has been activated. Once
the monitor gets notified, the backend sends a ToggleBtAck runnable
to the main thread.

This patch removes sToggleBtMonitor from the Bluetooth Bluedroid
backend. Instead of signalling the monitor's notification, the
Bluedroid handler function sends the ToggleBtAck directly.
2014-03-06 12:43:35 +01:00
Eric Chou 1a2e41ef89 Bug 976943 - Replace OnConnect/OnDisconnect with one function, f=btian, r=gyeh
In BluetoothProfileController, it's meaningless to separate OnConnect
and OnDisconnect since the following steps would be the same for both
cases. Therefore I introduced a function called NotifyCompletion() for
each profile manager to report the completion of connecting/disconnecting
operations.
2014-03-06 19:26:28 +08:00
Eric Chou c3b5cb5574 Bug 976943 - Add error handing for connect/disconnect process, f=btian, r=gyeh 2014-03-06 19:26:22 +08:00
Eric Chou 7bb536bce6 Bug 976883 - Handle unknown property sent from bt stack properly, f=btian, r=shuang 2014-03-05 15:50:54 +08:00
Shawn Huang bc17206b08 Bug 951634: Add TimerCallback in Profile Controller, r=gyeh 2014-01-29 19:13:10 +08:00
Vicamo Yang b4077f06b2 Bug 957917 - 2/2: test cases. r=hsinyi 2014-03-05 10:37:45 +08:00
Jamin Liu 98714c3135 Bug 972730 - Avoid disabling BT before the BT adapter is initialized in marionette test. r=echou, f=vicamo
The current Bluetooth API can't allow user to disable BT before the BT
adapter is initialized.
In practice, We block the clicking event in gaia layer to prevent user
to turn off BT before BT enable procedure complete.
If we use marionette test to force emulator turn on and turn off BT in
a short period of time, it may crash emulator.

Listen to 'adapteradded' event rather than 'enabled' as the end of
BT enable to make sure we wouldn't disable BT when it's not ready.
2014-03-03 10:20:24 -05:00
Thomas Zimmermann 3f6340544d Bug 977146: Push ToggleBtAck into implementations of {Start|Stop}Internal, r=echou
The methods {Start|Stop}Internal for BlueZ and Bluedroid now send
ToggleBtAck to signal completeness of the operation.

The current patch allows for further cleanups in the BlueZ code. It
does not change the semantics or code flow.
2014-03-03 13:07:17 +01:00
Thomas Zimmermann bb87fe4d28 Bug 977146: Declare ToggleBtAck in header file, r=echou
Declaring ToggleBtAck in the header file of BluetoothService makes
it available ot others classes.
2014-03-03 13:07:17 +01:00
Thomas Zimmermann d3e5381cea Bug 977146: Set PROP_BLUETOOTH_ENABLED in ToggleBtAck, r=echou
PROP_BLUETOOTH_ENABLED signals the Bluetooth state to other
components in the system. Setting its value in ToggleBtAck
on the main thread avoids duplicated code in the upcoming
patches.
2014-03-03 13:07:16 +01:00
Carsten "Tomcat" Book 01f93d64ea Merge mozilla-central to b2g-inbound 2014-02-27 15:59:39 +01:00
Hsin-Yi Tsai b7e0a2c555 Bug 881174 - part5 - cdma 3way call: BT. r=gyeh 2014-02-21 17:53:23 +08:00
Ben Tian 92255142aa Bug 939672 - Patch 2/2: Move NS_DECL_ISUPPORTS and NS_DECL_NSIOBSERVER into BluetoothProfileManagerBase.h 2014-02-20 18:15:47 +08:00
Ben Tian c16cd5a358 Bug 939672 - Patch 1/2: [bluedroid] Add fallback BluetoothHfpManager, r=gyeh
--HG--
rename : dom/bluetooth/bluedroid/BluetoothHfpManager.cpp => dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp
rename : dom/bluetooth/bluedroid/BluetoothHfpManager.h => dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
2014-02-25 11:37:37 +08:00
Ben Tian 81fa60b1c1 Bug 972732 - Patch 1/2: Remove bluez/linux and bluedroid/gonk folders, r=echou
--HG--
rename : dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.cpp => dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
rename : dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.h => dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
rename : dom/bluetooth/bluez/linux/BluetoothDBusService.cpp => dom/bluetooth/bluez/BluetoothDBusService.cpp
rename : dom/bluetooth/bluez/linux/BluetoothDBusService.h => dom/bluetooth/bluez/BluetoothDBusService.h
2014-02-25 10:38:51 +08:00
Ehsan Akhgari dea85f2037 Bug 975732 - Move one CXXFLAGS variable in dom/bluetooth to DEFINES; r=mshal 2014-02-22 21:42:12 -05:00
Ehsan Akhgari 7e41f47adf Bug 935778 - Part 0.4: Spray even more MOZ_DECLARE_REFCOUNTED_TYPENAME across the tree 2014-02-21 09:11:33 -05:00
Thomas Zimmermann 46edc5eb77 Bug 972253: Remove GetDBusConnection, r=echou
All calls to GetDBusConnection have been replaced by direct references
to sDBusConnection.
2014-02-20 12:56:11 +01:00
Thomas Zimmermann 9dc09442a0 Bug 972253: Cleanup Start/Stop methods in BlueZ backend, r=echou
This patch cleans up the code for starting and stopping DBus
connections in the BlueZ backend of Bluetooth. It also fixes
a bug were the initial 'adapteradded' reply might have been
missed.
2014-02-20 12:55:57 +01:00