Commit Graph

1003 Commits

Author SHA1 Message Date
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