Commit Graph

852 Commits

Author SHA1 Message Date
Shawn Huang
b140a61fc3 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
86f64e50c7 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
dc1661df84 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
091b0c9469 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
44b29d714f 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
0afb7715b3 Bug 984269 - Fix bustage on a CLOSED TREE 2014-04-01 16:32:21 -07:00
Ryan VanderMeulen
6a3fa988ca Merge inbound to m-c. 2014-04-01 16:45:00 -04:00
Jamin Liu
590fcf6f3e 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
31875fd9d8 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
26e7826180 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
01a9265b6c Bug 984284 - [m-c] a2dp headset icon show on the notification bar, r=echou 2014-03-26 17:02:40 +08:00
Masayuki Nakano
54d409dfca 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
c9dc7ab17c 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
3613f3d91e 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
866006ef98 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
92743c5ab4 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
a0cd2b4846 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
9b2b4705a6 Bug 986375 - Use defined constants for HFP result code to avoid typo. r=echou 2014-03-26 19:08:00 +01:00
Thomas Zimmermann
3de553dd1d 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
4aaccae2b5 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
b214332845 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
8b1eb0343a 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
48270a0cf3 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
37bbe5d22a 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
d5c4098cf9 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
2e7b14e994 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
a1bfbbd31e Bug 981458 - Revise +CIEV string for battery charge indicator, r=gyeh 2014-03-12 17:21:07 +08:00
Vicamo Yang
6193669e39 Bug 957917 - 2/2: test cases. r=hsinyi 2014-03-11 22:18:00 +08:00
Shawn Huang
ca6d9f4f08 Bug 979160 - Outgoing connection failure shall trigger OnConnect instead of OnDisconnect, r=echou 2014-03-10 10:33:32 +08:00
Ryan VanderMeulen
fee54ff24f Backed out changesets a7ea2d51414d and 901717199390 (bug 957917) for causing bug 980375. 2014-03-06 16:30:35 -05:00
Thomas Zimmermann
358e315d3e 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
59813d6a1f 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
e7759d8ae3 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
1fc9272c77 Bug 976943 - Add error handing for connect/disconnect process, f=btian, r=gyeh 2014-03-06 19:26:22 +08:00
Eric Chou
fbb9be6ba1 Bug 976883 - Handle unknown property sent from bt stack properly, f=btian, r=shuang 2014-03-05 15:50:54 +08:00
Shawn Huang
d55fedaad4 Bug 951634: Add TimerCallback in Profile Controller, r=gyeh 2014-01-29 19:13:10 +08:00
Vicamo Yang
1df6a7d262 Bug 957917 - 2/2: test cases. r=hsinyi 2014-03-05 10:37:45 +08:00
Jamin Liu
8eeb05bde8 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
f3401e1c87 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
714a2b2204 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
f9675b3254 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
236427f5bf Merge mozilla-central to b2g-inbound 2014-02-27 15:59:39 +01:00
Hsin-Yi Tsai
334747f140 Bug 881174 - part5 - cdma 3way call: BT. r=gyeh 2014-02-21 17:53:23 +08:00
Ben Tian
7214cc65d3 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
b0d8828c19 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
b13bcbca73 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
f870f4f3d0 Bug 975732 - Move one CXXFLAGS variable in dom/bluetooth to DEFINES; r=mshal 2014-02-22 21:42:12 -05:00
Ehsan Akhgari
f1e844fd62 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
405bf0e97a 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
dc6988b2be 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