Commit Graph

119 Commits

Author SHA1 Message Date
Thomas Zimmermann
a820dabab4 Bug 1027030: Convert Bluetooth to use Bluedroid wrappers, r=shuang
This patch converts the Bluedroid backend to use the wrapper
classes. The affected interfaces are Core, Sockets, Handsfree,
A2DP, and AVRCP.
2014-06-27 15:45:26 +08:00
Thomas Zimmermann
a95f1c7908 Bug 1027030: Wrap Bluedroid interfaces in classes, r=shuang
This patch adds classes around all Bluedroid interfaces that are
currently used by Gecko. These are Core, Socket, Handsfree, A2DP,
and AVRCP.

All arguments and return values are still Bluedroid types and
constants. Future patches will convert them to interface-neutral
artifacts.
2014-06-27 15:45:26 +08:00
Shawn Huang
8a0bdc092c Bug 1027506 - [bluedroid] Don't reset call array after HFP link lost, r=echou 2014-06-26 09:58:50 +08:00
Shawn Huang
1ce0b655c9 Bug 1015819 - Part 1: [bluedroid] Restore CoD value based on SDP records. r=echou, f=btian 2014-06-20 00:48:00 -04:00
Shawn Huang
72f81139b3 Bug 989976 - [bluedroid] Hit SIGBUS on unaligned access while doing AdapterPropertiesChangeCallback. r=echou 2014-06-17 01:38:00 -04:00
Vicamo Yang
cff89f3dbc Bug 927320 - 1/2: rename TelephonyProvider to TelephonyService. r=aknow
--HG--
rename : dom/telephony/gonk/TelephonyProvider.js => dom/telephony/gonk/TelephonyService.js
rename : dom/telephony/gonk/TelephonyProvider.manifest => dom/telephony/gonk/TelephonyService.manifest
rename : dom/telephony/ipc/TelephonyIPCProvider.cpp => dom/telephony/ipc/TelephonyIPCService.cpp
rename : dom/telephony/ipc/TelephonyIPCProvider.h => dom/telephony/ipc/TelephonyIPCService.h
rename : dom/telephony/nsIGonkTelephonyProvider.idl => dom/telephony/nsIGonkTelephonyService.idl
rename : dom/telephony/nsITelephonyProvider.idl => dom/telephony/nsITelephonyService.idl
2014-06-03 22:15:25 +08:00
Eric Chou
9f74e62745 Bug 1015826 - Dispatch part of BondStateChangedCallback to main thread, r=tzimmermann 2014-05-29 11:24:09 +08:00
Eric Chou
8020037f26 Bug 1015826 - Dispatch part of RemoteDevicePropertiesCallback to main thread, r=tzimmermann 2014-05-29 11:24:07 +08:00
Eric Chou
2c49c88962 Bug 1015826 - Use Atomic to ensure thread-safe, r=tzimmermann 2014-05-29 11:24:05 +08:00
Eric Chou
5e386daa49 Bug 1015826 - Dispatch part of AdapterPropertiesCallback to main thread, r=tzimmermann
Please note that sSetPropertyRunnableArray[0] should be fired after
firing "PropertyChanged" to BluetoothAdapter, however this is not
guaranteed in current implementation. This patch also fixed this
potential problem.
2014-05-29 11:24:03 +08:00
Eric Chou
15ea6c70e6 Bug 1015826 - Remove unneccessary variable sIsBtEnabled to avoid racing issues, r=tzimmermann 2014-05-29 11:24:02 +08:00
Eric Chou
2199448d26 Bug 942104 - Notify BluetoothAdapter about discovery state changed (bluedroid), r=gyeh 2014-05-23 14:01:37 +08:00
Birunthan Mohanathas
189593520f Bug 869836 - Part 4: Use EqualsLiteral instead of Equals(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas
0e6f3a6562 Bug 869836 - Part 3: Use Append('c') instead of AppendLiteral("c"). r=ehsan 2014-05-22 06:48:51 +03:00
Shawn Huang
619acef8fd Bug 1005901 - [bluedroid] Always do cleanup after disable. r=btian 2014-05-16 04:48:00 -04:00
Thomas Zimmermann
5ad6357538 Bug 997137: Inherit |DroidSocketImpl| from |UnixFdWatcher|, r=echou
This patch converts |DroidSocketImpl| to inherit from |UnixFdWatcher|.
|UnixFdWatcher| maintains a Unix file descriptor on the I/O loop, and
replaces similar functionality in |DroidSocketImpl|.

As a side effect, all file descriptors in |DroidSocketImpl| are now
non-blocking. This does change the way how the code works, but ensures
that it doesn't block on the I/O thread.
2014-05-14 13:21:10 +02:00
Edgar Chen
2afd371dff Bug 898445 - Part 3: Bluetooth changes for MobileConnection webidl. r=echou 2014-02-25 18:01:23 +08:00
Ben Tian
86e0e103e0 Bug 1003020 - Update to the latest battery level when HFP manager initializes, r=shuang 2014-04-29 19:12:36 +08:00
Jamin Liu
524061df61 Bug 1003663 - Handle the case that user turn off BT during the middle of BT reply. r=echou, f=shuang
- End the session if BT is turn off during the middle of BT profile connection.
- Clear static queues(array) when BT is on.
2014-05-08 19:20:15 +08:00
Jamin Liu
74cef88c2b Bug 1003657 - Don't keep reference in GetDefaultAdapterPathInternal() to avoid memory leak. r=echou, f=shuang 2014-05-06 11:45:51 +08:00
Ben Tian
85369d6c23 Bug 1003762 - [bluedroid] Notify BluetoothRilListener of service change, r=echou 2014-05-05 09:28:20 +08:00
Birunthan Mohanathas
5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Ben Tian
e7082d69f6 Bug 997580 - Don't notify bluedroid of callstate change during transition. r=echou 2014-04-24 11:56:11 +08:00
Ben Tian
21a9d0c6a6 Bug 993286 - Patch 3/3: Add Call.Set() function, r=echou, a=1.4+ 2014-04-21 18:19:53 +08:00
Ben Tian
0006f8f1ad Bug 993286 - Patch 2/3: Support AT+CHLD=3 to merge calls, r=echou, a=1.4+ 2014-04-24 14:55:27 +08:00
Ben Tian
4a4ef6382a Bug 993286 - Patch 1/3: Get call setup state from call array, r=echou, a=1.4+ 2014-04-24 13:56:07 +08:00
Jocelyn Liu
6b09a27335 Bug 993289: Fix the logic while updating call setup state, f=btian, r=echou 2014-04-22 16:42:38 +08:00
Jocelyn Liu
326e43c775 Bug 993288 - Separate BTHF_CALL_STATE_INCOMING and BTHF_CALL_STATE_WAITING for CLCC response only, for other cases, use BTHF_CALL_STATE_INCOMING for both states. r=echou 2014-04-17 16:55:45 +08:00
Jocelyn Liu
19cd47bd80 Bug 993290 - Respond OK after receiving ATDxxx and improve readability on ProcessDialCall(). r=echou 2014-04-17 03:09:00 +02:00
Shawn Huang
455b1b0792 Bug 994411 - [bluedroid] Ignore pending MO call index, while making MO call with bluetooth headset, r=echou 2014-04-17 17:38:28 +08:00
Jocelyn Liu
699102977d Bug 993280: Respond OK to HF for AT+CLCC and AT+CHLD, r=echou 2014-04-17 17:18:57 +08:00
Thomas Zimmermann
4b9aa1f628 Bug 992922: Cleanup unused code for Bluedroid sockets 2014-04-15 15:35:00 +02:00
Thomas Zimmermann
e130f1fb48 Bug 992922: Move listen operation to |DroidSocketImpl|, r=echou, f=shuang
With this patch, the listen operation for Bluedroid sockets
runs on the I/O thread. The related interface is identical to
the one of |UnixSocketConsumer|.
2014-04-15 15:35:00 +02:00
Thomas Zimmermann
81f060c650 Bug 992922: Move connect operation to |DroidSocketImpl|, r=echou, f=shuang
With this patch, the connect operation for Bluedroid sockets
runs on the I/O thread. The related interface is identical to
the one of |UnixSocketConsumer|.
2014-04-15 15:35:00 +02:00
Ben Tian
e8b4284209 Bug 995061 - Patch 2/2: [bluedroid] apply macro to append named value in bluetooth service, r=echou 2014-04-11 11:52:58 +08:00
Ben Tian
acf3671de1 Bug 995061 - Patch 1/2: [bluedroid] define and apply macro to append named value in profile managers, r=echou 2014-04-11 11:52:44 +08:00
Ben Tian
d6ec57b510 Bug 993278 - [bluedroid][HFP] Respond OK even if subscriber number information is empty, r=echou 2014-04-10 16:32:54 +08:00
Ben Tian
145b3964a3 Bug 993275 - [Bluedroid] Ensure icon for audio service devices, r=echou 2014-04-14 09:50:47 +08:00
Ben Tian
a79696fb7f Bug 989845 - [bluedroid] Implement KeyPressedCallback to handle HSP commands, r=echou 2014-04-09 17:44:03 +08:00
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
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
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
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
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
Shawn Huang
feba044fd1 Bug 979160 - Outgoing connection failure shall trigger OnConnect instead of OnDisconnect, r=echou 2014-03-10 10:33:32 +08: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