OSDN Git Service

android-x86/system-bt.git
5 years agoDO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into stage-aosp-master
Xin Li [Tue, 15 Jan 2019 00:14:40 +0000 (16:14 -0800)]
DO NOT MERGE - Merge pie-platform-release (PPRL.190105.001) into stage-aosp-master

Bug: 122685541
Change-Id: I579759f87bab672ef5189f9d13e8417651a04d60

5 years agoMerge "Fix BT a bad/ out of bounds array read"
Sal Savage [Mon, 14 Jan 2019 22:12:00 +0000 (14:12 -0800)]
Merge "Fix BT a bad/ out of bounds array read"
am: 7da7696e07

Change-Id: Idca50acaa84f59f95800e94a846247824d0341ef

5 years agoSnap for 5230900 from aa9c1b4abdb2ca7beea467f7be82e83363a32b11 to pi-platform-release
android-build-team Robot [Mon, 14 Jan 2019 22:03:03 +0000 (22:03 +0000)]
Snap for 5230900 from aa9c1b4abdb2ca7beea467f7be82e83363a32b11 to pi-platform-release

Change-Id: I50623117c36dbe20a0c8d120a7115628a2f53566

5 years agoMerge "Fix BT a bad/ out of bounds array read"
Sal Savage [Mon, 14 Jan 2019 21:43:55 +0000 (21:43 +0000)]
Merge "Fix BT a bad/ out of bounds array read"

5 years agoMerge "SMP: Fix invalid auth_req in LE Security Request handler"
Manoj Babulal [Mon, 14 Jan 2019 14:29:36 +0000 (06:29 -0800)]
Merge "SMP: Fix invalid auth_req in LE Security Request handler"
am: 6ab305324d

Change-Id: I408779f11d8778ebd188239e6a5f21e30d0f8f51

5 years agoMerge "SMP: Fix invalid auth_req in LE Security Request handler"
Treehugger Robot [Mon, 14 Jan 2019 14:23:01 +0000 (14:23 +0000)]
Merge "SMP: Fix invalid auth_req in LE Security Request handler"

5 years agoDo not crash on LE Create Connection "Command Disallowed"
Jakub Pawlowski [Mon, 14 Jan 2019 09:32:03 +0000 (01:32 -0800)]
Do not crash on LE Create Connection "Command Disallowed"
am: 9d52abf4d4

Change-Id: Ie2db913998282a20ccf66406ada730347f240e5f

5 years agoDo not crash on LE Create Connection "Command Disallowed"
Jakub Pawlowski [Thu, 3 Jan 2019 14:13:11 +0000 (15:13 +0100)]
Do not crash on LE Create Connection "Command Disallowed"

Being in "Connecting" used to mean we are either doing direct
connection, or background connection procedure. Now we have just one
connection procedure. This means there is no ambiguity when the
controller responds with "Command Disallowed" - we know exactly which
state to go back to.

Bug: 110412113
Bug: 112827989
Test: there is no test, or reproduction scenarion to verify that
      Ran GattConnectTest for sanity

Change-Id: I9ed1cdc7ae4032cda4e8a166310eca0004c7f9dc

5 years agoSMP: Fix invalid auth_req in LE Security Request handler
Manoj Babulal [Thu, 27 Dec 2018 10:43:19 +0000 (02:43 -0800)]
SMP: Fix invalid auth_req in LE Security Request handler

Due to wrong pointer de-reference, auth_req value read
in smp_proc_sec_req (LE Security Request packet handler)
was invalid.

Logcat trace shows invalid auth_req value:
.. bt_smp  : smp_proc_sec_req: auth_req=0xf9
   ....
.. bt_smp  : smp_proc_sec_req: auth_req=0xe9

After the fix, auth_req value is correct:
.. bt_smp  : smp_proc_sec_req: auth_req=0x1
   ....
.. bt_smp  : smp_proc_sec_req: auth_req=0x5

This data flow can be traced in code on this path:
smp_data_received -> smp_sm_event -> smp_proc_sec_req

Issue seen after following change:
https://android-review.googlesource.com/c/platform/system/bt/+/492442

Issue was discovered during execution of PTS test
cases GAP/SEC/AUT/BV-13-C and GAP/SEC/AUT/BV-14-C.

Fixes: 122066779

Test: Verified logcat trace shows valid auth_req
value prints from smp_proc_sec_req() function

Change-Id: I072b4794fb56a05b7ac7f2f4ca606514d7524550

5 years agoJanuary Pi-platform-release merges
Adam Seaton [Fri, 11 Jan 2019 22:55:24 +0000 (22:55 +0000)]
January Pi-platform-release merges

Change-Id: Id66375f8b1f3329e82df3d0fdb06917c065209de

