Commit Graph

1209 Commits

Author SHA1 Message Date
Thomas Zimmermann
74b98b9560 Bug 992206: Use |SocketIOReceiveRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:48 +02:00
Thomas Zimmermann
814189c271 Bug 992206: Use |SocketIOEventRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:48 +02:00
Thomas Zimmermann
c0e4407084 Bug 992206: Use |SocketIORunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:47 +02:00
Thomas Zimmermann
dfd86e68a6 Bug 992206: Use |SocketConsumerBase| for Bluetooth sockets, r=shuang 2014-08-07 11:37:47 +02:00
Thomas Zimmermann
b9008c0397 Bug 992206: Cleanup fields in |DroidSocketImpl|, r=shuang
|DroidSocketImpl| contains several unused fields that are removed
by this patch.
2014-08-07 11:37:47 +02:00
Jocelyn Liu
763f8f19a9 Bug 1047757: Call ClearOnShutdown(sBluetoothService) to fix memory leak. r=shuang 2014-08-07 14:01:24 +08:00
Thomas Zimmermann
d4a10240a2 Bug 1038591: Convert Bluedroid status codes and error handlers, r=shuang
This patch converts Bluedroid status codes in Gecko to the
backend-neutral data type |BluetoothStatus|. All error handlers
have been adapted. The Bluedroid type |bt_status_t| only remains
in |BluetoothInterface|.
2014-08-06 11:45:32 +02:00
Thomas Zimmermann
ee587b2e81 Bug 1038591: Convert Bluetooth AVRCP data types in |BluetoothAvrcpInterface|, r=shuang
With this patch |BluetoothAvrcpInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:45:22 +02:00
Thomas Zimmermann
4444130578 Bug 1038591: Convert Bluetooth A2DP data types in |BluetoothA2dpInterface|, r=shuang
With this patch |BluetoothA2dpInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:45:14 +02:00
Thomas Zimmermann
b7264fc980 Bug 1038591: Convert Bluetooth Handsfree data types in |BluetoothHandsfreeInterface|, r=shuang
With this patch |BluetoothHandsfreeInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:45:05 +02:00
Thomas Zimmermann
75d7fb0176 Bug 1038591: Convert Bluetooth Socket data types in |BluetoothSocketInterface|, r=shuang
With this patch |BluetoothSocketInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:44:56 +02:00
Thomas Zimmermann
b6993b6fc6 Bug 1038591: Convert Bluetooth data types in |BluetoothInterface|, r=shuang
With this patch, |BluetoothInterface| is responsible for converting
all Bluetooth data types to Bluedroid types. All callers have been
adapted.
2014-08-06 11:44:47 +02:00
Ed Morley
1d0a9269db Backed out changeset 9281f9896ce0 (bug 1048098) for webapi test failures 2014-08-05 12:22:00 +01:00
Vicamo Yang
a5bcee91bf Bug 1048098: remove redundant flushPermissions, flushPrefEnv from tearing down procedure. r=btian, r=echen 2014-08-05 16:19:06 +08:00
Thomas Zimmermann
b511bfa20c Bug 1045486: Rename |ConnectResultHandler| to |ConnectSocketResultHandler|, r=shuang
The linker mixes up |ConnectResultHandler| from BluetoothSocket.cpp
and BluetoothHfpManager.cpp. Consequently one of them gets removed
when linking libxul.so.

This patch works around the problem by renaming |ConnectResultHandler|
in BluetoothSocket.cpp to |ConnectSocketResultHandler|.
2014-08-05 09:29:14 +02:00
Thomas Zimmermann
d13abdd9fe Bug 1045486: Fix member types of |BluetoothInterfaceRunnable{1,3}<>|, r=shuang
When sending a |BluetoothInterfaceRunnable3<>| to the main thread,
in the case of BluetoothSocketResultHandler, the connect and accept
operations transfer string objects by reference from the I/O thread.
When the reference is accessed, the actual string might be removed
already.

The patch fixes the problem by storing the strings as value in the
runnable object.
2014-08-05 09:28:35 +02:00
Thomas Zimmermann
f1c964cc95 Bug 1046737: Use value to maintain Bluetooth bonding arrays, r=shuang
The Bluedroid code uses indices into global arrays while pairing
with devices. These arrays might get changed in between and the
indices become incorrect. The result is undefined.

The patch fixes the problem by using the value, a reply runnable,
directly for array lookups. No indices are required.

