OSDN Git Service

android-x86/system-bt.git
7 years agoMerge "Revert "Add dumpsys support for LE connection parameter updates"" am: b2f7a959...
Andre Eisenbach [Tue, 11 Oct 2016 17:53:42 +0000 (17:53 +0000)]
Merge "Revert "Add dumpsys support for LE connection parameter updates"" am: b2f7a959fd am: 34b83d600c am: f06af0cd46
am: 6b5cac7d75

Change-Id: Ied3f78bbf9180919269f076346d76daf96767ab6

7 years agoRemove Jabra headsets from absolute volume blacklist am: 98c7415e95 am: ecc90d0f7b...
Andre Eisenbach [Tue, 11 Oct 2016 17:53:30 +0000 (17:53 +0000)]
Remove Jabra headsets from absolute volume blacklist am: 98c7415e95 am: ecc90d0f7b am: 1c25f2abd6
am: 88edc0b560

Change-Id: I0a2d4eff2acd23a3cdcd5e3a750107367d73e40f

7 years agoConvert advertising HAL from struct into class (3/3) am: 74ef54b440 am: 90b9015e77...
Jakub Pawlowski [Tue, 11 Oct 2016 17:52:21 +0000 (17:52 +0000)]
Convert advertising HAL from struct into class (3/3) am: 74ef54b440 am: 90b9015e77 am: f3b6c2a566
am: fa10bcf5e2

Change-Id: Ia685bcef2a77f384c341c8e89965e22f5f3af027

7 years agoMerge "Remove return value of BTM_VendorSpecificCommand function" am: d4b958bced...
Jakub Pawlowski [Tue, 11 Oct 2016 17:52:03 +0000 (17:52 +0000)]
Merge "Remove return value of BTM_VendorSpecificCommand function" am: d4b958bced am: 459373a3d0 am: 9d6cf09525
am: 0fde896da5

Change-Id: Ib3e362dedff548cb5e341830ca2a464a9dc16d9a

7 years agoMerge "Revert "Add dumpsys support for LE connection parameter updates"" am: b2f7a959...
Andre Eisenbach [Tue, 11 Oct 2016 17:47:23 +0000 (17:47 +0000)]
Merge "Revert "Add dumpsys support for LE connection parameter updates"" am: b2f7a959fd am: 34b83d600c
am: f06af0cd46

Change-Id: I9c666513978590c8ec2fead462057adf339bb65d

7 years agoRemove Jabra headsets from absolute volume blacklist am: 98c7415e95 am: ecc90d0f7b
Andre Eisenbach [Tue, 11 Oct 2016 17:47:11 +0000 (17:47 +0000)]
Remove Jabra headsets from absolute volume blacklist am: 98c7415e95 am: ecc90d0f7b
am: 1c25f2abd6

Change-Id: Ib21cd8d3297010ecee959d7a43d0033d576019a1

7 years agoConvert advertising HAL from struct into class (3/3) am: 74ef54b440 am: 90b9015e77
Jakub Pawlowski [Tue, 11 Oct 2016 17:46:07 +0000 (17:46 +0000)]
Convert advertising HAL from struct into class (3/3) am: 74ef54b440 am: 90b9015e77
am: f3b6c2a566

Change-Id: Ib090a816dcc7c65dbfeafc746b7cee95f5ce787b

7 years agoMerge "Remove return value of BTM_VendorSpecificCommand function" am: d4b958bced...
Jakub Pawlowski [Tue, 11 Oct 2016 17:45:52 +0000 (17:45 +0000)]
Merge "Remove return value of BTM_VendorSpecificCommand function" am: d4b958bced am: 459373a3d0
am: 9d6cf09525

Change-Id: Ic090db35b4174ebc2cc8b6dcb62b6afbbcb7cab3

7 years agoMerge "Revert "Add dumpsys support for LE connection parameter updates"" am: b2f7a959fd
Andre Eisenbach [Tue, 11 Oct 2016 17:41:45 +0000 (17:41 +0000)]
Merge "Revert "Add dumpsys support for LE connection parameter updates"" am: b2f7a959fd
am: 34b83d600c

Change-Id: Id4701d42adbd07672659e6a7ad46114f5e454e17

7 years agoRemove Jabra headsets from absolute volume blacklist am: 98c7415e95
Andre Eisenbach [Tue, 11 Oct 2016 17:41:34 +0000 (17:41 +0000)]
Remove Jabra headsets from absolute volume blacklist am: 98c7415e95
am: ecc90d0f7b

Change-Id: I4d432404d0e2e3d9b1dcf9bb02bd917e4a51837f

7 years agoConvert advertising HAL from struct into class (3/3) am: 74ef54b440
Jakub Pawlowski [Tue, 11 Oct 2016 17:40:26 +0000 (17:40 +0000)]
Convert advertising HAL from struct into class (3/3) am: 74ef54b440
am: 90b9015e77