5 years agoFix BT a bad/ out of bounds array read
Sal Savage [Wed, 9 Jan 2019 20:50:07 +0000 (12:50 -0800)]
Fix BT a bad/ out of bounds array read

Bug: 121375525
Test: Used automotive hardware and verified that pairing and media
      streaming and control still work and crashes no longer happen.
Change-Id: I3476425131718aded980f57a8b9be92a8e9f9d3b

5 years agoFix potential NULL dereference in smp_proc_confirm
Jakub Pawlowski [Fri, 11 Jan 2019 16:55:05 +0000 (08:55 -0800)]
Fix potential NULL dereference in smp_proc_confirm
am: 3c3fbd869f

Change-Id: I1b3175cb9a393da80adc52c886993af89788e48c

5 years agoFix potential NULL dereference in smp_proc_confirm
Jakub Pawlowski [Fri, 11 Jan 2019 12:43:33 +0000 (13:43 +0100)]
Fix potential NULL dereference in smp_proc_confirm

Bug: 122102910
Test: compilation
Change-Id: Idd16e1c1924165924847f1aad64ddd44a8a1b8ab

5 years agoMerge "Fix bt_trace.h #define"
Jack He [Fri, 11 Jan 2019 00:38:51 +0000 (16:38 -0800)]
Merge "Fix bt_trace.h #define"
am: fa41623e98

Change-Id: I5bafe65f8e17b3daaae84d569878ba27a4ad2407

5 years agoMerge "Fix bt_trace.h #define"
Treehugger Robot [Fri, 11 Jan 2019 00:21:24 +0000 (00:21 +0000)]
Merge "Fix bt_trace.h #define"

5 years agoAdd host tests to TEST_MAPPING
Dan Shi [Thu, 10 Jan 2019 23:00:45 +0000 (15:00 -0800)]
Add host tests to TEST_MAPPING
am: 491407dbad

Change-Id: I09538ad40d6d5c02f83fe9c870711ebbd7004c1e

5 years agoAdd host tests to TEST_MAPPING
Dan Shi [Thu, 10 Jan 2019 18:55:23 +0000 (10:55 -0800)]
Add host tests to TEST_MAPPING

Also added some missing test_suites setting.

Following tests don't have host_supported set to true in Android.bp:
net_test_audio_a2dp_hw
net_test_btif
net_test_btif_profile_queue
net_test_device
net_test_hci
net_test_stack
net_test_stack_ad_parser
net_test_stack_smp

Following tests failed to run in host with error "did not report any run":
net_test_performance
net_test_stack_rfcomm

Bug: 111921389
Test: system/bt$ atest --host :postsubmit
Change-Id: I5f55cead7a2ad1cadea48220f45781f4f74949dd

5 years agoFix bt_trace.h #define
Jack He [Thu, 10 Jan 2019 04:47:57 +0000 (20:47 -0800)]
Fix bt_trace.h #define

Test: make
Change-Id: Ie1177f2311db0b7b5dfb440f3f982d4a79aa460d

5 years agoRemove code related to Health Device Profile and MCAP Protocol
Jack He [Thu, 10 Jan 2019 04:51:00 +0000 (20:51 -0800)]
Remove code related to Health Device Profile and MCAP Protocol
am: 238f8359a9

Change-Id: Ib10cda753d45163b4d799ca4c1275fb43284c336

5 years agoRemove code related to Health Device Profile and MCAP Protocol
Jack He [Fri, 4 Jan 2019 01:11:24 +0000 (17:11 -0800)]
Remove code related to Health Device Profile and MCAP Protocol

* Health Device Profile (HDP) and MCAP protocol has been largely
  replaced by BLE. New applications should use Bluetooth Low Energy
  instead of legacy Bluetooth Health Device Profile

Bug: 111562841
Test: make, unit test, use Bluetooth
Change-Id: I3da1173a8a928af4b26a29e71746241c22af2236
Merged-In: I3da1173a8a928af4b26a29e71746241c22af2236
(cherry picked from commit dc13609b58b2f6c6185951f650036f5098e19e92)

5 years agoMerge "HCI: Simplify btu_hcif_hdl_command_status()"
Jack He [Wed, 9 Jan 2019 22:16:44 +0000 (14:16 -0800)]
Merge "HCI: Simplify btu_hcif_hdl_command_status()"
am: e5e0a70209

Change-Id: Icc28b7e93f3f94b82bdbfc7ab923b12b985fdff3

5 years agoMerge "HCI: Simplify btu_hcif_hdl_command_status()"
Treehugger Robot [Wed, 9 Jan 2019 21:59:39 +0000 (21:59 +0000)]
Merge "HCI: Simplify btu_hcif_hdl_command_status()"