This bug was fixed in bluetooth2/ already, but not yet backported.
2014-08-01 10:26:20 +02:00
Nathan Froyd
12c76f15f7 Bug 1042878 - part 2 - move MOZ_CAIRO_CFLAGS et al additions to C*FLAGS into moz.build; r=glandium 2014-07-24 11:55:33 -04:00
Thomas Zimmermann
8936fb4f3b Bug 1045461: Fix HFP fallback code to work with latest Bluetooth changes, r=shuang
Recent patches to Bluetooth introduced asynchronous initialization of
profile manager. The code in hfp-fallback was not adapted then. This
patch updates the broken code.
2014-07-29 10:47:09 +02:00
Carsten "Tomcat" Book
acae829094 merge mozilla-inbound to mozilla-central a=merge 2014-07-23 15:50:58 +02:00
Thomas Zimmermann
6d0a51524c Bug 1029390: Asynchronous |BluetoothAvrcpInterface::SetVolume|, r=shuang 2014-07-23 07:56:23 +02:00
Thomas Zimmermann
b3a1a811a5 Bug 1029390: Asynchronous AVRCP response interfaces, r=shuang 2014-07-23 07:56:23 +02:00
Thomas Zimmermann
55825543b8 Bug 1029390: Asynchronous A2DP connect/disconnect, r=shuang 2014-07-23 07:56:23 +02:00
Thomas Zimmermann
da7d3ecba0 Bug 1029390: Asynchronous init and cleanup of A2DP/AVRCP, r=shuang 2014-07-23 07:56:22 +02:00
Thomas Zimmermann
5a1bfd4922 Bug 1029390: Add A2DP/AVRCP result-handler infrastructure, r=shuang 2014-07-23 07:56:18 +02:00
Mike Hommey
bc5d6801bb Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Thomas Zimmermann
28f818c2ea Bug 1029389: Asynchronous |BluetoothHandsfreeInterface::PhoneStateChange|, r=shuang 2014-07-15 10:56:55 +02:00
Thomas Zimmermann
60420f7ec0 Bug 1029389: Asynchronous Bluetooth Handsfree response methods, r=shuang 2014-07-15 10:56:55 +02:00
Thomas Zimmermann
478bf400c9 Bug 1029389: Asynchronous |BluetoothHandsfreeInterface::DeviceStatusNotification|, r=shuang 2014-07-15 10:56:55 +02:00
Thomas Zimmermann
47c0f745d8 Bug 1029389: Asynchronous |BluetoothHandsfreeInterface::VolumeControl|, r=shuang 2014-07-15 10:56:54 +02:00
Thomas Zimmermann
b6bde50532 Bug 1029389: Asynchronous Bluetooth Handsfree voice-recognition functions, r=shuang 2014-07-15 10:56:54 +02:00
Thomas Zimmermann
200cc2f83c Bug 1029389: Asynchronous Bluetooth Handsfree connection handling, r=shuang 2014-07-15 10:56:54 +02:00
Thomas Zimmermann
d8b08562b6 Bug 1029389: Asynchronous Bluetooth Handsfree init and cleanup methods, r=shuang 2014-07-15 10:56:53 +02:00
Thomas Zimmermann
978e728e28 Bug 1029389: Add result-handler class for Bluetooth Handsfree profile, r=shuang 2014-07-15 10:56:53 +02:00
Thomas Zimmermann
1ed065692c Bug 1029389: Asynchronous starting and stopping of profile managers, r=shuang
Profile managers use the new class |BluetoothProfileResultHandler|
to signal the result of initializing of cleaning up operations to
|BluetoothServiceBluedroid|. |BluetoothServiceBluedroid| proceeds
once all profile handlers have finished.

Future patches will build upon this patch to create completely
asynchronous profile managers.
2014-07-15 10:56:53 +02:00
Thomas Zimmermann
ff0816378b Bug 1038097: Include <errno.h> in BluetoothInterface.cpp, r=shuang
This patch adds a missing include statement for <errno.h> to
BluetoothInterface.cpp. This fixes the build for flatfish
devices. For safety, the patch also adds an include statement
for <unistd.h>, which might be necessary for several functions.
2014-07-14 13:43:11 +02:00
Thomas Zimmermann
59a307fb1b Bug 1035240: Close file descriptor in BluetoothSocket, r=shuang
Currently, BluetoothSocket leaks its file descriptor on close
operations. With this patch when Gecko closes an instance of
BluetoothSocket, the file descriptor is now closed as well.
2014-07-11 09:22:51 +02:00
Thomas Zimmermann
4df0a8ba94 Bug 1029387: Remove socket setup from BluetoothSocket, r=shuang
This patch removes all code related to socket setup from Bluedroid's
BluetoothSocket. The socket setup is handled by BluetoothInterface;
transparantly to its users.

Since most of the socket setup is now hidden, a comment was added to
DroidSocketImpl that explains the connection phases in server and
client.
2014-07-10 15:11:09 +02:00
Thomas Zimmermann
65625cbecc Bug 1029387: Handle socket setup for |Accept| in BluetoothInterface, r=shuang
This patch moves the accept phase of Bluedroid's |Listen| to the
implementation of BluetoothInterface. |BluetoothInterface::Accept|
handles Bluedroid's socket-setup messages and executes the result
handler with the received file descriptor and data.
2014-07-10 15:10:54 +02:00
Thomas Zimmermann
cb15a54553 Bug 1029387: Handle socket setup for |Connect| in BluetoothInterface, r=shuang
Bluedroid's internal socket setup transfers 2 messages and possibly
a file descriptor as the first data of a socket connection.