Change-Id: I420874bb6bc76741324f73e8b31c40418c8b36ee

7 years agoMerge "Remove return value of BTM_VendorSpecificCommand function" am: d4b958bced
Jakub Pawlowski [Tue, 11 Oct 2016 17:40:11 +0000 (17:40 +0000)]
Merge "Remove return value of BTM_VendorSpecificCommand function" am: d4b958bced
am: 459373a3d0

Change-Id: Ia5118dcea23fa15a5f907b9653ad2ff41a4e52ec

7 years agoMerge "Revert "Add dumpsys support for LE connection parameter updates""
Andre Eisenbach [Tue, 11 Oct 2016 17:35:10 +0000 (17:35 +0000)]
Merge "Revert "Add dumpsys support for LE connection parameter updates""
am: b2f7a959fd

Change-Id: Id532466a62d7100feedea66f7e09fec9e0c1ddba

7 years agoRemove Jabra headsets from absolute volume blacklist
Andre Eisenbach [Tue, 11 Oct 2016 17:35:00 +0000 (17:35 +0000)]
Remove Jabra headsets from absolute volume blacklist
am: 98c7415e95

Change-Id: Ib34049bc751e0d8b423d1a38ae4cf698bc97fd73

7 years agoConvert advertising HAL from struct into class (3/3)
Jakub Pawlowski [Tue, 11 Oct 2016 17:33:13 +0000 (17:33 +0000)]
Convert advertising HAL from struct into class (3/3)
am: 74ef54b440

Change-Id: I66f71a46d96d03de4dbe57fa3d38fd2cf2b6239f

7 years agoMerge "Remove return value of BTM_VendorSpecificCommand function"
Jakub Pawlowski [Tue, 11 Oct 2016 17:32:58 +0000 (17:32 +0000)]
Merge "Remove return value of BTM_VendorSpecificCommand function"
am: d4b958bced

Change-Id: I5d3b90dd514ea5c5170eaed4124ec4449db3ebe9

7 years agoMerge "Revert "Add dumpsys support for LE connection parameter updates""
Treehugger Robot [Mon, 10 Oct 2016 23:44:10 +0000 (23:44 +0000)]
Merge "Revert "Add dumpsys support for LE connection parameter updates""

7 years agoMerge "L2CAP: Ensure handle is not null before attempting to close a socket" am:...
Joseph Pirozzo [Mon, 10 Oct 2016 22:54:07 +0000 (22:54 +0000)]
Merge "L2CAP: Ensure handle is not null before attempting to close a socket" am: 171c14eae0 am: eee39a51e6 am: d9bd1d15c2
am: 67e450fb89

Change-Id: Ie6197477da3bf5e96b57749d3fe3e035570d2db7

7 years agoRemove return value from btsnd_hcic_* functions am: 763abdfe79 am: 83eb6b9d71 am...
Jakub Pawlowski [Mon, 10 Oct 2016 22:53:39 +0000 (22:53 +0000)]
Remove return value from btsnd_hcic_* functions am: 763abdfe79 am: 83eb6b9d71 am: c846a8448d
am: 947305d348

Change-Id: I899fea7dd6e5a04d3e1c5694d30f5652b5cfb988

7 years agoIgnore return value of btsnd_hcic_* functions am: b6ab9b3af6 am: bf1ff14834 am: 4e0e0...
Jakub Pawlowski [Mon, 10 Oct 2016 22:53:33 +0000 (22:53 +0000)]
Ignore return value of btsnd_hcic_* functions am: b6ab9b3af6 am: bf1ff14834 am: 4e0e0fe522
am: cc0d806149

Change-Id: I164ed1ef613b73a31cd89ee5a6a661390fa9aa3b

7 years agoRemove Jabra headsets from absolute volume blacklist
Andre Eisenbach [Tue, 13 Sep 2016 16:57:51 +0000 (09:57 -0700)]
Remove Jabra headsets from absolute volume blacklist

Firmware fixes are available for affected headsets (Thanks, Jabra!!).

Change-Id: I60b42366d1e8155895cc58fff69f6404415a0406

7 years agoMerge "L2CAP: Ensure handle is not null before attempting to close a socket" am:...
Joseph Pirozzo [Mon, 10 Oct 2016 22:44:42 +0000 (22:44 +0000)]
Merge "L2CAP: Ensure handle is not null before attempting to close a socket" am: 171c14eae0 am: eee39a51e6
am: d9bd1d15c2

Change-Id: Ib82bd66671d064876c6e99623fe6f9b53dbe90c8

7 years agoRemove return value from btsnd_hcic_* functions am: 763abdfe79 am: 83eb6b9d71
Jakub Pawlowski [Mon, 10 Oct 2016 22:44:22 +0000 (22:44 +0000)]
Remove return value from btsnd_hcic_* functions am: 763abdfe79 am: 83eb6b9d71
am: c846a8448d