5 years agoMerge "Group all Hearing Aids device information together"
Stanley Tng [Wed, 9 Jan 2019 17:47:12 +0000 (09:47 -0800)]
Merge "Group all Hearing Aids device information together"
am: 89be950b16

Change-Id: I803e04fb6d5f7322eea16aa2f9d3637643a8f00f

5 years agoMerge "Group all Hearing Aids device information together"
Treehugger Robot [Wed, 9 Jan 2019 17:36:40 +0000 (17:36 +0000)]
Merge "Group all Hearing Aids device information together"

5 years agoHCI: Simplify btu_hcif_hdl_command_status()
Jack He [Wed, 9 Jan 2019 01:48:20 +0000 (17:48 -0800)]
HCI: Simplify btu_hcif_hdl_command_status()

* Move 2nd layer switch statements into top layer
* Check if p_cmd is nullptr at the beginning of the function so
  that each case does not need to check it individually. p_cmd
  is never null.
* Skip parameter total length at beginning of the function

Test: make, unit test, use Bluetooth for music and calls
Change-Id: I23cf983a1ade44bcea0b1009860efdfaf3b8bca8

5 years agoHCI: Fix command status handling of HCI_QOS_SETUP
Jack He [Wed, 9 Jan 2019 05:14:52 +0000 (21:14 -0800)]
HCI: Fix command status handling of HCI_QOS_SETUP
am: 256800be50

Change-Id: I13000c98920ea2b4e7816b47a41352f271af2943

5 years agoRemove BTM_SCO_WAKE_PARKED_LINK flag
Jack He [Wed, 9 Jan 2019 02:02:03 +0000 (18:02 -0800)]
Remove BTM_SCO_WAKE_PARKED_LINK flag
am: 5213da9b4a

Change-Id: Id7868b58ada9e819fb8cb2fbb93ca5c874d0089d

5 years agoHCI: Fix command status handling of HCI_QOS_SETUP
Jack He [Wed, 9 Jan 2019 01:53:31 +0000 (17:53 -0800)]
HCI: Fix command status handling of HCI_QOS_SETUP

* QOS setup complete event was handled instead of QOS setup command

Test: make
Change-Id: I894099f369675bd25397ee0005c6838f39220eed

5 years agoGroup all Hearing Aids device information together
Stanley Tng [Fri, 21 Dec 2018 00:44:15 +0000 (16:44 -0800)]
Group all Hearing Aids device information together

A small refactor where the various information about a Hearing Aids
device is gathered into a class. Instead of passing a long list
of function parameters, it is cleaner to group them inside a single
class. It also makes it easier to add new elements in the future.

Test: Manual pair and audio stream with Hearing Aids
Bug: 119617521
Change-Id: I193b5cc915a6c36e7e36d1f06a5adcda7c17ab1c

5 years agoRemove BTM_SCO_WAKE_PARKED_LINK flag
Jack He [Sat, 5 Jan 2019 00:18:12 +0000 (16:18 -0800)]
Remove BTM_SCO_WAKE_PARKED_LINK flag

* Under majority of configurations, SCO connection can only be created
  if in non-parked mode since SCO is a circuit switch link

Bug: 122375953
Test: make
Change-Id: I58569025b435953b964e5aded64b3ace27d4e73c

5 years agoClean up BLE connection state state machine
Jakub Pawlowski [Tue, 8 Jan 2019 02:39:29 +0000 (18:39 -0800)]
Clean up BLE connection state state machine
am: cf7b381ce8

Change-Id: Ic045afbd0b7aa44b471b4f8c63c4adc6fab96989

5 years agoClean up BLE connection state state machine
Jakub Pawlowski [Wed, 2 Jan 2019 23:41:53 +0000 (00:41 +0100)]
Clean up BLE connection state state machine

* get rid of BLE_DIR_CONN - we never go into this state any more
* BLE_BG_CONN -> BLE_CONNECTING
* use btm_ble_get_conn_st instead of directly accessing control block

Test: compilation
Bug: 112827989
Change-Id: I4aa09a8b558c6f2161806a6d27bee0560fd19fd8

5 years agoMove all HCI LE Create Connection management into single file
Jakub Pawlowski [Mon, 7 Jan 2019 10:59:10 +0000 (02:59 -0800)]
Move all HCI LE Create Connection management into single file
am: a3580922c4

Change-Id: I96f122540d82b5f564023f3f2ff3d7b1a64b7a47

5 years agoMove all HCI LE Create Connection management into single file
Jakub Pawlowski [Mon, 31 Dec 2018 11:54:04 +0000 (12:54 +0100)]
Move all HCI LE Create Connection management into single file

Currently handling of LE Create Connection, LE Create Connection
Cancel, LE Connection Complete and other HCI commands related to LE
connection establishment is in two separate files.
Move all this code into single file.

