- 10 Oct, 2016 3 commits
-
-
Jakub Pawlowski authored
The return value of BTM_VendorSpecificCommand is currently just an information wether the callback was passed to it or not, but many places through stack use this value as error indication. Remove it. Test: unit tests pass Change-Id: Idf73fc49fb25e52c3aeb64f2305b4498ecacd9a4
-
Jakub Pawlowski authored
btsnd_hcic_* functions are always returning true, so this return value is not really useful. Test: unit tests pass Change-Id: I06ced65392d180ceed565e45b7831de6aede283c
-
Jakub Pawlowski authored
btsnd_hcic_* functions return only true. This patch makes sure that no logic is waiting for "false" value. Few methods, that had their return value dependent on result of btsnd_hcic_* were made void. Test: unit tests pass Change-Id: I43cff62f461ff35f4bd84e5338f1a587b6a05c58
-
- 07 Oct, 2016 3 commits
-
-
Treehugger Robot authored
-
Ben YoungTae Kim authored
Incorrect size check for UHID_OUTPUT_EV for incoming data from UHID driver of kernel was leading to exiting of poll thread. This was causing IOT issues with Apple Magic Mouse that require output report to be sent for proper functioning of scroll functionality. Bug: 28942565 Change-Id: I2eaba1f70b7cd51fb21933031d439543eb141fd2
-
Gurpreet Ghai authored
Use case: BT will get crash in SNS testing. steps: SNS testing BT ON/OFF. Failure: Crash is observed. Root Cause: If the number of supported services increased, larger service record array is required. Smaller array is resulting in out of record error causing L2CAP deregister. Fix: Check added to avoid null pointer exception if null is returned while fetching sock from id. Also cleanup of SDP and security records done during BT turning Off. Change-Id: I2e77127262119cabf2c372f894427dcdf3350e80
-
- 06 Oct, 2016 1 commit
-
-
Jakub Pawlowski authored
Currently we have some unnecessary complicated code for handling advertising data. Get rid of it. Bug: 30622771 Test: Tests making sure flags and tx power are filled are added Change-Id: I807cdf11577c357c116c54cab50bbf3261e1ee16
-
- 05 Oct, 2016 3 commits
-
-
Pavlin Radoslavov authored
Use the (new) A2D_IsPeerSinkCodecValid() API call as appropriate to check whether the codec information of a Sink peer is valid. Previously, A2D_IsSourceCodecSupported() was used, and that didn't match the original code (before the refactoring). A2D_IsSourceCodecSupported() has extra checks, including min/max bitpool oundaries, and those shouldn't be used for this initial check - the bitpool boundaries can be adjusted later. Similarly, use the new A2D_IsPeerSourceCodecValid() API call instead of A2D_IsSinkCodecSupported(). Also: * Replaced A2D_IsValidCodec() with A2D_IsSourceCodecValid(), A2D_IsSinkCodecValid() A2D_IsPeerSourceCodecValid(), A2D_IsPeerSinkCodecValid() and added the appropriate unit tests. * Added extra debug messages to help identify similar issues in the future Bug: 31749230 Test: manual test with a carkit, and unit tests Change-Id: Iafaeb82744df9758e686194c91624992a0c55bdf
-
Jakub Pawlowski authored
Change-Id: I6e68f80d0d97081a4fc3879e6c11342923cfef7b
-
Jakub Pawlowski authored
This patch turns the code that manages LE multi-advertising into the BleAdvertisingManager class. All HCI calls made by this code were abstracted into BleAdvertiserHciInterface. Thanks to those changes, we can mock BleAdvertiserHciInterface and test the advertising manager. The BleAdvertisingManagerTest, still has some dependencies on other code from the "stack" module. These have to be implemented on top of the test file. In the future, this dependencies should be replaced by mockable classes. Test: Tests covering the change are added in this patch. Bug: 30622771 Change-Id: I4a363678815c235ee01255f462db2a671ef89610
-
- 04 Oct, 2016 3 commits
-
-
Myles Watson authored
cd vendor_libs/test_vendor_lib/ clang-format ../linux/bt_vendor_linux.c -style=file -i clang-format include/* test/* src/* -style=file -i Update the style guide since clang-format help uses the -style=file option. Test: mm -j32 Change-Id: I166adfb2bb9a87fefa1242c91e5f180011caa2ad
-
Mark Salyzyn authored
Test: compile Bug: 26552300 Bug: 31289077 Change-Id: I8fb392150441ca5b6bc43dc43a10a3009e22202b
-
Jakub Pawlowski authored
-
- 03 Oct, 2016 2 commits
-
-
Mark Salyzyn authored
Actually, remove reference, android logging is not used here. Test: compile Bug: 26552300 Bug: 31289077 Change-Id: I37731dc37f61c129f3440e5d9ff1d0e71fe193d0
-
Jakub Pawlowski authored
If the GATT service cache was successfully loaded from a file, the state must be reset to idle. Bug: 31175159 Change-Id: I92ebf1bec9d2e7467d7412b41923614ec5a13b6d
-
- 30 Sep, 2016 7 commits
-
-
Jorge E. Moreira authored
Moved all controller actions out of read callbacks to task callbacks to avoid race conditions when modifying internal controller state. Change-Id: Ie8bb762992755db2dddb6b7bb6a4fe52ab2d0020
-
Jack He authored
Bug: 31274290 Test: Manual Change-Id: I5a4bff5e25b08a32709cdc81bac86a641d80f113
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Kim Schulz authored
if an LE device is found during an LE scan, the BT host will try to fetch its name (creating an LE connection) even though the advertising report received indicates that it is a non-connectable advertising. This is pointless and should not happen. Change-Id: I246e4795b4f4e33f3202908ebff3724e8e89523c
-
Patrick Tsai authored
Change-Id: I482f1096e87966f33ba8584ea60188abab3bcc42
-
Sebastien Griffoul authored
If the string argument of send_at_cmd is a null pointer, then the function should not crash: indeed this is a valid parameters which can be used to send an AT cmd which doesn't require any extra parameter. Test: trivial fix. Existing unit tests still pass. Change-Id: I3d83eebed660d703cd5a93a19dc73f4f354ab7bf Signed-off-by:
Sebastien Griffoul <sebastien.griffoul@intel.com>
-
- 29 Sep, 2016 3 commits
-
-
Jakub Pawlowski authored
Currently, only C++ code in the service/ folder can use libbase logging. This patch makes sure that logging can be used and is properly configured for usage when the stack is running as part of Bluetooth.apk. Bug: 31806042 Change-Id: I1f8be79ba9999b53ece0b5217a893b4bd20ecafc
-
Victor Khimenko authored
-
Andre Eisenbach authored
Currently after 100 devices are added to the device security database, any subsequent LE connection to a newly discovered LE device address will fail as entries in the security record database are not reused. This patch removes a device record if the device itself is removed and also ensures that the oldest device security record is deleted if the limit is reached to ensure a new record can be allocated. Bug: 31625900 Test: SL4A multi-device connection test + regression Change-Id: I22f6c82c64a9a9bfb2a16d79182903e5aa011355 (cherry picked from commit 013c32bf)
-
- 28 Sep, 2016 2 commits
-
-
Victor Khimenko authored
Build-only change to support the multilib case where the second arch is translated (and thus bluetooth library is needed). "True" multilib case is explicitly not supported. Test: Build system refactoring CL. Existing unit tests still pass. BUG=31422117 Change-Id: I09f239d39f5dbe0848a89367327db1ea1074ca39
-
Jakub Pawlowski authored
Right now, data types, control blocks, and functions used in the BTM layer are defined in the same header files. This means that if someone wants to write a test that uses those data types, they must also define all control blocks, or compile the whole module. This patch separates the data types from other definitions. Thanks to it, we will be able to write unit tests, once other dependencies get separated. Change-Id: Ibc089e273cc37642fbb8672964b266c20f8d825d
-
- 27 Sep, 2016 2 commits
-
-
Jakub Pawlowski authored
Right now, LE multi advertising related code uses it's own implementation of queue on top of static array. Use std::queue, and base::Callback instead. Changing function pointers to base::Callback instances is required for further refactoring, which will turn this code into class. Bug: 30622771 Test: sl4a BleAdvertiseApiTest ConcurrentBleAdvertisingTest Change-Id: I839e036c6edb4e19a17def4d68d351296468f88c
-
Jakub Pawlowski authored
-
- 24 Sep, 2016 1 commit
-
-
Nitin Arora authored
In case the server cache does not exist for a specific connection, the API used to copy the server DB into the DB structure needs to return immediately. This change makes sure of that and prevents dereferencing of a null block causing the runtime error. Change-Id: Iec3040a1280ef9d80b1b9c76eca8071dff499411
-
- 23 Sep, 2016 3 commits
-
-
Jakub Pawlowski authored
-
Ajay Panicker authored
-
Jakub Pawlowski authored
This patch converts btm_ble_multi_adv.c file to .cc. It also separate header definitions from rest of BTM layer. It is another step towards making BLE advertising-related code testable. Bug: 30622771 Change-Id: I89965e10fbf773e48176ee19ef613dd0df2fb951
-
- 22 Sep, 2016 5 commits
-
-
Pavlin Radoslavov authored
The value of codec_type can be extracted from the codec_info, so it is not needed to pass it around as an argument, or keep it as an field. Also: * Added new APIs and the corresponding unit tests: - A2D_GetPacketTimestamp() - A2D_BuildCodecHeader() - replacement for bta_av_sbc_bld_hdr() - A2D_CodecName() * Replaced tBTA_AV_SEP.codec_type with tBTA_AV_SEP.codec_info Bug: 30958229 Test: A2DP tested manually. Unit tests included in the CL. Change-Id: I3bfd4750e8639d77a9938ab3c274c9d6ea859fb6
-
Ajay Panicker authored
Bug: 31466840 Change-Id: Ibd8f8b85eb59be8bfbb8a7c83b5935802624a748
-
chaoyu.x.wu authored
If enable the "connection parameters update" during GATT discovery, it may cause some device connection failure due to connection timeout. Since the the "connection parameter update" is enabled again when GATT discovery completed, remove the enable of "connection parameter update" after SMP complete to fix the issue. This issue was already fixed in commit 2d41fe1c, but then it was re-introduced in commit 444a8da8, which also removed comment explaining the issue, added back in this patch. Bug: 29060797 Change-Id: I42b0b36056821c30d887484e22bfcbd04ea7ca03
-
Treehugger Robot authored
-
Ajay Panicker authored
-
- 21 Sep, 2016 2 commits
-
-
Ajay Panicker authored
Bug: 31533166 Change-Id: Ia04e9c51280a3e379c0670b39a84eb5a53c5332b
-
Keizo Mendori authored
Motorola Roadster is advertizing Absolute Volume but it has a buggy implementation. Bug: 29740052 Change-Id: I18c1a2f03617669138be2e7e1d9c7bb391cd1129
-