Change-Id: I67241af4df6314ca80b0d86cc3751405ee092c2d

7 years agoIgnore return value of btsnd_hcic_* functions am: b6ab9b3af6 am: bf1ff14834
Jakub Pawlowski [Mon, 10 Oct 2016 22:44:16 +0000 (22:44 +0000)]
Ignore return value of btsnd_hcic_* functions am: b6ab9b3af6 am: bf1ff14834
am: 4e0e0fe522

Change-Id: I01c91b569afeb4dc0504f28b9420cf3bc848ef3f

7 years agoMerge "L2CAP: Ensure handle is not null before attempting to close a socket" am:...
Joseph Pirozzo [Mon, 10 Oct 2016 22:28:20 +0000 (22:28 +0000)]
Merge "L2CAP: Ensure handle is not null before attempting to close a socket" am: 171c14eae0
am: eee39a51e6

Change-Id: I208840b1bf2927ce0b14ef853ae801447e377926

7 years agoRemove return value from btsnd_hcic_* functions am: 763abdfe79
Jakub Pawlowski [Mon, 10 Oct 2016 22:28:02 +0000 (22:28 +0000)]
Remove return value from btsnd_hcic_* functions am: 763abdfe79
am: 83eb6b9d71

Change-Id: I43c09615eccb67a8c079a5b1ac25325acc254b5a

7 years agoIgnore return value of btsnd_hcic_* functions am: b6ab9b3af6
Jakub Pawlowski [Mon, 10 Oct 2016 22:27:57 +0000 (22:27 +0000)]
Ignore return value of btsnd_hcic_* functions am: b6ab9b3af6
am: bf1ff14834

Change-Id: I1c4ccf0bc72c73be53018882c716a325e908812b

7 years agoConvert advertising HAL from struct into class (3/3)
Jakub Pawlowski [Thu, 6 Oct 2016 23:52:30 +0000 (16:52 -0700)]
Convert advertising HAL from struct into class (3/3)

Bug: 30622771
Test: all related tests were updated
Change-Id: I9695284ae249fa427ae4b2f3e9649da951102c6c

7 years agoMerge "Remove return value of BTM_VendorSpecificCommand function"
Treehugger Robot [Mon, 10 Oct 2016 22:21:36 +0000 (22:21 +0000)]
Merge "Remove return value of BTM_VendorSpecificCommand function"

7 years agoRevert "Add dumpsys support for LE connection parameter updates"
Andre Eisenbach [Thu, 6 Oct 2016 22:42:22 +0000 (22:42 +0000)]
Revert "Add dumpsys support for LE connection parameter updates"

Reverting for now after talking to Jacky because this causes  circular dependencies as lower layer (stack/) functions are calling higher layer APIs (btif/) directly.

To restore a change like this, the data should be collected at a lower layer in the stack and reported through polling or a callback.

This reverts commit 8ec8ca4a875eed8b28e6714899f49781537411ae.

Change-Id: I748843864ae7198ea021fe70d2643a62097ab029

7 years agoMerge "L2CAP: Ensure handle is not null before attempting to close a socket"
Joseph Pirozzo [Mon, 10 Oct 2016 21:28:41 +0000 (21:28 +0000)]
Merge "L2CAP: Ensure handle is not null before attempting to close a socket"
am: 171c14eae0

Change-Id: I67fb6fa41c43625d428876bf5e54a8dae0356619

7 years agoRemove return value from btsnd_hcic_* functions
Jakub Pawlowski [Mon, 10 Oct 2016 21:27:36 +0000 (21:27 +0000)]
Remove return value from btsnd_hcic_* functions
am: 763abdfe79

Change-Id: I4248cbfafdc297d8053b12d26f1791d00dbf359e

7 years agoIgnore return value of btsnd_hcic_* functions
Jakub Pawlowski [Mon, 10 Oct 2016 21:27:34 +0000 (21:27 +0000)]
Ignore return value of btsnd_hcic_* functions
am: b6ab9b3af6

Change-Id: Id0f22cafe797ddd5934d5e0685a65123c6a4f089

7 years agoMerge "L2CAP: Ensure handle is not null before attempting to close a socket"
Treehugger Robot [Mon, 10 Oct 2016 20:19:29 +0000 (20:19 +0000)]
Merge "L2CAP: Ensure handle is not null before attempting to close a socket"

7 years agoRemove return value of BTM_VendorSpecificCommand function
Jakub Pawlowski [Mon, 10 Oct 2016 19:36:49 +0000 (12:36 -0700)]
Remove return value of BTM_VendorSpecificCommand function

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

7 years agoRemove return value from btsnd_hcic_* functions
Jakub Pawlowski [Mon, 10 Oct 2016 18:39:39 +0000 (11:39 -0700)]
Remove return value from btsnd_hcic_* functions