Bug: 112827989
Test: compilation
Change-Id: Ibc2f6ca2324f4df8a23c2722762d0e5297782b33

5 years agoRemove BTM_SCO_INCLUDED flag
Jack He [Thu, 3 Jan 2019 18:52:18 +0000 (10:52 -0800)]
Remove BTM_SCO_INCLUDED flag
am: 050ef35fde

Change-Id: Id88e1c8b8e75764ede1b4d869ebaf1af4fb8ff8a

5 years agoRemove BTM_SCO_INCLUDED flag
Jack He [Thu, 3 Jan 2019 01:38:53 +0000 (17:38 -0800)]
Remove BTM_SCO_INCLUDED flag

* Instead of removing SCO related code during compilation, platforms
  should chose not to call SCO related methods when SCO is not supported
* For example, platforms can choose to not initialize HFP to avoid using
  SCO commands
* This CL removes BTM_SCO_INCLUDED compile time flag to simplify code
  flow and improve readability

Bug: 122279647
Test: mm -j40; run Bluetooth stack and make phone call
Change-Id: I67d290839091f66c289a428496304c8b3e1dbe21

5 years agoRemove connection_manager from gatt namespace
Jakub Pawlowski [Mon, 31 Dec 2018 15:21:04 +0000 (07:21 -0800)]
Remove connection_manager from gatt namespace
am: f20d94aeb8

Change-Id: I04df3ae34e992e68297e3704000d7f30c176bcad

5 years agoRemove connection_manager from gatt namespace
Jakub Pawlowski [Fri, 28 Dec 2018 18:03:09 +0000 (19:03 +0100)]
Remove connection_manager from gatt namespace

connection_manager handles more than GATT. Celanup naming.

Bug: 112827989
Test: compilation
Change-Id: Id5fdfacb12921cff04204cf2589f73a7c6a0d01f

5 years agoGet rid of is_ble_connecting and ble_connecting_bda
Jakub Pawlowski [Fri, 28 Dec 2018 21:25:05 +0000 (13:25 -0800)]
Get rid of is_ble_connecting and ble_connecting_bda
am: 23572544ba

Change-Id: Ib22fc7e693d9fdf31273b19c0a102aaf8c98bb38

5 years agoUse conneciton_manager for all LE connection establishment
Jakub Pawlowski [Fri, 28 Dec 2018 21:24:53 +0000 (13:24 -0800)]
Use conneciton_manager for all LE connection establishment
am: ada2b3ee07

Change-Id: I3fd558723f18737fffb0fa7270c306cfd8aed5de

5 years agoGet rid of direct connect queueing logic
Jakub Pawlowski [Fri, 28 Dec 2018 21:24:41 +0000 (13:24 -0800)]
Get rid of direct connect queueing logic
am: 672d7b1f37

Change-Id: I43fd40bf6cf683843cbae944211b0a6b9430fb01

5 years agoGet rid of is_ble_connecting and ble_connecting_bda
Jakub Pawlowski [Thu, 27 Dec 2018 20:02:13 +0000 (21:02 +0100)]
Get rid of is_ble_connecting and ble_connecting_bda

These variables make no sense any more, as we might be attempting
multiple connections at the same time.

Test: sl4a GattConnectTest, manual bonding test
Bug: 112827989
Change-Id: I7e1d01e8d80383b49ff9c20fb3758cef03c52882

5 years agoUse conneciton_manager for all LE connection establishment
Jakub Pawlowski [Wed, 19 Dec 2018 21:23:47 +0000 (22:23 +0100)]
Use conneciton_manager for all LE connection establishment

Test: sl4a GattConnectTest, manual bonding test
Bug: 112827989
Change-Id: I55878e03d268c43002e22ce4ebfbf0e334523882

5 years agoGet rid of direct connect queueing logic
Jakub Pawlowski [Mon, 17 Dec 2018 12:59:54 +0000 (13:59 +0100)]
Get rid of direct connect queueing logic

Instead of queueing requests, we should use whitelist to process the
requests simulteanously.
This patch does remove the queueing logic, succeeding patch will add the
logic to schedule through whitelist.

Test: compilation
Bug: 112827989
Change-Id: Ia7132812f704658ecb6919e52c70b291e6874660

5 years agoCall btm_ble_set_conn_st before on_connection_complete
Jakub Pawlowski [Fri, 21 Dec 2018 22:23:16 +0000 (14:23 -0800)]
Call btm_ble_set_conn_st before on_connection_complete
am: a22a78f3b3

Change-Id: I97d4f45aa54e6798204e0227c69ac91621294501