This patch moves the socket-setup code for the |Connect| call to
the implementation of BluetoothInterface. BluetoothSocket only
handles the socket setup of |Listen|, and general socket state.
2014-07-10 15:10:45 +02:00
Thomas Zimmermann
b4b1937c50 Bug 1029387: Introduce connection status for Bluedroid sockets, r=shuang
In preparaton of moving the Bluedroid socket setup to BluetoothInterface,
this patch introduces connection states for Bluetooth sockets. There are
4 states,

  - Disconnected,
  - Listening,
  - Connecting, and
  - Connected.

All sockets start in Disconnected and transition to Connected via one
of the other states. Server socket transition through Listening, Client
sockets transition through Connecting. There is currently a lot of code
duplication in read and write methods. This will be cleaned up when the
connection setup is handled by BluetoothInterface.
2014-07-10 15:10:36 +02:00
Thomas Zimmermann
54b45b1fbc Bug 1029387: Convert Bluedroid Socket's Connect method to asynchronous design, r=shuang 2014-07-10 15:10:26 +02:00
Thomas Zimmermann
d0f2a0813a Bug 1029387: Convert Bluedroid Socket's Listen method to asynchronous design, r=shuang 2014-07-10 15:10:13 +02:00
Thomas Zimmermann
f600d9127f Bug 1029387: Add result handler for Bluetooth Socket interface, r=shuang 2014-07-10 15:09:44 +02:00
Shawn Huang
ffede25d1f Bug 1033273 - Part 1: Add InitHfpInterface/DeinitHfpinterface. r=btian 2014-07-03 00:04:00 -04:00
Shawn Huang
54408ff0cb Bug 1033234 - Fix build break when building JB 4.2. r=tzimmermann 2014-07-02 22:58:00 -04:00
Thomas Zimmermann
09f4418e5b Bug 1029386: Asynchronous Bluedroid DUT and LE interfaces, r=shuang 2014-07-03 09:53:39 +02:00
Thomas Zimmermann
ae8327a31e Bug 1029386: Asynchronous authentification in Bluedroid, r=shuang 2014-07-03 09:53:32 +02:00
Thomas Zimmermann
d03babe552 Bug 1029386: Asynchronous Bluedroid device bonding, r=shuang 2014-07-03 09:53:20 +02:00
Thomas Zimmermann
ae524b159b Bug 1029386: Asynchronous discovery methods in Bluedroid, r=shuang 2014-07-03 09:53:06 +02:00
Thomas Zimmermann
077ae29975 Bug 1029386: Asynchronous remote-service methods in Bluedroid, r=shuang 2014-07-03 09:52:52 +02:00
Thomas Zimmermann
c408b4d665 Bug 1029386: Asynchronous Bluedroid device-property methods, r=shuang 2014-07-03 09:52:35 +02:00
Thomas Zimmermann
e0760329b5 Bug 1029386: Asynchronous Bluedroid adapter methods, r=shuang 2014-07-03 09:52:19 +02:00
Thomas Zimmermann
4a8768ea72 Bug 1029386: Asynchronous Bluedroid starting and stopping, r=shuang 2014-07-03 09:51:57 +02:00
Thomas Zimmermann
e11fd99785 Bug 1029386: Split Bluedroid start/stop code, r=shuang
This patch prepares refactoring of the Bluedroid start and stop
code towards an asynchronous design.
2014-07-03 09:51:40 +02:00
Thomas Zimmermann
2ace39db13 Bug 1029386: Add result handler for Bluetooth Core profile, r=shuang
The result-handler class contains a method for each interface
in the Core profile and a method for failed calls. The patch
also adds runnable classes that execute a result handler's
method on the main thread.
2014-07-03 09:51:27 +02:00
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
373361cdc7 Bug 1007576 - [bluez] Update CoD value after device found while doing NFC pairing, r=echou 2014-06-27 11:43:01 +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
Olli Pettay
67c5293976 Bug 1029866 - Rename InitUsingWin(...) to Init(...), r=bobowencode
--HG--
extra : rebase_source : e04aac99fe64270f283cf49ed52b8f7512a2fa3b
2014-06-25 13:17:17 +03:00
Shawn Huang
2029d5d02b Bug 1015819 - Part 2: [bluez] Restore CoD value based on SDP records. r=echou, f=btian 2014-06-24 02:36:00 -04: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
Bob Owen
f9b75f5bf1 Bug 1023969 - Part 4: Replace |AutoPushJSContext|s in BluetoothDevice::SetPropertyByValue. r=bholley 2014-06-20 14:42:33 +01:00
Bob Owen
480df31e2f Bug 1023969 - Part 3: Replace AutoPushJSContext in BluetoothManager GetAdapterTask::ParseSuccessfulReply. r=bholley 2014-06-19 20:17:59 +01:00
Bob Owen
872cb50d73 Bug 1023969 - Part 2: Replace |AutoPushJSContext|s in BluetoothAdapter::SetPropertyByValue. r=bholley 2014-06-19 20:14:32 +01:00
Bob Owen
552ac0e02c Bug 1023969 - Part 1: Replace AutoPushJSContext in BluetoothAdapter GetDevicesTask::ParseSuccessfulReply. r=bholley 2014-06-19 20:09:03 +01:00
Hsin-Yi Tsai
4e0d0af049 Bug 981519 - number and name presentation - part 5 - BT module. r=btian 2014-04-17 11:46:03 +08: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
Jamin Liu
b86122ee4d Bug 968709 - Add a marionette test for pairing APIs of BluetoothAdapter. r=echou, f=vyang 2014-06-05 19:17:00 -04:00
Jamin Liu
449dc2e322 Bug 968709 - Add a marionette test case to Bluetooth set to make sure the URL of Marionette client is correct. r=vyang
Few marionette tests in unit-test set may navigate to specific URL and
wouldn't restore the URL of marionette client when the tests end.
Navigate the URL to default value before running Bluetooth test to make
sure the correctness of test.
2014-06-18 00:20:00 -04:00
Hsin-Yi Tsai
e926f8230a Backed out changeset e152089ae843 (bug 981519) for causing regression bug 1026081 2014-06-17 15:37:31 +08:00
Jamin Liu
d69fd4964b Bug 1009157 - Ensures that we can receive BT enable/disabled events in marionette test every times. r=echou
Ensures that we can always receive that "enabled"/"disabled" event by
installing the event handler *before* we ever enable/disable Bluetooth. Or
we might just miss those events and get a timeout error.
2014-06-15 22:50:00 +02:00
Hsin-Yi Tsai
fcd581cf2c Bug 981519 - number and name presentation - part 5 - BT module. r=btian 2014-04-17 11:46:03 +08:00
Boris Zbarsky
bc1e511e33 Bug 1009675 part 2. Return WebIDL 'any' values as handles. r=peterv 2014-06-11 16:26:52 -04:00
Ed Morley
719d73ac3f Backed out changeset 5f7e58de5d56 (bug 968709) for causing bug 1023167 2014-06-10 11:49:10 +01:00
Ed Morley
53328097b1 Backed out changeset 8d2cc1387119 (bug 968709) 2014-06-10 11:48:43 +01:00
Daniel Holbert
ca0c9284b0 Bug 1022417: Annotate BluetoothHfpManager::GetVolumeTask as MOZ_FINAL to calm GCC Wdelete-non-virtual-dtor build warning. blanket-r=ehsan 2014-06-08 14:58:02 -07:00
Eric Chou
b5110e88a0 Bug 1002391 - Get the latest SDP records of the target device, r=shuang
Use BlueZ API 'CreateDevice' to update the SDP records of those
unknown devices. On the other hand, still use 'DiscoverServices'
to update SDP records of paired devices.
2014-06-06 18:14:22 +08:00
Jamin Liu
56e037f1e5 Bug 968709 - Add a marionette test for pairing APIs of BluetoothAdapter. r=echou, f=vyang 2014-06-06 11:38:24 +08:00
Jamin Liu
e1c73ffde3 Bug 968709 - Add a marionette test case to Bluetooth set to make sure the URL of Marionette client is correct. r=echou, f=vyang
Few marionette tests in unit-test set may navigate to specific URL and
wouldn't restore the URL of marionette client when the tests end.
Navigate the URL to default value before running Bluetooth test to make
sure the correctness of test.
2014-06-06 11:38:24 +08:00
Vicamo Yang
fa6b7968d6 Bug 927320 - 2/2: rename related variables. r=aknow,btian 2014-06-03 22:15:30 +08: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
Kyle Huey
3fdfb7f0db Bug 1011110: Don't allow replying to a BluetoothRequest twice. r=bent 2014-06-02 19:02:27 -07:00
Steve Fink
5a86ec4061 Bug 1017419 - Handlify nsTArrayToJSArray, r=terrence
--HG--
extra : rebase_source : 802407d2c25fe060e16b546890859720664158ae
2014-06-02 09:40:13 -07:00
Szu-Yu Chen [:aknow]
f6fb2a8ba2 Bug 1016849 - Part 3: Remove isActive (bluetooth). r=btian 2014-05-29 00:16:00 -04: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
Carsten "Tomcat" Book
a4785f7882 Backed out changeset 349ca77481c0 (bug 968709) for marionette test failures 2014-05-28 13:02:01 +02:00
Jamin Liu
645c14c575 Bug 968709 - Add a marionette test for pairing APIs of BluetoothAdapter. r=echou, f=vyang 2014-05-22 22:42:00 +02:00
Ben Tian
dbcb69f261 Bug 1016243 - [cleanup] Remove unused function BluetoothService::RemoveObserverFromTable, r=shuang 2014-05-27 17:02:44 +08:00
Ryan VanderMeulen
4a08636d20 Merge inbound to m-c on a CLOSED TREE. 2014-05-27 16:23:41 -04:00
Reuben Morais
6b28e6ff71 Bug 952486 - Use CheckPermissions instead of Func for several interfaces. r=bz 2014-05-25 15:31:11 -03:00
Eric Chou
5c32a5d4bc Bug 942104 - Notify BluetoothAdapter about discovery state changed (bluez), r=gyeh 2014-05-23 14:01:41 +08:00
Eric Chou
2199448d26 Bug 942104 - Notify BluetoothAdapter about discovery state changed (bluedroid), r=gyeh 2014-05-23 14:01:37 +08:00
Eric Chou
af6be17fbd Bug 942104 - Fire event 'discoverystatechanged', r=gyeh 2014-05-23 14:00:25 +08:00
Eric Chou
7fd9600215 Bug 942104 - Add an event listener "ondiscoverystatechanged", r=gyeh, r=mrbkap 2014-05-23 14:00:14 +08:00
Eric Chou
842021ab69 Bug 942104 - Avoid exposing Bluetooth interface to all web pages, r=bz
Current Bluetooth related webidl implementation would make interfaces
such as BluetoothAdapter exposed to all web pages, and obviously we
don't want to see that.
2014-05-23 14:00:10 +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
Birunthan Mohanathas
19bebbc68d Bug 869836 - Part 2: Use AppendLiteral instead of Append(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:50 +03:00
Birunthan Mohanathas
d9e420fc7c Bug 869836 - Part 12: Use Assign('c') instead of AssignLiteral("c"). r=ehsan
--HG--
extra : rebase_source : a6b15019cee452973dd8bf3112c15e14175855a9
2014-05-26 21:55:08 +03:00
Birunthan Mohanathas
085f40aff8 Bug 869836 - Part 11: Use Append('c') instead of AppendLiteral("c"). r=ehsan
--HG--
extra : rebase_source : 08bcbfd804f1adcab40c7d59fa56deda1f6e0829
2014-05-26 21:54:58 +03:00
Birunthan Mohanathas
cfd62b35ad Bug 869836 - Part 10: Use Truncate instead of AssignLiteral(""). r=ehsan
--HG--
extra : rebase_source : e75c900e72e5367518f2b923a839fd23acf29a42
2014-05-26 21:54:53 +03:00
Shawn Huang
619acef8fd Bug 1005901 - [bluedroid] Always do cleanup after disable. r=btian 2014-05-16 04:48:00 -04:00
Jamin Liu
a2d35c1933 Bug 1003472 - If OPP manager can't get valid service channel, refresh SDP records until timeout is hit. r=shuang
If user tries to send a file to a device which just completes the pairing
process, the OPP manager may update SDP records when it's not ready.

It's especially likely to occur in BT file transfer with inline pairing
since OPP manager would request for a service channel to send the file when
device is just paired.
2014-05-16 14:35:20 +08: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
Chris Peterson
aca9b90afe Bug 990764 - Replace MOZ_ASSUME_UNREACHABLE in dom. r=smaug 2014-04-20 00:36:40 -07: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
Ting-Yu Lin
59a2106328 Bug 1006986 - Fix build fail for flame debug. r=echou 2014-05-06 22:39:00 -04:00
Jamin Liu
b2bb32ea0f Bug 1003658 - Avoid to create reference cycle in BluetoothProfileController which would cause memory leak. r=echou, f=shuang 2014-05-07 10:57:27 +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
Nathan Froyd
84041459a1 Bug 1003306 - part 2 - use services::GetPermissionManager everywhere that's appropriate; r=ehsan 2014-04-29 13:27:26 -04:00
Shawn Huang
8e45b3c2ac Bug 993954 - Check sBluetoothChild is null when closing Settings application
It is possible that sBluetoothChild set to nullptr and RecvNotify get called from MessageLoop.
This patch check sBluetoothChild.
2014-04-30 16:58:15 +01:00
Hsin-Yi Tsai
f3458d4208 Bug 1000670 - part 5 - BT - impl NotifyClirModeChanged. r=echou 2014-04-24 14:53:03 +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
Jamin Liu
e7a188ed74 Bug 990423 - [Bluetooth] Fix the incorrect condition for reporting call held status when call state changed. r=echou, f=btian
---
 dom/bluetooth/bluez/BluetoothHfpManager.cpp |  108 ++++++++++++++++++++++++---
 dom/bluetooth/bluez/BluetoothHfpManager.h   |    2 +
 2 files changed, 99 insertions(+), 11 deletions(-)
2014-04-25 09:59:32 +08: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
Shawn Huang
5e62268892 Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly. r=echou, f=btian
Consent pairing event raises under the following conditions:
1. Local IO capabilities are DisplayYesNo and remote IO capabiltiies are DisplayOnly or NoInputNoOutput.
2. Call PairingConsent callback for "incoming" request.
This patch is try to directly reply pairing confirmation for consent cases.

How to test:
1. Initialize pairing request with IO capabilities-NoInputNoOutput as
headset role to b2g phone
2. Check pairing status of bluetooth headset
2014-04-22 08:37:01 -04: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
Thomas Zimmermann
2d91e4dbc4 Bug 995912: Remove BLUEZ_DBUS_BASE_IFC from RawDBusConnection, r=qdot, echou
This patch removes the constant BLUEZ_DBUS_BASE_IFC from the file
RawDBusconnection.cpp. The constant is specific to BlueZ, and that's
where it's located now.
2014-04-17 11:16:12 +02: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
Shawn Huang
596cc5decf Bug 994411 - [bluez] Ignore pending MO call index, while making MO call with bluetooth headset, r=echou 2014-04-17 14:26:35 +08:00
Ryan VanderMeulen
fa7c5ad357 Merge inbound to m-c. 2014-04-15 23:26:35 -04:00
Kyle Huey
384121563d Bug 991812: Remove uses of RefCounted<T> that live in Gecko. r=ehsan
--HG--
extra : rebase_source : 239ff77ec3765a3f190ed75b1645c6011e5d1dbd
2014-04-14 12:04:24 -07: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
Benoit Jacob
e8b418c5f5 Bug 987305 - Refactor EnumSerializer - r=nfroyd 2014-04-14 10:17:40 -04: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
Ed Morley
67b81d9bd4 Merge latest green inbound changeset and mozilla-central 2014-04-10 17:55:29 +01:00
Boris Zbarsky
a0bb95a823 Bug 993889 part 1. Remove "scope" argument from nsContentUtils::WrapNative. r=bholley 2014-04-10 00:58:41 -04:00
Ben Tian
a79696fb7f Bug 989845 - [bluedroid] Implement KeyPressedCallback to handle HSP commands, r=echou 2014-04-09 17:44:03 +08:00
Carsten "Tomcat" Book
065e1fb950 Merge m-c to b2g-inbound 2014-04-09 14:47:41 +02:00
Thomas Zimmermann
66715d0adc Bug 990392: Fix comments about shared variables in BluetoothDBusService, r=echou 2014-04-09 13:59:19 +02:00
Thomas Zimmermann
27f401f1f0 Bug 990392: Move |sControllerArray| to main thread, r=echou
|sControllerArray| is only being used on the main thread, but
cleared on the I/O thread. During the BlueZ shutdown, we go
through the main thread, where we can clear |sControllerArray|;
moving the variable to main thread exclusively.
2014-04-09 13:59:15 +02:00
Thomas Zimmermann
55cb24ce69 Bug 990392: Move |sAdapterPath| to I/O thread, r=echou
|sAdapterPath| is being accessed from within the main and the
I/O thread in a possible non-thread-safe way. This patch moves
all access to the I/O thread.
2014-04-09 13:59:11 +02:00
Thomas Zimmermann
9b9679dcad Bug 990392: Cleanup |GetServiceChannel| in BluetoothDBusService, r=echou
This patch prepares moving |sAdapterAdded| to the I/O thread. For
|GetServiceChannel| it gets pushed into task classes on the I/O
thread and the interface of these classes is cleaned up.
2014-04-09 13:59:06 +02:00
Thomas Zimmermann
5f7b0b5d90 Bug 990392: Move sAuthorizedServiceClass to I/O thread, r=echou
|sAuthorizedServiceClass| is being set on the main thread, but read
from within the I/O thread. Making the variable a static constant
array and moving all access to the I/O thread fixes potential race
conditions.
2014-04-09 13:59:03 +02:00
Thomas Zimmermann
710a04c9cc Bug 990392: Make |sIsPairing| non-atomic, r=echou
|sIsPairing| is not a shared resource. No need to make it atomic.
2014-04-09 13:58:59 +02:00
Boris Zbarsky
79dab91ff6 Bug 991742 part 8. Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods. r=bholley
This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
2014-04-08 18:27:18 -04:00
Boris Zbarsky
d4bd64ee2c Bug 991742 part 6. Remove the "aScope" argument of binding Wrap() methods. r=bholley
This patch was mostly generated with this command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""

plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
2014-04-08 18:27:17 -04: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
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
Thomas Zimmermann
11f9899457 Bug 972253: Merge the content of DBusThread.cpp into Bluetooth code, r=echou
DBusThread.{cpp,h} maintains state for Bluetooth. This patch moves
the content of these files to Bluetooth's Bluez backend.
2014-02-20 12:55:41 +01:00
Sam Joch
02bac5e79f Bug 968215 - SettingsService needs to have a callback when transaction are completed. r=bent 2014-02-07 12:19:58 +01:00
Thomas Zimmermann
dcb36dc325 Bug 969314: Cleanup Gonk start/stop code in BluetoothDBusService, r=echou
This patch removes all unnecessary code when starting and stopping
Gonk in BluetoothDBusService. The change simplifies the respective
methods considerably.
2014-02-13 16:28:11 +01:00
Thomas Zimmermann
28afc0ec13 Bug 969314: Cleanup handling of libbluedroid.so, r=echou
This patch cleans up the handling of libbluedroid.so and its
interfaces. Open and closing the library is now handled internally
and contained functions are wrapped in class methods.
2014-02-13 16:28:09 +01:00
Thomas Zimmermann
e5ec01aca8 Bug 969314: Merge BluetoothGonkService into BluetoothDBusService, r=echou
This patch merges the code from BluetoothGonkService into
BluetoothDBusService. The merged code is protected by ifdef
statements.
2014-02-13 16:28:07 +01:00
Vicamo Yang
90fc702d2a Bug 969109 follow-up: strictly define the order of participating promises. r=echou, f=jaliu 2014-02-13 19:52:05 +08:00
Ben Tian
b9bec5646b Bug 969447 - Unable to turn bluetooth on after turning it on and off several times, r=echou, a=1.3+ 2014-02-13 12:08:41 +08:00
Ryan VanderMeulen
450343501c Backed out changeset eea91c2d859d (bug 969447) for Marionette-webapi bustage.
CLOSED TREE
2014-02-11 12:48:09 -05:00
Ben Tian
a6c3a5d5bf Bug 969447 - Unable to turn bluetooth on after turning it on and off several times, r=echou 2014-02-11 18:14:58 +08:00
Eric Chou
e990369c4b Bug 962310 - Support in-process bt file transfer, f=bent, r=gyeh
Currently if an app which lives in chrome process calls SendFile()
to send a file via Bluetooth, it would crash.
2014-02-11 10:07:23 +08:00
Carsten "Tomcat" Book
893735910e merge b2g-inbound to mozilla-central 2014-02-10 12:52:16 +01:00
Vicamo Yang
e00a9d0dfd Bug 969109: fix racing condition in test_dom_BluetoothManager_enabled.js. r=echou, f=jaliu 2014-02-10 12:03:43 +08:00
Chris Peterson
268821c150 Bug 952785 - RawDBusConnection::SendWithReply() returns bool, not nsresult. r=echou 2014-02-09 12:44:05 -08:00
Thomas Zimmermann
4f63fd3fe0 Bug 964817: Invoke DBus send operations on I/O thread, r=echou
Currently, the DBus connection for Bluetooth is shared between the
main thread and the I/O thread. This causes race conditions when
starting or stopping Bluetooth.

This patch moves all occurences of main-thread-invoked DBus send
operations to the I/O thread. This is mostly refactoring. Internally,
send operations are already executed on the main thread, so there is
no change in the over all logic of these methods.
2014-02-06 13:44:46 +01:00
Thomas Zimmermann
8815883deb Bug 843857: Don't listen if connect fails on BT server, r=echou
If the listen operation fails for Bluetooth servers, we should
not call listen again in the error handler. Otherwise, we run
into an endless loop of listen calls and error callbacks.
2014-02-05 14:17:22 +01:00
Jon Coppeard
4df3aa4450 Bug 959787 - Handlify JS_GetProperty and related APIs r=terrence r=bz 2014-01-31 09:55:20 +00:00
Birunthan Mohanathas
02d0812720 Bug 828300 - Replace NS_ARRAY_LENGTH with mozilla::ArrayLength/MOZ_ARRAY_LENGTH. r=ehsan 2014-01-30 13:26:54 -05:00
Kyle Huey
502ccb79bd Bug 965498 - Don't lose an already_AddRefed<T> and leak blobs in bluetooth. r=qdot 2014-01-29 17:03:51 -05:00
Ben Tian
ab82c431da Bug 957949 - [HFP] Add B2G common bluedroid config file, r=echou 2014-01-15 11:50:27 +08:00
Ben Tian
c5682cb766 Bug 921999 - Bluetooth Device connection status in Settings is incorrect if remote headset restores connection, r=gyeh 2014-01-23 10:46:45 +08:00
Gina Yeh
f386355248 Bug 952907 - Patch 1: Use WebIDL codegen to implement Bluetooth events, r=smaug 2014-01-22 14:26:29 +08:00
L. David Baron
03ba2e465b Bug 976350 patch 1: Move the contents of nsTraceRefcnt.h into nsISupportsImpl.h. r=bsmedberg
This makes sense since the file no longer contains anything with the
nsTraceRefcnt name in it, and it will allow renaming nsTraceRefcntImpl
back to nsTraceRefcnt.
2014-02-26 13:36:35 -08:00
Jamin Liu
9e0c783bfd Bug 953045 - Fix a bug of bluetooth AVRCP to support media metadata updating correctly. f=shuang, r=echou 2014-01-17 18:15:37 +08:00
Ryan VanderMeulen
fdd6001939 Merge m-c to inbound. 2014-01-16 15:07:22 -05:00
Ryan VanderMeulen
127438a7eb Merge inbound to m-c. 2014-01-16 15:06:12 -05:00
Terrence Cole
6beccf2363 Bug 959787 - Handlify several JSAPI interfaces that can GC, Part 3; r=sfink
--HG--
extra : rebase_source : ace7b0fa6ba93acbf0ec8ecaeb68ffa287a33665
2014-01-16 09:48:58 -08:00
Shawn Huang
5073a3f047 Bug 953034 - Part 2: Change MediaNumber type to uint64_t. r=gyeh 2014-01-16 08:39:34 -05:00
Shawn Huang
e06c376115 Bug 953034 - Part 1: Reply RegisterNotification event EVENT_TRACK_CHANGED with correct parameter whether a track is selected or not. r=gyeh 2014-01-16 08:39:14 -05:00
Shawn Huang
426ad22263 Bug 950220 - Unable to change Bluetooth device name from Settings UI, r=echou 2014-01-16 14:36:35 +08:00
Tom Schuster
f39e81815a Bug 939294 - Change xpidl jsval to handles. r=gabor,bz,khuey,bsmedberg,terrence 2014-01-09 18:39:36 +01:00
Ben Tian
5f3ae35ee6 Bug 948337 - create BluetoothHfpManagerBase for audio manager access 2014-01-13 13:58:43 +08:00
Jamin Liu
91f62414a0 Bug 953036 - Set HSP flag when BluetoothHfpManager chooses to connect HSP. r=echou 2014-01-10 08:23:13 -05:00
Ben Tian
95cf96304b Bug 956258 - [cleanup] Patch 2/2: reduce warnings and remove cancel_discovery() in SendFile(), r=echou 2014-01-03 17:25:04 +08:00
Ben Tian
ac2a05d6a2 Bug 956258 - [cleanup] Patch 1/2: rename g* variables to s* ones, r=echou 2014-01-10 09:34:43 +08:00
Thomas Zimmermann
d4a238ea67 Bug 950891: Don't run GetServiceChannel while turning Bluetooth on/off, r=echou
This patch adds a check to BluetoothDBusService::GetServiceChannel to
ensure that Bluetooth is ready. If the system is in a transition from
on to off, or vice versa, the method might operate on an undefined
state.
2014-01-07 13:46:20 +01:00
Shawn Huang
5f3ba55496 Bug 946240 - [Bluetooth][gonk-kk] Add flags to support different AVRCP profile version. r=echou 2014-01-08 09:32:19 -05:00
Boris Zbarsky
2d26bed9c3 Bug 950188. DOMRequest should only have a constructor taking a Window. r=khuey 2014-01-06 21:53:23 -05:00
Birunthan Mohanathas
d05644b6b3 Bug 784739 - Switch from NULL to nullptr in remaining directories; r=ehsan
--HG--
extra : rebase_source : 1ff19b2c8fd0e77fa8e822f5007a9fa3a6b6d474
2014-01-06 10:06:04 -05:00
Ehsan Akhgari
1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Ben Tian
96953caf23 Bug 947870 - Assertion in BluetoothOppManager::CreateFile (bluedroid), r=echou 2013-12-23 16:47:12 +08:00
Ben Tian
02483f8f82 Bug 939022 - BluetoothUtils for bluedroid. Patch 2/3: Modify files, r=echou 2013-12-23 11:24:11 +08:00
Ben Tian
7722a2510c Bug 939022 - BluetoothUtils for bluedroid. Patch 1/3: Move files, r=echou
--HG--
rename : dom/bluetooth/BluetoothUtils.cpp => dom/bluetooth/bluedroid/BluetoothUtils.cpp
rename : dom/bluetooth/BluetoothUtils.h => dom/bluetooth/bluedroid/BluetoothUtils.h
rename : dom/bluetooth/BluetoothUtils.cpp => dom/bluetooth/bluez/BluetoothUtils.cpp
rename : dom/bluetooth/BluetoothUtils.h => dom/bluetooth/bluez/BluetoothUtils.h
2013-12-16 19:00:54 +08:00
Ms2ger
df65132615 Bug 942104 - Fix a mismerge from the backout on a CLOSED TREE; a=Tomcat 2013-12-20 15:19:14 +01:00