Commit Graph

973 Commits

Author SHA1 Message Date
Thomas Zimmermann
9aa352eaf0 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
c8a8d0d59c 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
8751f4be58 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
913b8c1e5f 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
0d00e23db3 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
da1fed1c54 Bug 1029387: Convert Bluedroid Socket's Connect method to asynchronous design, r=shuang 2014-07-10 15:10:26 +02:00
Thomas Zimmermann
72b7c542e0 Bug 1029387: Convert Bluedroid Socket's Listen method to asynchronous design, r=shuang 2014-07-10 15:10:13 +02:00
Thomas Zimmermann
3bd553181a Bug 1029387: Add result handler for Bluetooth Socket interface, r=shuang 2014-07-10 15:09:44 +02:00
Shawn Huang
a1f4838926 Bug 1033273 - Part 1: Add InitHfpInterface/DeinitHfpinterface. r=btian 2014-07-03 00:04:00 -04:00
Shawn Huang
07f4910a6f Bug 1033234 - Fix build break when building JB 4.2. r=tzimmermann 2014-07-02 22:58:00 -04:00
Thomas Zimmermann
e188e5fadb Bug 1029386: Asynchronous Bluedroid DUT and LE interfaces, r=shuang 2014-07-03 09:53:39 +02:00
Thomas Zimmermann
8a58f145a7 Bug 1029386: Asynchronous authentification in Bluedroid, r=shuang 2014-07-03 09:53:32 +02:00
Thomas Zimmermann
a6d7b0523c Bug 1029386: Asynchronous Bluedroid device bonding, r=shuang 2014-07-03 09:53:20 +02:00
Thomas Zimmermann
4576ec0f2d Bug 1029386: Asynchronous discovery methods in Bluedroid, r=shuang 2014-07-03 09:53:06 +02:00
Thomas Zimmermann
e28c99433b Bug 1029386: Asynchronous remote-service methods in Bluedroid, r=shuang 2014-07-03 09:52:52 +02:00
Thomas Zimmermann
c5d1627efb Bug 1029386: Asynchronous Bluedroid device-property methods, r=shuang 2014-07-03 09:52:35 +02:00
Thomas Zimmermann
dcb822db7b Bug 1029386: Asynchronous Bluedroid adapter methods, r=shuang 2014-07-03 09:52:19 +02:00
Thomas Zimmermann
f98cf38379 Bug 1029386: Asynchronous Bluedroid starting and stopping, r=shuang 2014-07-03 09:51:57 +02:00
Thomas Zimmermann
ffc089af91 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
cdfb7d739e 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
866f8e76b3 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
cf3848df5f 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
d3b3314624 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
03d16c5486 Bug 1027506 - [bluedroid] Don't reset call array after HFP link lost, r=echou 2014-06-26 09:58:50 +08:00
Olli Pettay
7da5fd8ae0 Bug 1029866 - Rename InitUsingWin(...) to Init(...), r=bobowencode
--HG--
extra : rebase_source : e04aac99fe64270f283cf49ed52b8f7512a2fa3b
2014-06-25 13:17:17 +03:00
Shawn Huang
dc60031751 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
e6b1b70641 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
e76d054e70 Bug 1023969 - Part 4: Replace |AutoPushJSContext|s in BluetoothDevice::SetPropertyByValue. r=bholley 2014-06-20 14:42:33 +01:00
Bob Owen
b828377db3 Bug 1023969 - Part 3: Replace AutoPushJSContext in BluetoothManager GetAdapterTask::ParseSuccessfulReply. r=bholley 2014-06-19 20:17:59 +01:00
Bob Owen
4b4458afd0 Bug 1023969 - Part 2: Replace |AutoPushJSContext|s in BluetoothAdapter::SetPropertyByValue. r=bholley 2014-06-19 20:14:32 +01:00
Bob Owen
a39259183d Bug 1023969 - Part 1: Replace AutoPushJSContext in BluetoothAdapter GetDevicesTask::ParseSuccessfulReply. r=bholley 2014-06-19 20:09:03 +01:00
Hsin-Yi Tsai
97186eb499 Bug 981519 - number and name presentation - part 5 - BT module. r=btian 2014-04-17 11:46:03 +08:00
Shawn Huang
eb0ca1eef1 Bug 989976 - [bluedroid] Hit SIGBUS on unaligned access while doing AdapterPropertiesChangeCallback. r=echou 2014-06-17 01:38:00 -04:00
Jamin Liu
5294727471 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
06b1c291b8 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
3e0fc2db93 Backed out changeset e152089ae843 (bug 981519) for causing regression bug 1026081 2014-06-17 15:37:31 +08:00
Jamin Liu
aea82587a6 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
1e95e74425 Bug 981519 - number and name presentation - part 5 - BT module. r=btian 2014-04-17 11:46:03 +08:00
Boris Zbarsky
2bb59ed300 Bug 1009675 part 2. Return WebIDL 'any' values as handles. r=peterv 2014-06-11 16:26:52 -04:00
Ed Morley
ac5be5b713 Backed out changeset 5f7e58de5d56 (bug 968709) for causing bug 1023167 2014-06-10 11:49:10 +01:00
Ed Morley
3c56ef504b Backed out changeset 8d2cc1387119 (bug 968709) 2014-06-10 11:48:43 +01:00
Daniel Holbert
0d630da6ac 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
0912f285c0 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
977cebb36f 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
3b2cb1758d 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
709ef83097 Bug 927320 - 2/2: rename related variables. r=aknow,btian 2014-06-03 22:15:30 +08:00
Vicamo Yang
546cc64d56 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
7dda430ff2 Bug 1011110: Don't allow replying to a BluetoothRequest twice. r=bent 2014-06-02 19:02:27 -07:00
Steve Fink
6a809adfba Bug 1017419 - Handlify nsTArrayToJSArray, r=terrence
--HG--
extra : rebase_source : 802407d2c25fe060e16b546890859720664158ae
2014-06-02 09:40:13 -07:00
Szu-Yu Chen [:aknow]
1031fdbf4e Bug 1016849 - Part 3: Remove isActive (bluetooth). r=btian 2014-05-29 00:16:00 -04:00