5 years agoCall btm_ble_set_conn_st before on_connection_complete
Jakub Pawlowski [Fri, 21 Dec 2018 16:16:01 +0000 (17:16 +0100)]
Call btm_ble_set_conn_st before on_connection_complete

on_connection_complete can trigger BTM_WhiteListRemove, which sends
"LE Create Connection Cancel" if the connection is pending.

Make sure connection state is updated before calling on_connection_complete.
Otherwise we send an unnecessary "LE Create Connection Cancel" request.

Bug: 112827989
Test: establish Direct connection with at least one device in the
      background connection procedure. Verify HCI snoop log content

Change-Id: I1b8532f4e58d5ab62b471ce0bde6c48640c83ff7

5 years agoMerge code in scanner/advertiser connection complete handler
Jakub Pawlowski [Thu, 20 Dec 2018 21:12:05 +0000 (13:12 -0800)]
Merge code in scanner/advertiser connection complete handler
am: c8dfd0fb06

Change-Id: Ibaed9f65f68cedf670ac4f6d9c0f19c36ea45243

5 years agoUnify code in scanner/advertiser connection complete handler.
Jakub Pawlowski [Thu, 20 Dec 2018 21:11:52 +0000 (13:11 -0800)]
Unify code in scanner/advertiser connection complete handler.
am: b295c481dd

Change-Id: I000cfd81b6caace4b6046b9a6757c4fc589cb0a4

5 years agoSplit l2cu_create_conn into two separate, transport-specific functions
Jakub Pawlowski [Thu, 20 Dec 2018 18:34:22 +0000 (10:34 -0800)]
Split l2cu_create_conn into two separate, transport-specific functions
am: 50a0ec23d7

Change-Id: I01f507afca510252ee1c294e953506b3301a9637

5 years agoMerge code in scanner/advertiser connection complete handler
Jakub Pawlowski [Fri, 14 Dec 2018 18:53:59 +0000 (19:53 +0100)]
Merge code in scanner/advertiser connection complete handler

Test: sl4a GattConnectTest
Bug: 112827989
Change-Id: I860693c11c263643858cfa0b4e4deb6a9f231cdd

5 years agoUnify code in scanner/advertiser connection complete handler.
Jakub Pawlowski [Fri, 14 Dec 2018 18:38:44 +0000 (19:38 +0100)]
Unify code in scanner/advertiser connection complete handler.

btm_ble_set_conn_st is called in every possible scenario of
l2cble_scanner_conn_comp. Call it at start, instead of before each
return.

Test: sl4a GattConnectTest
Bug: 112827989
Change-Id: I969fc59b934dc1c7a52be00741fdf38402545b26

5 years agoSplit l2cu_create_conn into two separate, transport-specific functions
Jakub Pawlowski [Fri, 14 Dec 2018 14:15:54 +0000 (15:15 +0100)]
Split l2cu_create_conn into two separate, transport-specific functions

There is no common logic between LE and BR/EDR paths.

Test: compilation
Bug: 112827989
Change-Id: I507d3a0d8efa0e4936b22722a9c1cc846e0be3bd

5 years agoMerge "Fix mtu assignment with correct value"
Ted Wang [Thu, 20 Dec 2018 06:31:27 +0000 (22:31 -0800)]
Merge "Fix mtu assignment with correct value"
am: 55c0aa19be

Change-Id: I3cc2bed544165ee45dbf7646ab13ac4258ce2ab2

5 years agoMerge "Fix mtu assignment with correct value"
Ted Wang [Thu, 20 Dec 2018 06:16:47 +0000 (06:16 +0000)]
Merge "Fix mtu assignment with correct value"

5 years agoMerge "use epoll_create1"
Nick Kralevich [Thu, 20 Dec 2018 00:12:10 +0000 (16:12 -0800)]
Merge "use epoll_create1"
am: b0cbd21cb2

Change-Id: Ie4a8c3462707aedc9676340ae06487f615e32776

5 years agoMerge "use epoll_create1"
Treehugger Robot [Wed, 19 Dec 2018 23:51:28 +0000 (23:51 +0000)]
Merge "use epoll_create1"

5 years agoEnable BLE background connection when stack is started
Hansong Zhang [Wed, 19 Dec 2018 22:09:47 +0000 (14:09 -0800)]
Enable BLE background connection when stack is started
am: f91d55816c

Change-Id: Idc622903ea84149956bcbb13daa0903ab8396e78

5 years agoEnable BLE background connection when stack is started
Hansong Zhang [Tue, 17 Jul 2018 23:24:24 +0000 (16:24 -0700)]
Enable BLE background connection when stack is started

Remove variable btm_cb.ble_ctr_cb.bg_conn_type. We can enable the
background mode when the Bluetooth stack is started and don't have
to wait until the first background connection request from HID
Device/Hearing Aid/GATT. As soon as we add the first device to white
list, the stack will send HCI Create Connection (White List) command.

