OSDN Git Service

LE advertise data parsing refactor
authorJakub Pawlowski <jpawlowski@google.com>
Fri, 28 Apr 2017 21:59:46 +0000 (14:59 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Fri, 5 May 2017 13:06:29 +0000 (06:06 -0700)
commit103b2c44d3db6172a2dc9319e215eeece504316e
tree0296f566bb303b0dcca0200aef9b16e324993592
parent3a4e7622ff07772a512052c23cada59f5830941f
LE advertise data parsing refactor

* merge BTM_CheckAdvData and BTM_CheckEirData into GetFieldByType
* check wether AD data is properly formatted when the packet is
  received. Some controllers were returning malformed data that
  resulted in stack crashes for BT5 packets.
* add tests to verify the helpers work as expected

Test: added net_test_stack_ad_parser
Bug: 37671082
Change-Id: I49e43d7cf7d0a8ace1ee45d9b14b2b8440096b05
btif/src/btif_ble_scanner.cc
btif/src/btif_dm.cc
stack/Android.bp
stack/btm/btm_ble_gap.cc
stack/btm/btm_inq.cc
stack/include/advertise_data_parser.h [new file with mode: 0644]
stack/include/btm_api.h
stack/include/btm_ble_api.h
stack/test/ad_parser_unittest.cc [new file with mode: 0644]
test/run_unit_tests.sh