btsnd_hcic_* functions are always returning true, so this return value
is not really useful.

Test: unit tests pass
Change-Id: I06ced65392d180ceed565e45b7831de6aede283c

7 years agoIgnore return value of btsnd_hcic_* functions
Jakub Pawlowski [Mon, 10 Oct 2016 16:35:13 +0000 (09:35 -0700)]
Ignore return value of btsnd_hcic_* functions

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

7 years agoL2CAP: Ensure handle is not null before attempting to close a socket
Joseph Pirozzo [Mon, 10 Oct 2016 14:05:51 +0000 (07:05 -0700)]
L2CAP: Ensure handle is not null before attempting to close a socket

Bug: 32054308
Test: manual, UPF 55
Change-Id: Ib89f7557fa390d60691afe8399a768e8127e52cb
(cherry picked from commit a1fa1bb0d638d5f444bf959fb839e824d69de31d)

7 years agoMerge "Add null check to avoid exception after L2CAP psm assigned" am: ee85d35220...
Gurpreet Ghai [Fri, 7 Oct 2016 20:17:47 +0000 (20:17 +0000)]
Merge "Add null check to avoid exception after L2CAP psm assigned" am: ee85d35220 am: defed78c2a am: cdd852f7c1
am: 1c35575d3a

Change-Id: I80d95a095f17fff65dc1f9e354776ef8e19b2283

7 years agoHID: Fix to handle UHID_OUTPUT_EV command from UHID driver am: 960b9c391d am: 9dfee34...
Ben YoungTae Kim [Fri, 7 Oct 2016 20:17:35 +0000 (20:17 +0000)]
HID: Fix to handle UHID_OUTPUT_EV command from UHID driver am: 960b9c391d am: 9dfee34e3f am: 1fa91ea4a9
am: a854735b8a

Change-Id: If9f5ff685d852efc81d18f2f438ba46a108f5543

7 years agoMerge "Add null check to avoid exception after L2CAP psm assigned" am: ee85d35220...
Gurpreet Ghai [Fri, 7 Oct 2016 20:07:23 +0000 (20:07 +0000)]
Merge "Add null check to avoid exception after L2CAP psm assigned" am: ee85d35220 am: defed78c2a
am: cdd852f7c1

Change-Id: Id2a3d73a939f51b4e618768ef744ad94f17e496f

7 years agoHID: Fix to handle UHID_OUTPUT_EV command from UHID driver am: 960b9c391d am: 9dfee34e3f
Ben YoungTae Kim [Fri, 7 Oct 2016 20:07:14 +0000 (20:07 +0000)]
HID: Fix to handle UHID_OUTPUT_EV command from UHID driver am: 960b9c391d am: 9dfee34e3f
am: 1fa91ea4a9

Change-Id: Iaf8eb1724a01e5209caac6d16dad8f0e1888579d

7 years agoMerge "Add null check to avoid exception after L2CAP psm assigned" am: ee85d35220
Gurpreet Ghai [Fri, 7 Oct 2016 20:02:49 +0000 (20:02 +0000)]
Merge "Add null check to avoid exception after L2CAP psm assigned" am: ee85d35220
am: defed78c2a

Change-Id: I6602872885f941baf842aba7de05ff602c33e7ba

7 years agoHID: Fix to handle UHID_OUTPUT_EV command from UHID driver am: 960b9c391d
Ben YoungTae Kim [Fri, 7 Oct 2016 20:02:39 +0000 (20:02 +0000)]
HID: Fix to handle UHID_OUTPUT_EV command from UHID driver am: 960b9c391d
am: 9dfee34e3f

Change-Id: Ibd3acdfdf31b7fb31dc07288f4d8bd46895c4cba

7 years agoMerge "Add null check to avoid exception after L2CAP psm assigned"
Gurpreet Ghai [Fri, 7 Oct 2016 19:58:52 +0000 (19:58 +0000)]
Merge "Add null check to avoid exception after L2CAP psm assigned"
am: ee85d35220

Change-Id: Ie16d5d2af12291c02a47e6ce39fc002503063b93

7 years agoHID: Fix to handle UHID_OUTPUT_EV command from UHID driver
Ben YoungTae Kim [Fri, 7 Oct 2016 19:58:43 +0000 (19:58 +0000)]
HID: Fix to handle UHID_OUTPUT_EV command from UHID driver
am: 960b9c391d

Change-Id: I47e7a4edfdf075223b8eb3115a31ff0a5541aa7d

7 years agoMerge "Add null check to avoid exception after L2CAP psm assigned"
Treehugger Robot [Fri, 7 Oct 2016 19:51:54 +0000 (19:51 +0000)]
Merge "Add null check to avoid exception after L2CAP psm assigned"