Test: manual. Bond to a BLE mouse and turn off/on Bluetooth. Also test
with initiating another direct/white list connection while another white
list connection is pending
Bug: 111562702
Bug: 112827989
Change-Id: I82a476489d181d17aa1c1da8202df1be76928d77

5 years agoRevert "Remove redundant GATT_StartIf"
Jakub Pawlowski [Wed, 19 Dec 2018 19:20:21 +0000 (11:20 -0800)]
Revert "Remove redundant GATT_StartIf"
am: b22ea41685

Change-Id: I4fba57ad6c2f856109afb74331bdf3e621794899

5 years agoRevert "Remove redundant GATT_StartIf"
Jakub Pawlowski [Wed, 19 Dec 2018 12:43:03 +0000 (13:43 +0100)]
Revert "Remove redundant GATT_StartIf"

This change broke initial HID connection.

This reverts commit cb45b1e380126f300d9f7d89a8382438c5d06cd3.

5 years agoMerge "Add stng@google.com to the OWNERS list"
Stanley Tng [Tue, 18 Dec 2018 21:17:20 +0000 (13:17 -0800)]
Merge "Add stng@google.com to the OWNERS list"
am: efc194ae59

Change-Id: I042d5406886c56f1e7fd2fc52ea46f9c7358a970

5 years agoMerge "Add stng@google.com to the OWNERS list"
Treehugger Robot [Tue, 18 Dec 2018 21:11:28 +0000 (21:11 +0000)]
Merge "Add stng@google.com to the OWNERS list"

5 years agoMerge "Add a host test for net_test_avrcp"
Dan Shi [Tue, 18 Dec 2018 19:21:54 +0000 (11:21 -0800)]
Merge "Add a host test for net_test_avrcp"
am: 9f3afe4957

Change-Id: Ia2cae467aabd10bd9b713bc8c108ca1c297ca8fa

5 years agoMerge "Add a host test for net_test_avrcp"
Treehugger Robot [Tue, 18 Dec 2018 19:05:15 +0000 (19:05 +0000)]
Merge "Add a host test for net_test_avrcp"

5 years agoMerge "Make sure Hearing Aids' Connection Intervals is unchanged"
Stanley Tng [Tue, 18 Dec 2018 18:05:38 +0000 (10:05 -0800)]
Merge "Make sure Hearing Aids' Connection Intervals is unchanged"
am: be5124ed3d

Change-Id: I8179c5990b1329874a2f5f3d9d5b926f4708e933

5 years agoMerge "Make sure Hearing Aids' Connection Intervals is unchanged"
Treehugger Robot [Tue, 18 Dec 2018 17:04:26 +0000 (17:04 +0000)]
Merge "Make sure Hearing Aids' Connection Intervals is unchanged"

5 years agoFix mtu assignment with correct value
Ted Wang [Tue, 18 Dec 2018 02:31:06 +0000 (10:31 +0800)]
Fix mtu assignment with correct value

Assigned mtu value with correspond avct channel configuration

Bug: 120524683
Test: manual
Change-Id: Idb70c678cef1d704e232aef8706082a48b073ef8

5 years agoAdd stng@google.com to the OWNERS list
Stanley Tng [Tue, 28 Aug 2018 23:06:55 +0000 (16:06 -0700)]
Add stng@google.com to the OWNERS list

Test: N/A
Change-Id: Ic164086fc97fa72aa68ad751b35f339fa71233bb

5 years agouse epoll_create1
Nick Kralevich [Mon, 17 Dec 2018 17:09:43 +0000 (09:09 -0800)]
use epoll_create1

epoll_create leaks file descriptors. Use epoll_create1(EPOLL_CLOEXEC)
instead.

Bug: 120983106
Test: compiles and boots
Change-Id: I40abaaea6dad641dc03d141adb29e963e853edc4

5 years agoMake sure Hearing Aids' Connection Intervals is unchanged
Stanley Tng [Fri, 14 Dec 2018 01:31:31 +0000 (17:31 -0800)]
Make sure Hearing Aids' Connection Intervals is unchanged

Make sure that the connection interval of the LE Connection remains the
desired one and reset it if this interval gets changed.

Test: Manual with Hearing Aids device and repeated
connection/disconnection
Bug: 117886712
Change-Id: Id11d1d2e7901bfbbc9c452b94aba968afbc52ee0

5 years agoAdd a host test for net_test_avrcp
Dan Shi [Sat, 15 Dec 2018 01:17:40 +0000 (17:17 -0800)]
Add a host test for net_test_avrcp

Bug: 111921389
Test: atest
Change-Id: I26e4036bb76271ac6181429c904efe0f8b438256

