Keeping helper classes in Bluetooth's C++ namespace creates collisions
between symbols of different managers' helpers. Moving OPP helpers into
the namespace of |BluetoothOPPManager| fixes this problem for OPP.
Keeping helper classes in Bluetooth's C++ namespace creates collisions
between symbols of different managers' helpers. Moving A2DP helpers into
the namespace of |BluetoothA2dpManager| fixes this problem for A2DP.
Keeping helper classes in Bluetooth's C++ namespace creates collisions
between symbols of different managers' helpers. Moving HFP helpers into
the namespace of |BluetoothHfpManager| fixes this problem for HFP.
This patch adds code to select the default Bluetooth backend from a
list of supported ones, by detecting the backend's availability. Some
devices are missing bluetoothd support. With the patch, bluetoothd
can be the default backend, but unsupportive devices fall back to in-
Gecko Bluedroid.
With this patch, Gecko will handle crashes of bluetoothd by clearing its
internal state. Switching Bluetooth off and on restarts the daemon and
the Bluetooth sub-system.
This patch adds error handling to all interface methods of Bluedroid's
daemon backend. If an error occures while sending a command to the daemon,
the methods dispatch an error.
With this patch, the dispatch method of Bluetooth runnables simply returns
if the supplied runnable is nullptr. This makes is easy to handle cases
where the caller of a Bluetooth interface method is not interested in the
result.
It seems impossible right now to update Bluetooths daemon. This leaves
dogfooders without bluetooth support. This patch restores the old back-
end code for Bluetooth until bug 1130288 has been solved.
There is |aPDU.Consume(1)| at the beginning, so |aPDU.GetSize()| becomes 1
less than the actual data length we want to parse. As a result, |memchr()|
will always fail by missing the final character by using |aPDU.GetSize()| as
its |num| parameter.
This patch adds proper selection of the Bluetooth backend. The backend
is configurable via environment property 'ro.moz.bluetooth.backend'. The
default value is bluetoothd.
On systems that are not Android 4.2 or later, the code does not return
a backend. These systems should use BlueZ instead.
cppcheck identified the extra ')' at the end of these macros. This code must
not be compiled in any of our standard configurations.
--HG--
extra : rebase_source : 4044d377e3a15ef725ac276ab54a192df63a8eb6
This patch adds support for a random postfix for bluetoothd's socket
name. The postfix is re-generated for every instance of the daemon.
This prevents name collisions between mutliple sessions and malicious
programs from taking over the connection easily.
Currently, Gecko connects to a running instance of bluetoothd when
it starts the daemon backend. This contains a race condition between
the startup of the daemon and the startup of Gecko.
This patch changes the initialization and cleanup of Bluetooth's
daemon backend so that the Bluetooth daemon connects to Gecko. The
daemon process is now started as part of the initialization and
quits during shutdown. The steps are strictly ordered, so no race
condition exists.
The initialization and cleanup procedures should now be compatible
with BlueZ 5.
The class |BluetoothDaemonChannel| for the bluetoothd channels
supports reference counting. This patch fixes the respective
variable to use |nsRefPtr| instead of |nsAutoPtr|.