7 years agoHID: Fix to handle UHID_OUTPUT_EV command from UHID driver
Ben YoungTae Kim [Wed, 10 Aug 2016 20:31:23 +0000 (13:31 -0700)]
HID: Fix to handle UHID_OUTPUT_EV command from UHID driver

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

7 years agoAdd null check to avoid exception after L2CAP psm assigned
Gurpreet Ghai [Wed, 3 Feb 2016 09:31:41 +0000 (15:01 +0530)]
Add null check to avoid exception after L2CAP psm assigned

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

7 years agoRefactor advertising data types am: 9eaf776867 am: 8b081eb046 am: 86d0de756f
Jakub Pawlowski [Thu, 6 Oct 2016 23:50:16 +0000 (23:50 +0000)]
Refactor advertising data types am: 9eaf776867 am: 8b081eb046 am: 86d0de756f
am: 5e61d912f0

Change-Id: I7e195ad2831c1cdc79eb8b162599d32e7c714bb5

7 years agoRefactor advertising data types am: 9eaf776867 am: 8b081eb046
Jakub Pawlowski [Thu, 6 Oct 2016 23:22:45 +0000 (23:22 +0000)]
Refactor advertising data types am: 9eaf776867 am: 8b081eb046
am: 86d0de756f

Change-Id: I2a01a5e54b5b160c7f6b9496697b3c5af4dbc214

7 years agoRefactor advertising data types am: 9eaf776867
Jakub Pawlowski [Thu, 6 Oct 2016 23:18:58 +0000 (23:18 +0000)]
Refactor advertising data types am: 9eaf776867
am: 8b081eb046

Change-Id: Ib537646a851d0035a98d2ee313e2c41eded4054c

7 years agoRefactor advertising data types
Jakub Pawlowski [Thu, 6 Oct 2016 23:15:45 +0000 (23:15 +0000)]
Refactor advertising data types
am: 9eaf776867

Change-Id: I164b968032be28ea1ac5e1dceeb614d1b1945826

7 years agoRefactor advertising data types
Jakub Pawlowski [Wed, 5 Oct 2016 02:30:09 +0000 (19:30 -0700)]
Refactor advertising data types

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

7 years agoUse the correct API to check whether a codec is valid am: a0db321d98 am: 70340b2e5a...
Pavlin Radoslavov [Wed, 5 Oct 2016 23:55:39 +0000 (23:55 +0000)]
Use the correct API to check whether a codec is valid am: a0db321d98 am: 70340b2e5a am: 6e72f242e2
am: b1f2873eb8

Change-Id: Ic548ac04f634257c9e3bd324617e6d7f19b2ebaa

7 years agoUse the correct API to check whether a codec is valid am: a0db321d98 am: 70340b2e5a
Pavlin Radoslavov [Wed, 5 Oct 2016 23:52:23 +0000 (23:52 +0000)]
Use the correct API to check whether a codec is valid am: a0db321d98 am: 70340b2e5a
am: 6e72f242e2

Change-Id: I63484758582a02f2e6d7ed9caa7c72dd1f0c3841

7 years agoUse the correct API to check whether a codec is valid am: a0db321d98
Pavlin Radoslavov [Wed, 5 Oct 2016 23:49:21 +0000 (23:49 +0000)]
Use the correct API to check whether a codec is valid am: a0db321d98
am: 70340b2e5a

Change-Id: I11d33eb780421159ea075d2258cf6f3bd54cf305

7 years agoUse the correct API to check whether a codec is valid
Pavlin Radoslavov [Wed, 5 Oct 2016 23:46:51 +0000 (23:46 +0000)]
Use the correct API to check whether a codec is valid
am: a0db321d98

Change-Id: I1ffc55d6a5d79aa62c191249a590a9bc2d0209bb

7 years agoUse the correct API to check whether a codec is valid
Pavlin Radoslavov [Wed, 5 Oct 2016 21:25:08 +0000 (14:25 -0700)]
Use the correct API to check whether a codec is valid

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

7 years agoRemove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN am: be43ee7658 am: 4ca45cee60...
Jakub Pawlowski [Wed, 5 Oct 2016 18:16:37 +0000 (18:16 +0000)]
Remove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN am: be43ee7658 am: 4ca45cee60 am: 3b2ff2d034
am: cfe62a93f4

Change-Id: If7ca1d551e070f299c109e1f6af00083759517db

7 years agoRemove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN am: be43ee7658 am: 4ca45cee60
Jakub Pawlowski [Wed, 5 Oct 2016 18:08:39 +0000 (18:08 +0000)]
Remove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN am: be43ee7658 am: 4ca45cee60
am: 3b2ff2d034

Change-Id: Icff06a450095b10248b12da243295e62ff4bc2e9

7 years agoRemove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN am: be43ee7658
Jakub Pawlowski [Wed, 5 Oct 2016 18:06:08 +0000 (18:06 +0000)]
Remove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN am: be43ee7658
am: 4ca45cee60