5 years agoMerge "List test_config_template to android platform only."
Dan Shi [Sat, 15 Dec 2018 01:12:41 +0000 (17:12 -0800)]
Merge "List test_config_template to android platform only."
am: d41f810b28

Change-Id: I131e44269981e905f6d4917f86a906d8dd0edd86

5 years agoMerge "List test_config_template to android platform only."
Dan Shi [Sat, 15 Dec 2018 01:03:29 +0000 (01:03 +0000)]
Merge "List test_config_template to android platform only."

5 years agoList test_config_template to android platform only.
Dan Shi [Fri, 14 Dec 2018 17:56:36 +0000 (09:56 -0800)]
List test_config_template to android platform only.

This allows host side test config to be auto-generated from the right
template.

Bug: 120993548
Test: m -j net_test_avrcp && atest net_test_avrcp --host
Change-Id: I003713ea3c1c4c1c0686551828d817227ec19019

5 years agoUse White List for direct connection establishment to multiple devices
Jakub Pawlowski [Fri, 14 Dec 2018 09:56:57 +0000 (01:56 -0800)]
Use White List for direct connection establishment to multiple devices
am: cab1ae1127

Change-Id: I72d61ae5db9a9924fa10c23b74794be56370035c

5 years agoRemove unused battery level support
Jakub Pawlowski [Fri, 14 Dec 2018 08:54:00 +0000 (00:54 -0800)]
Remove unused battery level support
am: c79ab7241c

Change-Id: Ia624db04e97c94e0b93f1a95723318d36b243743

5 years agoMerge "Remove redundant GATT_StartIf"
Jakub Pawlowski [Fri, 14 Dec 2018 08:53:43 +0000 (00:53 -0800)]
Merge "Remove redundant GATT_StartIf"
am: 76037ac30a

Change-Id: I77e6f64ea666ce524fc11df625304db0c7f0d136

5 years agoUse White List for direct connection establishment to multiple devices
Jakub Pawlowski [Wed, 14 Nov 2018 15:15:04 +0000 (16:15 +0100)]
Use White List for direct connection establishment to multiple devices

Currently, we implement GAP Direct Connect procedure exactly as the spec
says: we attempt connection to just one device.

This means that an app doing Direct Connection can take over the ability
to establish connections, and if it repeats the request, can cause other
devices to not connect.

From now on, we will use White List for both Background and Direct
connections. When there is at least one direct connection, we will
increase the scan parameters used for connection.

Bug: 112827989
Test: added unittests, also sl4a GattConnectTest
Change-Id: Ic0b2f631e3c84d5e8e0f4683b0148f031bfd5639

5 years agoRemove unused battery level support
Jakub Pawlowski [Thu, 13 Dec 2018 23:27:11 +0000 (00:27 +0100)]
Remove unused battery level support

Change-Id: I88239a835562a5e3c32b830e4c2c31fed1f107b3

5 years agoMerge "Remove redundant GATT_StartIf"
Jakub Pawlowski [Fri, 14 Dec 2018 08:40:04 +0000 (08:40 +0000)]
Merge "Remove redundant GATT_StartIf"

5 years agoRemove redundant GATT_StartIf
Jakub Pawlowski [Thu, 13 Dec 2018 16:53:15 +0000 (17:53 +0100)]
Remove redundant GATT_StartIf

GATT_StartIf is just sending connect callback about all currently
connected devices, even ones that this app is not interested in.

For btif/java apps, we will trigger connection attempt to just one
device right after registration, which would trigger connect callback
anyway.

For all bta layer apps, they do guard inside connect callback to make
sure code is triggered for already known device, but the devices are
considered as known only after they already connected, and some event
triggered app to create control block.

Thus, GATT_StartIf is surplus feature that should be removed.

Test: run all sl4a GATT tests
Change-Id: I8c45b92dbbf80894c32bb870eb392e766063c934

5 years agoMerge "Pass package name as a part of startDiscovery"
Zach Johnson [Thu, 13 Dec 2018 21:49:38 +0000 (13:49 -0800)]
Merge "Pass package name as a part of startDiscovery"
am: 62e1f765bc

Change-Id: I3911f27f80b99ab28c91bd8a56cceefba5357fe6

