OSDN Git Service
Pavlin Radoslavov [Thu, 13 Jul 2017 18:48:43 +0000 (11:48 -0700)]
resolve merge conflicts of
7d0ad232f to oc-dev-plus-aosp
Test: Code inspection.
Change-Id: I13a192920f58d8cea622a6acb2fb46fd07fdd195
Pavlin Radoslavov [Thu, 13 Jul 2017 17:29:07 +0000 (17:29 +0000)]
Merge "Add a missing check for PAN buffer size before copying data" into oc-dev
am:
ff7bd36bb7
Change-Id: I8da8cfc4703923afd2bb8311a95250c39447f9bd
TreeHugger Robot [Thu, 13 Jul 2017 17:25:27 +0000 (17:25 +0000)]
Merge "Add missing packet length checks while parsing BNEP control packets" into oc-dev
TreeHugger Robot [Thu, 13 Jul 2017 17:24:30 +0000 (17:24 +0000)]
Merge "Add a missing check for PAN buffer size before copying data" into oc-dev
Pavlin Radoslavov [Thu, 13 Jul 2017 17:19:10 +0000 (17:19 +0000)]
Allocate buffers of the right size when BT_HDR is included
am:
8810ffba99
Change-Id: I963e06b87ad133b661482df6e1b0fa8b8b15cbc4
Timm Korte [Thu, 13 Jul 2017 00:17:34 +0000 (00:17 +0000)]
Merge "bt: fix sdp service name by removing NULL char" am:
2766da83df
am:
8eff94efb9
Change-Id: I13ea9e2e243efd14d6a3b43b9428996f24586e7e
Timm Korte [Thu, 13 Jul 2017 00:15:03 +0000 (00:15 +0000)]
Merge "bt: fix sdp service name by removing NULL char"
am:
2766da83df
Change-Id: I57de21a3a368cfc0312cce5498bb0beb70ae5cc2
Treehugger Robot [Thu, 13 Jul 2017 00:09:27 +0000 (00:09 +0000)]
Merge "bt: fix sdp service name by removing NULL char"
Pavlin Radoslavov [Thu, 6 Jul 2017 23:51:35 +0000 (16:51 -0700)]
Add missing packet length checks while parsing BNEP control packets
Bug:
63146237
Test: External script
Change-Id: Ie778f3c99df81c85ed988f3af89b4edbcc2eeb99
Merged-In: Ie778f3c99df81c85ed988f3af89b4edbcc2eeb99
(cherry picked from commit
7feaeb006941a1494d7cdc0a2ffc4bb1004b38b4)
Jakub Pawlowski [Wed, 12 Jul 2017 22:57:32 +0000 (22:57 +0000)]
Make GATT server code more readable am:
b4e4799154
am:
dd80e5f674
Change-Id: I61be21b37d2d0ea825412ad7cfecf3d7e74c905c
Jakub Pawlowski [Wed, 12 Jul 2017 22:55:28 +0000 (22:55 +0000)]
Make GATT server code more readable
am:
b4e4799154
Change-Id: I4ef576808d9f258a45f3158a94f285035944f1cc
Timm Korte [Mon, 15 May 2017 06:30:00 +0000 (08:30 +0200)]
bt: fix sdp service name by removing NULL char
The Bluedroid stack uses a C string with terminating NULL char as a
service name. Since in BT, strings are TLV encoded (type, length,
value), this doesn't make sense.
Simple fix is to copy the string without the trailing NULL by
removing the "+1" after the strlen call when passing the string as
uint8_t array to the lower level functions.
The current behaviour keeps some older devices from being able to
connect to an Android providing a Serial Port profile due to having
the wrong service name (that is, including a NULL at the end instead
of the correct string).
Test: Checked against Linux BlueZ, which does not include this extra
null character.
Change-Id: I6a43024ff89ac09e4b2d2e5cfb407b6e9323f0bd
Signed-off-by: Timm Korte <timm.korte@gmail.com>
Pavlin Radoslavov [Thu, 6 Jul 2017 23:58:24 +0000 (16:58 -0700)]
Add a missing check for PAN buffer size before copying data
Bug:
63146237
Test: External script
Change-Id: I3e9c8a767a8a2a80ff56ccb48c56ca0d4b8c3402
Merged-In: I3e9c8a767a8a2a80ff56ccb48c56ca0d4b8c3402
Pavlin Radoslavov [Thu, 6 Jul 2017 20:39:02 +0000 (13:39 -0700)]
Allocate buffers of the right size when BT_HDR is included
Bug:
63146105
Test: External script
Change-Id: I1f2c871e3fcf57aabdad9d07905e6dae643bd496
Merged-In: I1f2c871e3fcf57aabdad9d07905e6dae643bd496
Jakub Pawlowski [Tue, 11 Jul 2017 22:36:48 +0000 (15:36 -0700)]
Make GATT server code more readable
Test: compilation test
Change-Id: Ia176d7a89ccb9590c80e5b6b8af5a3495bf2ab16
jruthe [Tue, 11 Jul 2017 21:26:23 +0000 (21:26 +0000)]
Merge "test_vendor: Implement packet assembly for SDUs" am:
2dd6b59d57
am:
9d153dd187
Change-Id: I3844e71bb8faa237e552b31e5f5369b0f9462c50
jruthe [Tue, 11 Jul 2017 21:22:51 +0000 (21:22 +0000)]
Merge "test_vendor: Implement packet assembly for SDUs"
am:
2dd6b59d57
Change-Id: If0995021d9201b91acaf49a891e2682e5a4f855e
Treehugger Robot [Tue, 11 Jul 2017 21:16:16 +0000 (21:16 +0000)]
Merge "test_vendor: Implement packet assembly for SDUs"
Jack He [Tue, 11 Jul 2017 20:37:57 +0000 (20:37 +0000)]
GATT: Expose opportunistic client API to Java am:
5120fedf20
am:
27a9e1249d
Change-Id: I00f499f1851c2ab6459cbcca0c4d02380005a392
Jack He [Tue, 11 Jul 2017 20:24:11 +0000 (20:24 +0000)]
GATT: Expose opportunistic client API to Java
am:
5120fedf20
Change-Id: I96347363962687799e5ca56feefc40eef56ae7e2
jruthe [Thu, 8 Jun 2017 22:33:32 +0000 (15:33 -0700)]
test_vendor: Implement packet assembly for SDUs
Created l2cap.* and l2cap_sdu.* for assembling an L2CAP packet from a
stream of SDU packets.
Test: Passed all tests in l2cap_test.cc and l2cap_sdu_test.cc
Change-Id: I64487ee67170b1dd4eda9555321b1ecf7ed57040
Jack He [Thu, 29 Jun 2017 20:58:47 +0000 (13:58 -0700)]
GATT: Expose opportunistic client API to Java
* Opportunistic GATT connection allows system service to subscribe to
characteristic notifications without holding the BLE connection
* Exposing this flag to Java allows Android applications to use it
Bug:
35874078
Test: make, test on Android App
Change-Id: Ic470acd63bf45d1c33696abed1e93b30746fb7a2
Android Build Merger (Role) [Fri, 7 Jul 2017 06:37:24 +0000 (06:37 +0000)]
Merge "Merge "Mark libbluetooth-types as vendor_available" am:
29f359181a am:
9ae297d02c" into oc-dev-plus-aosp
Jiyong Park [Fri, 7 Jul 2017 06:37:15 +0000 (06:37 +0000)]
Merge "Mark libbluetooth-types as vendor_available" am:
29f359181a
am:
9ae297d02c
Change-Id: Id9d7b0469261cde673a9d3206eb789f089967fd3
Jiyong Park [Fri, 7 Jul 2017 06:37:05 +0000 (06:37 +0000)]
Merge "Mark libbluetooth-types as vendor_available" am:
29f359181a
am:
9ae297d02c
Change-Id: I9257d4773e2e5b69ae21370e3b5b362967b9f123
Jiyong Park [Fri, 7 Jul 2017 06:33:15 +0000 (06:33 +0000)]
Merge "Mark libbluetooth-types as vendor_available"
am:
29f359181a
Change-Id: Ic63d5ccafceb91f2eddf3a41c8a3b8be6d200b0c
Treehugger Robot [Fri, 7 Jul 2017 06:27:41 +0000 (06:27 +0000)]
Merge "Mark libbluetooth-types as vendor_available"
Jinguang Dong [Fri, 7 Jul 2017 06:06:43 +0000 (06:06 +0000)]
Do not delete device record on HCI_ERR_KEY_MISSING am:
549ec693c2
am:
b415ac8648
Change-Id: I571bc39274f4f99663948789b323eba6c598b5f6
Jinguang Dong [Fri, 7 Jul 2017 06:02:43 +0000 (06:02 +0000)]
Do not delete device record on HCI_ERR_KEY_MISSING
am:
549ec693c2
Change-Id: I8c9ea5fad01fbb68b9f7067f7682cc9cd870daa2
Jinguang Dong [Wed, 28 Jun 2017 01:50:37 +0000 (09:50 +0800)]
Do not delete device record on HCI_ERR_KEY_MISSING
If an auth_complete event is received with HCI_ERR_KEY_MISSING, the
p_dev_rec->sm4 flag will be set to "BTM_SM4_UNKNOWN" in the
BTM_SecClearSecurityFlags() function. This will prevent the
BTM_SM4_RETRY procedure from being executed, which can cause
pairing failures.
To reproduce:
1. Two Phones, A: Android O, B: Android N.
2. Enable B in Bluetooth visable mode
3. A start discovery and create pairing with B successfully
4. B cancel pairing with A by remove A from pairing device
list of B.
5. A create paring with B again by touch paired device in A,
this first step will be failed.
Bug:
62615213
Test: manual
Change-Id: I514ba2f4d0fd2621c11bd83aeec24b8c6c6d2d5a
Signed-off-by: Yequan Song <songyequan@huawei.com>
Jiyong Park [Fri, 7 Jul 2017 04:29:16 +0000 (13:29 +0900)]
Mark libbluetooth-types as vendor_available
libbluetooty-types is used by a vendor module
android.hardware.bluetooth@1.0-service.sim, thus marking it as
vendor_available so that the lib is allowed for the HAL service when
building with BOARD_VNDK_VERSION.
Bug:
37342627
Test: BOARD_VNDK_VERSION=current m -j
android.hardware.bluetooth@1.0-service.sim
Change-Id: I39d071fc249ce6842e7175751abd6249b9367231
Android Build Merger (Role) [Fri, 7 Jul 2017 01:43:38 +0000 (01:43 +0000)]
Merge "Merge "Merge "Make RawAddress into a class (1/3)" am:
4a1fc85744" into stage-aosp-master am:
4669be25d5 -s ours" into oc-dev-plus-aosp
Jakub Pawlowski [Fri, 7 Jul 2017 01:43:27 +0000 (01:43 +0000)]
Merge "Merge "Make RawAddress into a class (1/3)" am:
4a1fc85744" into stage-aosp-master
am:
4669be25d5 -s ours
Change-Id: Ida9eb27eab54f87d9791dcb7108cb7351aec4fa2
Jakub Pawlowski [Fri, 7 Jul 2017 01:43:19 +0000 (01:43 +0000)]
Merge "Merge "Make RawAddress into a class (1/3)" am:
4a1fc85744" into stage-aosp-master
am:
4669be25d5 -s ours
Change-Id: Id8d611928dc23949ec94cf24ce5ec818e0df48b8
Jakub Pawlowski [Fri, 7 Jul 2017 01:40:14 +0000 (01:40 +0000)]
Merge "Make RawAddress into a class (1/3)" am:
4a1fc85744
am:
56978c211d -s ours
Change-Id: Ib77fc61181d7e8ee035a706e149868699a9decc1
Jakub Pawlowski [Fri, 7 Jul 2017 01:38:05 +0000 (01:38 +0000)]
Merge "Make RawAddress into a class (1/3)" am:
4a1fc85744
am:
6ad7d19e69
Change-Id: I56c4b867de829c86dd4f742ac1fce01ce2951f4b
Android Build Merger (Role) [Fri, 7 Jul 2017 01:37:41 +0000 (01:37 +0000)]
Merge "Merge "Make RawAddress into a class (1/3)" am:
4a1fc85744" into stage-aosp-master
Jakub Pawlowski [Fri, 7 Jul 2017 01:36:41 +0000 (01:36 +0000)]
Merge "Make RawAddress into a class (1/3)"
am:
4a1fc85744
Change-Id: I61d249aa17044cd55b6834bc9563f648362621b6
Jakub Pawlowski [Fri, 7 Jul 2017 01:35:36 +0000 (01:35 +0000)]
Merge "Make RawAddress into a class (1/3)"
am:
4a1fc85744
Change-Id: I05b23ab3aff4d61dd8b04a3f011e832305203ce5
Treehugger Robot [Fri, 7 Jul 2017 01:29:30 +0000 (01:29 +0000)]
Merge "Make RawAddress into a class (1/3)"
Myles Watson [Thu, 6 Jul 2017 23:09:42 +0000 (23:09 +0000)]
Merge "Remove unused BDADDR definitions am:
525e743277" into stage-aosp-master
am:
1b8043bbe0
Change-Id: I74ab0fb68ea45e31ab517a553d98e612c40b47ff
Myles Watson [Thu, 6 Jul 2017 23:09:26 +0000 (23:09 +0000)]
Remove unused BDADDR definitions am:
525e743277
am:
799a72b7c2
Change-Id: Id08c1c926e2ff224d44a5cdd72f75c1391347e89
Android Build Merger (Role) [Thu, 6 Jul 2017 22:56:40 +0000 (22:56 +0000)]
Merge "Remove unused BDADDR definitions am:
525e743277" into stage-aosp-master
Myles Watson [Thu, 6 Jul 2017 22:56:19 +0000 (22:56 +0000)]
Remove unused BDADDR definitions
am:
525e743277
Change-Id: I211d82d42a53fe9bb2a6b930c7d99d5187b4f850
Myles Watson [Thu, 6 Jul 2017 22:56:14 +0000 (22:56 +0000)]
Remove unused BDADDR definitions
am:
525e743277
Change-Id: I13b1c9dd558bf8662f5f9af0008df0740ec333ae
Jakub Pawlowski [Mon, 3 Jul 2017 22:39:36 +0000 (15:39 -0700)]
Make RawAddress into a class (1/3)
* Add libbluetooth-types - library containing types implementation, that
is common between stystem/bt and packages/apps/Bluetooth. It must be
included in every project using btif interface.
* Put Raw Address implementation into libbluetooth-types
* Unify all "to/from string" helper methods into ToString and FromString
* bd_addr_empty -> RawAddress::kEmpty
* bd_addr_any -> RawAddress::kAny
Also fix leaks in jni str2addr by adding ReleaseStringUTFChars
Test: types_unittest
Change-Id: Ie0694843ad5fbd2a80b310c5f532e5e5a9548043
Merged-In: Ie0694843ad5fbd2a80b310c5f532e5e5a9548043
Myles Watson [Wed, 28 Jun 2017 17:28:47 +0000 (10:28 -0700)]
Remove unused BDADDR definitions
The code that used these moved to the HAL.
Test: build
Change-Id: I4a25b525ff60c060143ea913c800c4dea8f676e1
Ajay Panicker [Thu, 6 Jul 2017 17:43:14 +0000 (17:43 +0000)]
Merge "Remove bta_closure in favor of posting messages to a message loop" am:
1c6f5e6a5c
am:
5e8da48d76
Change-Id: I4e88bb24985e18e5f29e60cde26c184d85b3fb79
Ajay Panicker [Thu, 6 Jul 2017 17:41:54 +0000 (17:41 +0000)]
Merge "Remove bta_closure in favor of posting messages to a message loop"
am:
1c6f5e6a5c
Change-Id: I8a90de11fea85a01747d35e655e24d9c3f0ad41b
Treehugger Robot [Thu, 6 Jul 2017 17:39:05 +0000 (17:39 +0000)]
Merge "Remove bta_closure in favor of posting messages to a message loop"
Pavlin Radoslavov [Thu, 6 Jul 2017 17:34:24 +0000 (17:34 +0000)]
Merge "Add missing lock protection when freeing RFCOMM port queues" am:
ea5319f3e0
am:
75236c40f6
Change-Id: I5fca11ed98a3f7b96228a8a207b989be956962ca
Pavlin Radoslavov [Thu, 6 Jul 2017 17:32:43 +0000 (17:32 +0000)]
Merge "Add missing lock protection when freeing RFCOMM port queues"
am:
ea5319f3e0
Change-Id: Idee0119a6aae76df40a65d91618fe42130768f65
Treehugger Robot [Thu, 6 Jul 2017 17:19:53 +0000 (17:19 +0000)]
Merge "Add missing lock protection when freeing RFCOMM port queues"
koh.changseok [Thu, 6 Jul 2017 02:21:06 +0000 (02:21 +0000)]
Merge "Merge "A2DP: Add mandatory elements for SBC SRC capabilities" am:
e0a0913672" into stage-aosp-master
am:
64305a2ac5
Change-Id: I0233ab022b485651821d16e1cf2f46d69b1d0a2c
koh.changseok [Thu, 6 Jul 2017 02:20:53 +0000 (02:20 +0000)]
Merge "A2DP: Add mandatory elements for SBC SRC capabilities" am:
e0a0913672
am:
09a943f17f
Change-Id: I49aeef656e17909b133123f89efcc5fbcb1c4346
Android Build Merger (Role) [Thu, 6 Jul 2017 02:10:53 +0000 (02:10 +0000)]
Merge "Merge "A2DP: Add mandatory elements for SBC SRC capabilities" am:
e0a0913672" into stage-aosp-master
koh.changseok [Thu, 6 Jul 2017 02:10:46 +0000 (02:10 +0000)]
Merge "A2DP: Add mandatory elements for SBC SRC capabilities"
am:
e0a0913672
Change-Id: I28432a70beeb57771174a32edeb0629d97200bfc
koh.changseok [Thu, 6 Jul 2017 02:10:36 +0000 (02:10 +0000)]
Merge "A2DP: Add mandatory elements for SBC SRC capabilities"
am:
e0a0913672
Change-Id: I018b14e6c7a1849da743ce19db053265e19af890
Treehugger Robot [Thu, 6 Jul 2017 01:47:24 +0000 (01:47 +0000)]
Merge "A2DP: Add mandatory elements for SBC SRC capabilities"
Srinu Jella [Thu, 6 Jul 2017 00:25:51 +0000 (00:25 +0000)]
Merge "Don't initiate role switch for blacklisted devices" am:
14eac9efa0
am:
026e94bba3
Change-Id: Iffe7268e4e5c401888780bc5481afd916437dea0
Srinu Jella [Thu, 6 Jul 2017 00:23:52 +0000 (00:23 +0000)]
Merge "Don't initiate role switch for blacklisted devices"
am:
14eac9efa0
Change-Id: I87ffd1fcd4ff76c702eb895a528598c585aeaebb
Treehugger Robot [Thu, 6 Jul 2017 00:19:02 +0000 (00:19 +0000)]
Merge "Don't initiate role switch for blacklisted devices"
Pavlin Radoslavov [Sat, 1 Jul 2017 04:25:15 +0000 (21:25 -0700)]
Add missing lock protection when freeing RFCOMM port queues
Bug:
63100223
Test: Code compilation
Change-Id: Ibbafb9586e9807688276c9eb2f6399cb3ee487c9
Satish Patel [Wed, 5 Jul 2017 23:35:07 +0000 (23:35 +0000)]
Merge "Generic Bluetooth HAL for standard Linux hci interface" am:
6c34c8adc1
am:
21338c7656
Change-Id: Ibb456aeceeca74de718bf15f431568de6d0817d7
Satish Patel [Wed, 5 Jul 2017 23:33:23 +0000 (23:33 +0000)]
Merge "Generic Bluetooth HAL for standard Linux hci interface"
am:
6c34c8adc1
Change-Id: I0b2b523f8467b3f0cebbe96d997416baadf48cc7
Treehugger Robot [Wed, 5 Jul 2017 23:27:33 +0000 (23:27 +0000)]
Merge "Generic Bluetooth HAL for standard Linux hci interface"
koh.changseok [Mon, 3 Jul 2017 17:37:42 +0000 (02:37 +0900)]
A2DP: Add mandatory elements for SBC SRC capabilities
* The SBC items below are mandatory for SBC SRC capabilities
(see A2DP_SPEC_V13.pdf, Section 4.3.2):
- Channel Mode - mono
- Block Length - 4, 8, 12, 16
* Updated/fixed the corresponding unit tests
Bug:
63260735
Test: Manual - A2DP SBC streaming
Change-Id: I04c4f0b830411bc736d7c402b86006c182af02e7
Ajay Panicker [Wed, 5 Jul 2017 20:20:53 +0000 (13:20 -0700)]
Remove bta_closure in favor of posting messages to a message loop
Test: Sanity test with Bluetooth
Change-Id: Ifda27a3bd88d82f884c4d8af6383f1c692b69e85
Srinu Jella [Wed, 5 Jul 2017 21:41:39 +0000 (21:41 +0000)]
Dynamic blacklist device for role switch am:
942648ef5a
am:
6ea73c7525
Change-Id: I01fe791e8d95db892d890fe7e322deefb50ee266
Srinu Jella [Wed, 5 Jul 2017 21:40:42 +0000 (21:40 +0000)]
Dynamic blacklist device for role switch
am:
942648ef5a
Change-Id: I95da63d1e6cc3952e53fcdb78760b86b27e6f4a9
Satish Patel [Wed, 28 Jun 2017 01:35:19 +0000 (18:35 -0700)]
Generic Bluetooth HAL for standard Linux hci interface
This acts as common interface for bluetooth devices (including
USB ones) using the standard Linux bluetooth hci interface.
Much of this code is pulled from hardware/interface/bluetooth
and system/bt/vendor_libs/linux.
Original code used from "system/bt/vendor_libs/linux" was from:
Samuel Ortiz <sameo@linux.intel.com>
Cristian Iorga <cristian.iorga@intel.com>
Pavlin Radoslavov <pavlin@google.com>
Jakub Pawlowski <jpawlowski@google.com>
Myles Watson <mylesgw@google.com>
Orginal code taken from hardware/interface/bluetooth was
contributed by:
Myles Watson <mylesgw@google.com>
Zach Johnson <zachoverflow@google.com>
Treehugger Robot <treehugger-gerrit@google.com>
Tested:
Hikey + on board bluetooth and Hikey + USB bluetooth dongle
Change-Id: I03da10cadfae6ffb298cfccc98e3337ab7db1967
Signed-off-by: Satish Patel <satish.patel@linaro.org>
[jstultz: Migrated code back to system/bt/vendor_libs/linux/.
Included required sepolicy changes. Reworded and simplified
commit message. ]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Srinu Jella [Wed, 7 Dec 2016 13:46:31 +0000 (19:16 +0530)]
Don't initiate role switch for blacklisted devices
Some devices always reject role switches and role switch
retries from the DUT may lead to A2DP glitches and LMP timeouts.
Test: manual
Bug:
33000157
Change-Id: I535a2c45ced0e14cf5530f78f3367569b306b1f4
Srinu Jella [Thu, 8 Dec 2016 13:33:20 +0000 (19:03 +0530)]
Dynamic blacklist device for role switch
- Blacklist the device if it's rejected the role switch for
max number of times. Same is added to the interop_database.
- Maximum number of failed (BTM_MAX_SW_ROLE_FAILED_ATTEMPTS)
attempts set to 3 and it is configurable.
- Same blacklisted device is referred by the BTM module when
any other module like profile is requesting for role switch
and BTM module returns BTM_REPEATED_ATTEMPTS as the switch
role status.
Test: Code compilation
Bug:
32999957
Change-Id: Ie999104a2c8ca507605ef3e1d454865cee98dcd2
Jiyong Park [Sun, 2 Jul 2017 03:45:50 +0000 (03:45 +0000)]
Merge "Add stdint.h for uint*_t types" am:
ca6aea976d
am:
6f2cf2d5ef
Change-Id: Iedec66633a6d4faf4c048332fe2b7e650381c59b
Jiyong Park [Sun, 2 Jul 2017 03:43:21 +0000 (03:43 +0000)]
Merge "Add stdint.h for uint*_t types"
am:
ca6aea976d
Change-Id: I6bff96fd99d2091a34ade1101350fc798e2ba574
Treehugger Robot [Sun, 2 Jul 2017 03:38:39 +0000 (03:38 +0000)]
Merge "Add stdint.h for uint*_t types"
Scott Bauer [Sat, 1 Jul 2017 01:41:09 +0000 (01:41 +0000)]
Read the correct amount of attributes am:
972c885cc9
am:
2f041ccb94
Change-Id: I84761b2140ea4d00caabd18108938a2901ffe71c
Scott Bauer [Sat, 1 Jul 2017 01:36:40 +0000 (01:36 +0000)]
Read the correct amount of attributes
am:
972c885cc9
Change-Id: I01cb7b412650c7d0e97646539b3b86a5166f4d84
Colin Cross [Fri, 30 Jun 2017 23:00:20 +0000 (23:00 +0000)]
Merge changes from topic 'refactor_register' am:
50e621f219
am:
f993169796
Change-Id: I9f4273866f68cfe108ee9a7a62d262859615ea2d
Colin Cross [Fri, 30 Jun 2017 23:00:13 +0000 (23:00 +0000)]
gofmt -w build/fluoride.go am:
2cf6e71b0a
am:
803867011d
Change-Id: Iba5dcf3f945efff4946e0a4a294eda2ff0abab7d
Colin Cross [Fri, 30 Jun 2017 22:55:44 +0000 (22:55 +0000)]
Merge changes from topic 'refactor_register'
am:
50e621f219
Change-Id: Ib9198bb482da3b67dcbeb1b517374643c14f4b45
Colin Cross [Fri, 30 Jun 2017 22:55:34 +0000 (22:55 +0000)]
gofmt -w build/fluoride.go
am:
2cf6e71b0a
Change-Id: Iaec2ee79f8930db7a75b8e8fc9c7434de0233a93
Scott Bauer [Fri, 7 Apr 2017 00:35:40 +0000 (18:35 -0600)]
Read the correct amount of attributes
bta_gattc_cache_load currently attempts to read 0xFF attributes into an
allocation sized to num_attr attributes, which can be smaller than 0xFF.
There aren't more than num_attr bytes in correct data, but this breaks
with dynamic buffer overflow checking in CopperheadOS for the read
system call since fread ends up calling read, which obtains the size of
the allocation from the malloc implementation and then aborts due to the
(potential) overflow.
This would also fail with the default enabled _FORTIFY_SOURCE=2 feature
in the Android Open Source Project if osi_malloc was marked with the
alloc_size attribute. The way it wraps malloc loses that information so
fortify checks aren't done for calls like this.
Change-Id: I68bd170d5378c9d9d21cbda376083bc0b857e15c
Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
[migrated to C++ file, added 0xFFFF limit and wrote commit message]
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Treehugger Robot [Fri, 30 Jun 2017 21:09:12 +0000 (21:09 +0000)]
Merge changes from topic 'refactor_register'
* changes:
Refactor module registration
gofmt -w build/fluoride.go
Jiyong Park [Tue, 27 Jun 2017 11:51:53 +0000 (20:51 +0900)]
Add stdint.h for uint*_t types
Mising stdint.h causes problem when building with BOARD_VNDK_VERSION,
where global include path is not provided.
Bug:
37342627
Test: BOARD_VNDK_VERSION=current m -j libbt-vendor
Change-Id: I55786baed229a3c9b4282816081a503d18a5a6f0
Nitin Arora [Fri, 30 Jun 2017 05:19:02 +0000 (05:19 +0000)]
Allow full dev consolidation after pairing am:
76eba3ad19
am:
83ac844d27
Change-Id: I4bbb594c4b0a49d7954bedd5dd1b21f5db9b6012
Nitin Arora [Fri, 30 Jun 2017 05:14:00 +0000 (05:14 +0000)]
Allow full dev consolidation after pairing
am:
76eba3ad19
Change-Id: I4f118649f780a5302b69fdcfd0fc19793af730a4
Nitin Arora [Sat, 13 Aug 2016 00:48:11 +0000 (17:48 -0700)]
Allow full dev consolidation after pairing
When BR/EDR and LE RPA device records are present
in the device records and the same remote device is
paired on a new RPA, the device consolidation happens
after the IRK is received. The current consolidation
breaks out of the loop after consolidating one device
record. In such cases, BR dev record is left and when
BR link key is derived, it gets updated in a separate
device record. Since two device records are present at
the same time for the same remote, the keys and static
addresses get picked up from incorrect node and issues
such as "remove device from resolving list seen with {0}
static address" are seen.
The fix includes allowing the host to complete
the consolidation for all device records rather than
breaking at the fist match.
Change-Id: Ic8ea4b831a7ba971eb6a0f54573934a6079b45d5
Philip Cuadra [Thu, 29 Jun 2017 23:31:12 +0000 (23:31 +0000)]
Bluetooth - Add tracing for TX queue and LDAC ABR am:
c02b5d4d68
am:
2806c16cdb
Change-Id: I8bcf3bdbae3e6b6365a8f206870b8a28ddbdacb4
Philip Cuadra [Thu, 29 Jun 2017 23:27:08 +0000 (23:27 +0000)]
Bluetooth - Add tracing for TX queue and LDAC ABR
am:
c02b5d4d68
Change-Id: Id2281ab270ee6e0a0d8416ce8d8cbff689838448
Philip Cuadra [Fri, 9 Jun 2017 21:36:06 +0000 (14:36 -0700)]
Bluetooth - Add tracing for TX queue and LDAC ABR
For debugging, add tracing to show the length of the TX queue and the
LDAC ABR level.
Test: Ran bluetooth, took a systrace
Change-Id: Ia23764d68f27ae8209e37c4a0836852d73cf6cbc
Jakub Pawlowski [Thu, 29 Jun 2017 07:12:54 +0000 (07:12 +0000)]
Rename bt_bdaddr_t into RawAddress (3/3) am:
a484a88819
am:
813e468382
Change-Id: If7b503d36c834a9a025c4a5f50509f73e0270ee1
Jakub Pawlowski [Thu, 29 Jun 2017 07:09:30 +0000 (07:09 +0000)]
Rename bt_bdaddr_t into RawAddress (3/3)
am:
a484a88819
Change-Id: I43e5e71569281683c0a33000746e235391420714
Jakub Pawlowski [Sun, 25 Jun 2017 00:30:18 +0000 (17:30 -0700)]
Rename bt_bdaddr_t into RawAddress (3/3)
Test: compilation test
Change-Id: I4571721a0c6165a66450ee157a53d8d15bfc45d0
Jakub Pawlowski [Wed, 28 Jun 2017 21:47:31 +0000 (21:47 +0000)]
Merge "Get rid of BD_ADDR (again)" am:
abc4a993c8
am:
7e87dfbb38
Change-Id: I6d5525d14483ee16981ba58e46be185ad8cc37d7
Jakub Pawlowski [Wed, 28 Jun 2017 21:44:01 +0000 (21:44 +0000)]
Merge "Get rid of BD_ADDR (again)"
am:
abc4a993c8
Change-Id: Ic4da09c13391f7b13ce3797b42188c6b9ce1289a
Treehugger Robot [Wed, 28 Jun 2017 21:36:09 +0000 (21:36 +0000)]
Merge "Get rid of BD_ADDR (again)"
Ben YoungTae Kim [Wed, 28 Jun 2017 20:27:54 +0000 (20:27 +0000)]
Set the A2DP media channel as a high priority L2CAP link am:
624ba681a6
am:
68aa3209de
Change-Id: I911c1883b8438ea29fd14b4d38e4edb0c95cc1fb
Ben YoungTae Kim [Wed, 28 Jun 2017 20:23:25 +0000 (20:23 +0000)]
Set the A2DP media channel as a high priority L2CAP link
am:
624ba681a6
Change-Id: Ie43bd0c37d05bbe8ad3072a2918b4a500635bbfd
Jakub Pawlowski [Wed, 28 Jun 2017 19:04:53 +0000 (12:04 -0700)]
Get rid of BD_ADDR (again)
BD_ADDR and BD_ADDR_LEN were defined multiple times. Get rid of the
redefiniton.
Test: compilation test
Change-Id: Ib6e922ce88132045c13ddc28d681a0f673d87407