Change-Id: Ie93d9f49eb2c96cdecb89ab7b92b49b74a154e65

7 years agoRemove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN
Jakub Pawlowski [Wed, 5 Oct 2016 18:03:37 +0000 (18:03 +0000)]
Remove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN
am: be43ee7658

Change-Id: I1dbcfc9e49433b83426ee13df9bdbfda9a5deab9

7 years agoMake Bluetooth LE multi-advertising testable am: e47b769e71 am: 7e6427804e am: 1e9a53e21b
Jakub Pawlowski [Wed, 5 Oct 2016 17:36:22 +0000 (17:36 +0000)]
Make Bluetooth LE multi-advertising testable am: e47b769e71 am: 7e6427804e am: 1e9a53e21b
am: 11a71578b1

Change-Id: Iefe44998f6a9b0c4d5dd41378d430d4c802bbe3a

7 years agoMake Bluetooth LE multi-advertising testable am: e47b769e71 am: 7e6427804e
Jakub Pawlowski [Wed, 5 Oct 2016 17:28:21 +0000 (17:28 +0000)]
Make Bluetooth LE multi-advertising testable am: e47b769e71 am: 7e6427804e
am: 1e9a53e21b

Change-Id: I437cf678e93b02e79010942f83b85859cec159cb

7 years agoMake Bluetooth LE multi-advertising testable am: e47b769e71
Jakub Pawlowski [Wed, 5 Oct 2016 17:25:57 +0000 (17:25 +0000)]
Make Bluetooth LE multi-advertising testable am: e47b769e71
am: 7e6427804e

Change-Id: I6815329400aca2471360f76eafb7a13357906e2b

7 years agoMake Bluetooth LE multi-advertising testable
Jakub Pawlowski [Wed, 5 Oct 2016 17:22:52 +0000 (17:22 +0000)]
Make Bluetooth LE multi-advertising testable
am: e47b769e71

Change-Id: I9dfc10c8849e1ac63494dbc9295d6e354127ec40

7 years agoRemove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN
Jakub Pawlowski [Tue, 4 Oct 2016 23:47:01 +0000 (16:47 -0700)]
Remove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN

Change-Id: I6e68f80d0d97081a4fc3879e6c11342923cfef7b

7 years agoMake Bluetooth LE multi-advertising testable
Jakub Pawlowski [Wed, 28 Sep 2016 14:36:54 +0000 (07:36 -0700)]
Make Bluetooth LE multi-advertising testable

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

7 years agovendor_lib: Apply clang-format with the new config am: 015834df15 am: d4c8851090...
Myles Watson [Wed, 5 Oct 2016 04:14:33 +0000 (04:14 +0000)]
vendor_lib: Apply clang-format with the new config am: 015834df15 am: d4c8851090 am: e3275cace0
am: 8b36662e81

Change-Id: I0e0cc9b5f7017a76320c039ed35ee3d716e0dd06

7 years agovendor_lib: Apply clang-format with the new config am: 015834df15 am: d4c8851090
Myles Watson [Wed, 5 Oct 2016 04:08:03 +0000 (04:08 +0000)]
vendor_lib: Apply clang-format with the new config am: 015834df15 am: d4c8851090
am: e3275cace0

Change-Id: I5c974f817d7735aa5c8e17476b5944723c50b2c1

7 years agovendor_lib: Apply clang-format with the new config am: 015834df15
Myles Watson [Wed, 5 Oct 2016 04:06:03 +0000 (04:06 +0000)]
vendor_lib: Apply clang-format with the new config am: 015834df15
am: d4c8851090

Change-Id: I946747b17cd5cc06a4c4fe5736f18c6a7c824c93

7 years agovendor_lib: Apply clang-format with the new config
Myles Watson [Wed, 5 Oct 2016 04:03:33 +0000 (04:03 +0000)]
vendor_lib: Apply clang-format with the new config
am: 015834df15

Change-Id: I23daee752536e6758e9d06714d04edcaa68b9f9b

7 years agovendor_lib: Apply clang-format with the new config
Myles Watson [Fri, 30 Sep 2016 15:45:15 +0000 (08:45 -0700)]
vendor_lib: Apply clang-format with the new config

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

7 years agobt: replace cutils/log.h with android/log.h am: 5201f95102 am: be4bc71f9f am: 7dca880ac4
Mark Salyzyn [Tue, 4 Oct 2016 19:52:48 +0000 (19:52 +0000)]
bt: replace cutils/log.h with android/log.h am: 5201f95102 am: be4bc71f9f am: 7dca880ac4
am: a9422cf322

Change-Id: I1f4838d6b3da936d1684498f132455aa78a3894b

7 years agobt: replace cutils/log.h with android/log.h am: 5201f95102 am: be4bc71f9f
Mark Salyzyn [Tue, 4 Oct 2016 19:49:35 +0000 (19:49 +0000)]
bt: replace cutils/log.h with android/log.h am: 5201f95102 am: be4bc71f9f
am: 7dca880ac4

