This patch converts btgatt_scanner_interface_t struct into
BleScannerInterface class. It also refactors three most important
methods from this interface: RegisterAdvertiser, Scan, and Unregister.
Rest of this interface will be updated in following patches.
Bug: 30622771
Test: sl4a BleScanApiTest
Change-Id: I0b7dddc1e9906d825096e23a83a39ecc681d232c
This change is needed so we can remove the last instances
of "using std::vector" statements in hardware/libhardware.
Test: code compilation
Change-Id: Id728867f6b2e154a01ef56bda93d48def71b0e47
AdvertiseManager.startAdvertising() was implemented in Java layer for
historical reasons. Now that we have nice native callbacks and tests,
it can be moved into native code, where it will be shared between
Android daemon and bluetoothtbd.
Bug: 30622771
Test: native tests added to cover startAdvertising
Change-Id: I492d857cae7e4f82273fa92213c8e9904302f01a
Having this object non-static in header file is ok in
"c-plus-plus" since constant values default to internal
linkage, which allows them to appear in header files.
This is not i case in "c" and we need to declare it also
as static to limit the contex.
Making it static works for both.
Bug: 32467815
Test: lunch 1; make
Change-Id: I4ed4ffe41add3b10d990db0fb156a85a146d0ba2
Signed-off-by: Aleksej Makarov <aleksej.makarov@sonymobile.com>
When address type is not parsed, creating bond to devices not using
random address is impossible.
Bug: 32780409
Test: try pairing with nRF52DK using random address
Change-Id: I1265b6abdefa12dc024d00ecf232f7fc7722d178
This patch unifies advertising API. On startup, if VSC multi advertising
is avaliable, it will be used, otherwise
BleAdvertiserLegacyHciInterfaceImpl will be used, which provides one
advertising instance.
Test: sl4a tests are passing, all proper tests updated accordingly
Change-Id: I02d3996f694beb6614d342d6c15a8c27b7b7274a
It is useful to know what error code the get_folder_items_cmd gets back
with since it can help the UI decide if to keep fetching more. For ex.
if the return code is out of range then the UI does not need to keep
fetching anymore. This is useful for folders where we do not know the
size before hand (Media Player List or Now Playing List).
Bug: b/31253501
Change-Id: Ia6544de4845b8b72feaa359ef1481290dc54348a
(cherry picked from commit fdc7153966f9aecdbfd962b8a7655b5db3e464e0)
Advertising related code should be exposed through
BleAdvertiserInterface. Move client.listen function into this interface.
Remove reduntant clientif parameter.
Bug: 30622771
Bug: 24099160
Test: no tests necessary
Change-Id: Ic4335f2c65c1e21f20d3ae08222fba4341b63e27
In order to properly separate low level structures associated with LE
scanner and GATT client, their interfaces must be separated first.
Test: sl4a BleScanApiTest
Bug: 30622771
Change-Id: Idf8c5b7285b68e59f18f5216380488bfe8404b22
Right now, LE scanning functionality is combined with the GATT client.
This is the source of various bugs, like scans suddenly stoppinging when
a GATT client is killed. It also increases memory consumption, because
we associate many structures with a GATT client, which are not necessary
when just scanning.
Test: sl4a BleScanApiTest ConcurrentBleScanTest
Bug: 30622771
Change-Id: I5c2608b769bd6aec54900357cdccfa22987962c9
The way that AD data is passed right now put some additional
limitations, i.e. only one manufacturer specific data can be set, or
only one service UUID. By moving AD generation to upper layers, another
set of limitations is removed.
Test: Covered by BleAdvertiseApiTest sl4a test
Bug: 30622771
Change-Id: I34e8d731141caaf4497565f6e929992f6e929913
hardware/libhardware/include was being included with -isystem, which
hides warnings. The gralloc enum values are used as bitmasks on
unsigned types, explicitly mark them values as unsigned in order to
force the type of the resulting enum to be unsigned.
Bug: 32018017
Test: m -j
Change-Id: Iea281480574e0a7a8413273983c76c2c0f9f7049
hardware/libhardware/include was being included with -isystem, which
hides warnings. Use a macro to convert modules to hw_device_t** to call
the open function that works in C++ and C.
Bug: 32018017
Test: m -j
Change-Id: If68bf15581975f1217fcab366cef7bc784894641
hardware/libhardware/include was being included with -isystem, which
hides warnings. Add the missing name for a typedef.
Bug: 32018017
Test: m -j
Change-Id: I35f950ba3e26836cb51312ef28e98748f29d8cd8