5 years ago[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205...
Xin Li [Thu, 13 Dec 2018 21:27:59 +0000 (13:27 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
am: cb7dcad70d  -s ours

Change-Id: I3937cd25882e43468acb0d0192a5ccd34aa59091

5 years ago[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001)...
Xin Li [Thu, 13 Dec 2018 19:25:51 +0000 (11:25 -0800)]
[automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
am: 1083b621e4  -s ours

Change-Id: I050265331bd4a18405f7d6f93b03125a1fc659ae

5 years agoFix performance-for-range-copy warnings
Chih-Hung Hsieh [Thu, 13 Dec 2018 18:48:26 +0000 (10:48 -0800)]
Fix performance-for-range-copy warnings
am: 01a40403d7

Change-Id: Ife0d8af7af4a5ac26dfe7d735bbc65460d1beb70

5 years agoMerge "Pass package name as a part of startDiscovery"
Treehugger Robot [Thu, 13 Dec 2018 12:42:58 +0000 (12:42 +0000)]
Merge "Pass package name as a part of startDiscovery"

5 years agoMerge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
Treehugger Robot [Thu, 13 Dec 2018 05:45:20 +0000 (05:45 +0000)]
Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"

5 years agoPass package name as a part of startDiscovery
Zach Johnson [Thu, 13 Dec 2018 01:13:29 +0000 (17:13 -0800)]
Pass package name as a part of startDiscovery

Test: manual
Bug: 118347252
Change-Id: I52adf73009a9766ad9aabf41657187343a2d0f41

5 years agoFix performance-for-range-copy warnings
Chih-Hung Hsieh [Wed, 12 Dec 2018 22:30:52 +0000 (14:30 -0800)]
Fix performance-for-range-copy warnings

Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I7d5537c24c39d5c42ac17c8a67646e4b9321d6bb

5 years agoTurn stack/gatt/conneciton_manager.cc into text file
Jakub Pawlowski [Wed, 12 Dec 2018 08:30:59 +0000 (00:30 -0800)]
Turn stack/gatt/conneciton_manager.cc into text file
am: fef2539cd2

Change-Id: I95b2a8c2136819491f4aafc38e6fb0a782e898ec

5 years agoTurn stack/gatt/conneciton_manager.cc into text file
Jakub Pawlowski [Tue, 11 Dec 2018 20:53:58 +0000 (21:53 +0100)]
Turn stack/gatt/conneciton_manager.cc into text file

Change-Id: I031bfaa1745de55aeb0a0dbde3a7a67be0f9c982

5 years agoMerge changes I7f8b5cfd,I68d65028
Myles Watson [Wed, 12 Dec 2018 05:14:36 +0000 (21:14 -0800)]
Merge changes I7f8b5cfd,I68d65028
am: 1b29fe6e18

Change-Id: I00f505eb8b71e21e6a2bc778e41ee9a0f8e35fc3

5 years agoMerge changes I7f8b5cfd,I68d65028
Treehugger Robot [Wed, 12 Dec 2018 05:05:27 +0000 (05:05 +0000)]
Merge changes I7f8b5cfd,I68d65028

* changes:
  test_vendor: Add PacketBuilder classes
  test_vendor: Add PacketView for copyless parsing

5 years agoDO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Xin Li [Tue, 11 Dec 2018 22:45:08 +0000 (14:45 -0800)]
DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master

Bug: 120502534
Change-Id: Icdcf2220fd28f92b182da73bee207151e80db295

5 years agoMerge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp...
TreeHugger Robot [Tue, 11 Dec 2018 21:49:24 +0000 (21:49 +0000)]
Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master" into stage-aosp-master

5 years agoMerge "OWNERS -eisenbach, +zachoverflow"
Zach Johnson [Tue, 11 Dec 2018 08:26:18 +0000 (00:26 -0800)]
Merge "OWNERS -eisenbach, +zachoverflow"
am: 55c7b8ba5d

Change-Id: Ib3b6c7398a8a749ab6e19d202cde14250d3024dd

5 years agoMerge "OWNERS -eisenbach, +zachoverflow"
Zach Johnson [Tue, 11 Dec 2018 04:21:52 +0000 (04:21 +0000)]
Merge "OWNERS -eisenbach, +zachoverflow"

5 years agoDO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Xin Li [Mon, 10 Dec 2018 22:22:38 +0000 (14:22 -0800)]
DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master

Bug: 120502534
Change-Id: I71b31fb1bf8a4c2b2f471b54b5a74bc2191c9693

5 years agoFix GATT not working due to address mismatch
Jakub Pawlowski [Tue, 11 Dec 2018 00:20:46 +0000 (16:20 -0800)]
Fix GATT not working due to address mismatch
am: f4b2f61690

Change-Id: Id435aecebda5a8cb5195353616bbfeb8ec9a87ec

5 years agotest_vendor: Add PacketBuilder classes
Myles Watson [Wed, 14 Nov 2018 00:56:38 +0000 (16:56 -0800)]
test_vendor: Add PacketBuilder classes

Templated PacketBuilder class for inserting fixed width
types with the correct endianness.

Test: rootcanal-packets_test_host --gtest_filter=*PacketBuilderEndian*
Change-Id: I7f8b5cfd225ebae35f310b44fc0782b940a23007