Change-Id: If9054ad03a039ee918e5864d9f613ea95b0ac67d

7 years agobt: replace cutils/log.h with android/log.h am: 5201f95102
Mark Salyzyn [Tue, 4 Oct 2016 19:44:47 +0000 (19:44 +0000)]
bt: replace cutils/log.h with android/log.h am: 5201f95102
am: be4bc71f9f

Change-Id: Ifa91e4b14d98dc4dd22faf27b4b5d8dd4df1b2da

7 years agobt: replace cutils/log.h with android/log.h
Mark Salyzyn [Tue, 4 Oct 2016 19:41:47 +0000 (19:41 +0000)]
bt: replace cutils/log.h with android/log.h
am: 5201f95102

Change-Id: Ieefd12664db41ec7e8a1c08088a3463a58a39d86

7 years agoFix bad GATT client state machine state after successfull cache load am: f87953f1be...
Jakub Pawlowski [Tue, 4 Oct 2016 16:49:07 +0000 (16:49 +0000)]
Fix bad GATT client state machine state after successfull cache load am: f87953f1be am: 565ca33e21
am: 70931eade7

Change-Id: If08773d1f2fcf939a1ad1a18f53de790c44e10b5

7 years agoFix bad GATT client state machine state after successfull cache load am: f87953f1be
Jakub Pawlowski [Tue, 4 Oct 2016 16:47:09 +0000 (16:47 +0000)]
Fix bad GATT client state machine state after successfull cache load am: f87953f1be
am: 565ca33e21

Change-Id: I40d4f4d32ca87341f82fecb721f394e7caa0aa50

7 years agoFix bad GATT client state machine state after successfull cache load
Jakub Pawlowski [Tue, 4 Oct 2016 16:45:43 +0000 (16:45 +0000)]
Fix bad GATT client state machine state after successfull cache load
am: f87953f1be

Change-Id: If89361b40bd9abf0150afa4ac2af1b02366eafc7

7 years agobt: replace cutils/log.h with android/log.h
Mark Salyzyn [Wed, 28 Sep 2016 22:31:49 +0000 (15:31 -0700)]
bt: replace cutils/log.h with android/log.h

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I8fb392150441ca5b6bc43dc43a10a3009e22202b

7 years agoMerge "Fix bad GATT client state machine state after successfull cache load" am:...
Jakub Pawlowski [Tue, 4 Oct 2016 00:52:17 +0000 (00:52 +0000)]
Merge "Fix bad GATT client state machine state after successfull cache load" am: 69b916046d am: 0776cdf3e6 am: 42acb81619
am: 9abfc9c14a

Change-Id: I7c1e29f0ef2c63e61fa28286d1299576aa6c3373

7 years agoMerge "Fix bad GATT client state machine state after successfull cache load" am:...
Jakub Pawlowski [Tue, 4 Oct 2016 00:49:39 +0000 (00:49 +0000)]
Merge "Fix bad GATT client state machine state after successfull cache load" am: 69b916046d am: 0776cdf3e6
am: 42acb81619

Change-Id: Ia726080e38eb634668665b07e9bd4ea91b6ae340

7 years agoMerge "Fix bad GATT client state machine state after successfull cache load" am:...
Jakub Pawlowski [Tue, 4 Oct 2016 00:44:15 +0000 (00:44 +0000)]
Merge "Fix bad GATT client state machine state after successfull cache load" am: 69b916046d
am: 0776cdf3e6

Change-Id: I2094e041dc9d38c1ceb1ea5a649d62de16a9ae0a

7 years agoMerge "Fix bad GATT client state machine state after successfull cache load"
Jakub Pawlowski [Tue, 4 Oct 2016 00:41:45 +0000 (00:41 +0000)]
Merge "Fix bad GATT client state machine state after successfull cache load"
am: 69b916046d

Change-Id: Ib8fedecce74779755c2ebb285db6ca31b8714b68

7 years agoMerge "Fix bad GATT client state machine state after successfull cache load"
Jakub Pawlowski [Tue, 4 Oct 2016 00:38:14 +0000 (00:38 +0000)]
Merge "Fix bad GATT client state machine state after successfull cache load"

7 years agoReplace log/log.h with android/log.h am: 2f0c1fff33 am: 53dc5ba848 am: 7a3ec37304
Mark Salyzyn [Mon, 3 Oct 2016 23:03:13 +0000 (23:03 +0000)]
Replace log/log.h with android/log.h am: 2f0c1fff33 am: 53dc5ba848 am: 7a3ec37304
am: e53dd48d57

Change-Id: Id51dfaa86619020ed9e1a401c65ca10990525b51

7 years agoReplace log/log.h with android/log.h am: 2f0c1fff33 am: 53dc5ba848
Mark Salyzyn [Mon, 3 Oct 2016 22:57:31 +0000 (22:57 +0000)]
Replace log/log.h with android/log.h am: 2f0c1fff33 am: 53dc5ba848
am: 7a3ec37304

Change-Id: I49cd4f5249dc65c74cf828254f3191a017eb3ad2

7 years agoReplace log/log.h with android/log.h am: 2f0c1fff33
Mark Salyzyn [Mon, 3 Oct 2016 22:52:21 +0000 (22:52 +0000)]
Replace log/log.h with android/log.h am: 2f0c1fff33
am: 53dc5ba848

Change-Id: I1009dd3e5413e8c84608bc6e473cd4127fbd4f9e

7 years agoReplace log/log.h with android/log.h
Mark Salyzyn [Mon, 3 Oct 2016 22:48:20 +0000 (22:48 +0000)]
Replace log/log.h with android/log.h
am: 2f0c1fff33

Change-Id: I137539cc1f2cdeda6ceb6f7e4106fb379dc50555

7 years agoReplace log/log.h with android/log.h
Mark Salyzyn [Thu, 29 Sep 2016 16:16:01 +0000 (09:16 -0700)]
Replace log/log.h with android/log.h

Actually, remove reference, android logging is not used here.

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I37731dc37f61c129f3440e5d9ff1d0e71fe193d0

7 years agoFix bad GATT client state machine state after successfull cache load
Jakub Pawlowski [Mon, 3 Oct 2016 20:25:01 +0000 (13:25 -0700)]
Fix bad GATT client state machine state after successfull cache load

If the GATT service cache was successfully loaded from a file, the
state must be reset to idle.

Bug: 31175159
Change-Id: I92ebf1bec9d2e7467d7412b41923614ec5a13b6d

7 years agoFix bad GATT client state machine state after successfull cache load
Jakub Pawlowski [Mon, 3 Oct 2016 20:25:01 +0000 (13:25 -0700)]
Fix bad GATT client state machine state after successfull cache load

If the GATT service cache was successfully loaded from a file, the
state must be reset to idle.

Bug: 31175159
Change-Id: I92ebf1bec9d2e7467d7412b41923614ec5a13b6d

7 years agotest_vendor: Refactor scheduling of dual_mode_controller event handling am: 3c4f59fc2...
Jorge E. Moreira [Mon, 3 Oct 2016 17:43:16 +0000 (17:43 +0000)]
test_vendor: Refactor scheduling of dual_mode_controller event handling am: 3c4f59fc27 am: 81f2249e94 am: f8626b0721
am: 13ff85fd90

Change-Id: If35e6439bb01d8586910556d195ddf1827a88f24

7 years agotest_vendor: Refactor scheduling of dual_mode_controller event handling am: 3c4f59fc2...
Jorge E. Moreira [Mon, 3 Oct 2016 17:37:49 +0000 (17:37 +0000)]
test_vendor: Refactor scheduling of dual_mode_controller event handling am: 3c4f59fc27 am: 81f2249e94
am: f8626b0721

Change-Id: I8bf88152127337435a7fa5330be45c610f30f65b

7 years agotest_vendor: Refactor scheduling of dual_mode_controller event handling am: 3c4f59fc27
Jorge E. Moreira [Mon, 3 Oct 2016 17:31:45 +0000 (17:31 +0000)]
test_vendor: Refactor scheduling of dual_mode_controller event handling am: 3c4f59fc27
am: 81f2249e94

Change-Id: I9e6660f68a78f200d00ccc8f895b59599901138a

7 years agotest_vendor: Refactor scheduling of dual_mode_controller event handling
Jorge E. Moreira [Mon, 3 Oct 2016 17:28:07 +0000 (17:28 +0000)]
test_vendor: Refactor scheduling of dual_mode_controller event handling
am: 3c4f59fc27

Change-Id: Ia9a9860a9744580349921a5d9cb0ad9771bdefaf

7 years agoRemove redundant logic from system/bt/bta am: e143d941d2 am: b9554aed8a am: 1a8056a222
Jack He [Sat, 1 Oct 2016 00:31:20 +0000 (00:31 +0000)]
Remove redundant logic from system/bt/bta am: e143d941d2 am: b9554aed8a am: 1a8056a222
am: 7e5163101a

Change-Id: I9a1a1a901d9efc6cdd4eb2f66ccbfaa82523ee4e

7 years agotest_vendor: Refactor scheduling of dual_mode_controller event handling
Jorge E. Moreira [Fri, 16 Sep 2016 23:50:41 +0000 (16:50 -0700)]
test_vendor: Refactor scheduling of dual_mode_controller event handling

Moved all controller actions out of read callbacks to task callbacks to
avoid race conditions when modifying internal controller state.

Change-Id: Ie8bb762992755db2dddb6b7bb6a4fe52ab2d0020