OSDN Git Service

android-x86/system-bt.git
6 years agoMerge "Fix net_test_bluetooth"
Jack He [Mon, 16 Oct 2017 17:41:47 +0000 (17:41 +0000)]
Merge "Fix net_test_bluetooth"
am: 0bb0d1bf9a

Change-Id: I3df7b32664b350737f3d8e701fe60030726f3997

6 years agoMerge "Fix net_test_bluetooth"
Treehugger Robot [Mon, 16 Oct 2017 17:36:50 +0000 (17:36 +0000)]
Merge "Fix net_test_bluetooth"

6 years agoRemove casts in bta/ and stack/btm
Myles Watson [Sun, 15 Oct 2017 03:05:25 +0000 (03:05 +0000)]
Remove casts in bta/ and stack/btm
am: 6ef9190de8

Change-Id: I3a4c3267633075fbc717c1d3fa840e1d20a0d0ef

6 years agoMerge "bta_gattc_cache: prepare for type unification"
Jakub Pawlowski [Sun, 15 Oct 2017 03:04:56 +0000 (03:04 +0000)]
Merge "bta_gattc_cache: prepare for type unification"
am: 0b11ecc18c

Change-Id: I81f83051b1ea7149f01e9d01d7811b0192bbf01b

6 years agoMerge "bta: Remove unsafe casts in BTA_AG"
Myles Watson [Sun, 15 Oct 2017 03:04:32 +0000 (03:04 +0000)]
Merge "bta: Remove unsafe casts in BTA_AG"
am: 277603d1d0

Change-Id: Ie99a2fb85b4d8b4cce71face045b352c38212c9e

6 years agoMerge "stack: Remove casts and spell local_keys correctly"
Myles Watson [Sun, 15 Oct 2017 03:04:07 +0000 (03:04 +0000)]
Merge "stack: Remove casts and spell local_keys correctly"
am: 89262fa363

Change-Id: Ib24ddce72ea155668657613c2d8b549ca500537e

6 years agoMerge "btif: Use key types to avoid casting"
Myles Watson [Sun, 15 Oct 2017 03:03:42 +0000 (03:03 +0000)]
Merge "btif: Use key types to avoid casting"
am: 38785040a6

Change-Id: I61285ad8566ed47a925455fa385aa53f251f2166

6 years agoMinor style fixes in bta_gattc_act.cc
Jakub Pawlowski [Sun, 15 Oct 2017 03:03:11 +0000 (03:03 +0000)]
Minor style fixes in bta_gattc_act.cc
am: a664b44ffc

Change-Id: Ic566905effa292e66526adb49311657cf5c193d2

6 years agogatt_utils minor style fixes
Jakub Pawlowski [Sun, 15 Oct 2017 03:02:47 +0000 (03:02 +0000)]
gatt_utils minor style fixes
am: d66c5718a1

Change-Id: I038e240e85e1946d2109fcfa6a37cfb6d43ca484

6 years agogatt_act_discovery indentation fix
Jakub Pawlowski [Sun, 15 Oct 2017 03:02:25 +0000 (03:02 +0000)]
gatt_act_discovery indentation fix
am: e71e88575f

Change-Id: Ia4aa97fea8b7d675965b8f550f7a586ad9039051

6 years agoBTA GATT cache cleanup bta_gattc_discover_pri_service
Jakub Pawlowski [Sun, 15 Oct 2017 03:02:02 +0000 (03:02 +0000)]
BTA GATT cache cleanup bta_gattc_discover_pri_service
am: 48e0c8d8a6

Change-Id: I9bc6b12d3324aa2480148b4da92ad6be67abda33

6 years agoFix crash in l2cble_start_conn_update
Jakub Pawlowski [Sun, 15 Oct 2017 03:01:28 +0000 (03:01 +0000)]
Fix crash in l2cble_start_conn_update
am: 5e8d54e6c2

Change-Id: I3cb790ca2b7115278064976c47a857acd6657efe

6 years agoHID: Refactor bta_dm_pm_ssr to be more readable
Jack He [Sun, 15 Oct 2017 03:01:05 +0000 (03:01 +0000)]
HID: Refactor bta_dm_pm_ssr to be more readable
am: c15cc24fe3

Change-Id: I1fcd9a81ab5f4bf9c26882bd7cf0f69542041c85

6 years agoBTA GATT cache cleanup bta_gattc_srvc_in_list
Jakub Pawlowski [Sun, 15 Oct 2017 03:00:25 +0000 (03:00 +0000)]
BTA GATT cache cleanup bta_gattc_srvc_in_list
am: 9de0b5cb0a

Change-Id: Idcd4da23732b6e25925b664eb74c7dd1e836f760

6 years agoBTA GATT cache cleanup add_*_to_list
Jakub Pawlowski [Sun, 15 Oct 2017 03:00:13 +0000 (03:00 +0000)]
BTA GATT cache cleanup add_*_to_list
am: 0c3eaab266

Change-Id: I18c2579bbc19afb0b8b5f4777eb81e8d40ff90f3

6 years agoBTA GATT cache cleanup bta_gattc_disc_res_cback
Jakub Pawlowski [Sun, 15 Oct 2017 02:59:05 +0000 (02:59 +0000)]
BTA GATT cache cleanup bta_gattc_disc_res_cback
am: e6389005a7

Change-Id: Ic7ab119635ad39b10aa93ac88a5fb588b60dc590

6 years agoRemove casts in bta/ and stack/btm
Myles Watson [Tue, 3 Oct 2017 19:35:59 +0000 (12:35 -0700)]
Remove casts in bta/ and stack/btm

Make pointers to const structs const pointers.
Pass complete unions instead of casting smaller objects.

Test: build
Change-Id: I7d6b61183554be70ac7f58f4133a76ec68e35408

6 years agoFix net_test_bluetooth
Jack He [Sat, 14 Oct 2017 01:23:05 +0000 (18:23 -0700)]
Fix net_test_bluetooth

* net_test_bluetooth should try to load Bluetooth library from
  system/lib/hw or system/lib64/hw if it cannot find it from default
  path
* Also replaced legacy logging macro with libbase logging statements

Bug: 67059247
Test: net_test_bluetooth
Change-Id: I6c45f66aedf675397f377ca56203bec9708324e1

6 years agoMerge "bta_gattc_cache: prepare for type unification"
Treehugger Robot [Sat, 14 Oct 2017 00:31:31 +0000 (00:31 +0000)]
Merge "bta_gattc_cache: prepare for type unification"

6 years agoMerge "bta: Remove unsafe casts in BTA_AG"
Treehugger Robot [Sat, 14 Oct 2017 00:04:25 +0000 (00:04 +0000)]
Merge "bta: Remove unsafe casts in BTA_AG"

6 years agoMerge "stack: Remove casts and spell local_keys correctly"
Treehugger Robot [Sat, 14 Oct 2017 00:00:22 +0000 (00:00 +0000)]
Merge "stack: Remove casts and spell local_keys correctly"

6 years agoMerge "btif: Use key types to avoid casting"
Treehugger Robot [Fri, 13 Oct 2017 23:54:34 +0000 (23:54 +0000)]
Merge "btif: Use key types to avoid casting"

6 years agobta_gattc_cache: prepare for type unification
Jakub Pawlowski [Fri, 13 Oct 2017 22:49:07 +0000 (15:49 -0700)]
bta_gattc_cache: prepare for type unification

Bug: 67057055
Test: compilation
Change-Id: I46eb07a8f118b61551b3adc404ec306ad6a14b9c

6 years agostack: Remove casts and spell local_keys correctly
Myles Watson [Tue, 3 Oct 2017 22:55:15 +0000 (15:55 -0700)]
stack: Remove casts and spell local_keys correctly

Test: build
Change-Id: Ide6ec9528e1f8efca9850eab53aa2bdb88ba363d

6 years agobtif: Use key types to avoid casting
Myles Watson [Tue, 3 Oct 2017 21:05:47 +0000 (14:05 -0700)]
btif: Use key types to avoid casting

Test: build
Change-Id: If816c480219552dc8833b094a6228817883b774d

6 years agobta: Remove unsafe casts in BTA_AG
Myles Watson [Mon, 2 Oct 2017 20:33:04 +0000 (13:33 -0700)]
bta: Remove unsafe casts in BTA_AG

Test: build
Change-Id: I19659173498972f838ccc59dcac00e0f26417340

6 years agoMinor style fixes in bta_gattc_act.cc
Jakub Pawlowski [Thu, 12 Oct 2017 05:54:47 +0000 (22:54 -0700)]
Minor style fixes in bta_gattc_act.cc

Bug: 67057055
Test: compilation test
Change-Id: I862f2da834cf6f5a024ee7321229c337980f3638

6 years agogatt_utils minor style fixes
Jakub Pawlowski [Fri, 13 Oct 2017 18:04:34 +0000 (11:04 -0700)]
gatt_utils minor style fixes

Test: compilation
Change-Id: I76f3f26b5140b7b60508756b1e841b09aeeb5e7d

6 years agogatt_act_discovery indentation fix
Jakub Pawlowski [Fri, 13 Oct 2017 17:23:02 +0000 (10:23 -0700)]
gatt_act_discovery indentation fix

Bug: 67057055
Test: compilation test
Change-Id: I22640f47b5faf6e1d8718dec003b3cc83b51c514

6 years agoBTA GATT cache cleanup bta_gattc_discover_pri_service
Jakub Pawlowski [Fri, 13 Oct 2017 17:01:24 +0000 (10:01 -0700)]
BTA GATT cache cleanup bta_gattc_discover_pri_service

Bug: 67057055
Test: compilation test
Change-Id: I23464a61282d60400ae36debc820c66a4f1a1e1a

6 years agoFix crash in l2cble_start_conn_update
Jakub Pawlowski [Fri, 13 Oct 2017 16:51:06 +0000 (09:51 -0700)]
Fix crash in l2cble_start_conn_update

Bug: 67774334
Test: compilation
Change-Id: I42ec986c6c5f3fe81f507596bf1df05dcf3ec0ba

6 years agoHID: Refactor bta_dm_pm_ssr to be more readable
Jack He [Fri, 6 Oct 2017 00:54:49 +0000 (17:54 -0700)]
HID: Refactor bta_dm_pm_ssr to be more readable

* Reuse values obtained from tables
* Continue early when Bluetooth addresses do not match, so that the
  rest of the method can save some indentation

Test: make, HID host test
Change-Id: I7b2d4ec35a167c93da25a112e73c8d37531714a5

6 years agoBTA GATT cache cleanup bta_gattc_srvc_in_list
Jakub Pawlowski [Thu, 12 Oct 2017 22:00:35 +0000 (15:00 -0700)]
BTA GATT cache cleanup bta_gattc_srvc_in_list

Bug: 67057055
Test: compilation test
Change-Id: I22e752c1d270128ff0ae4f633d4f3eccf4cb725e

6 years agoBTA GATT cache cleanup add_*_to_list
Jakub Pawlowski [Thu, 12 Oct 2017 21:42:11 +0000 (14:42 -0700)]
BTA GATT cache cleanup add_*_to_list

Bug: 67057055
Test: compilation test
Change-Id: If70cfc4c024434ffe77e53410b5de8f70af6b33e

6 years agoBTA GATT cache cleanup bta_gattc_disc_res_cback
Jakub Pawlowski [Thu, 12 Oct 2017 18:18:03 +0000 (11:18 -0700)]
BTA GATT cache cleanup bta_gattc_disc_res_cback

Bug: 67057055
Test: compilation test
Change-Id: Iccfffe5de654070058ce3f4af3f48fa0975b7cf3

6 years agomake Uuid::kBase into local constexpr
Jakub Pawlowski [Thu, 12 Oct 2017 23:02:35 +0000 (23:02 +0000)]
make Uuid::kBase into local constexpr
am: bf1ddfc833

Change-Id: I96ae73d0248a723f4015200ff06d74924b6d11c1

6 years agomake Uuid::kBase into local constexpr
Jakub Pawlowski [Thu, 12 Oct 2017 20:29:04 +0000 (13:29 -0700)]
make Uuid::kBase into local constexpr

This fixes a bug where From128BitBE is used before kBase is initialized

Bug: 67671467
Test: Share a picture using Bluetooth
Change-Id: Ifb5b5f90dbca9646f117b9ff5d01439407424597

6 years agoBTA GATT cache cleanup
Jakub Pawlowski [Thu, 12 Oct 2017 20:19:14 +0000 (20:19 +0000)]
BTA GATT cache cleanup
am: 98c0494449

Change-Id: Id5ce319c71b20b1ea5dab99eaa7d204016203ed7

6 years agoBTA GATT cache cleanup
Jakub Pawlowski [Wed, 11 Oct 2017 21:55:15 +0000 (14:55 -0700)]
BTA GATT cache cleanup

This patch splits bta_gattc_add_attr_to_cache into two functions:
bta_gattc_add_descr_to_cache and bta_gattc_add_incl_srvc_to_cache

Bug: 67057055
Test: compilation test
Change-Id: I92702495e8631197e56c2cb0ab126b59cf7e90e4

6 years agoFix logs in btif_hh
Hansong Zhang [Thu, 12 Oct 2017 05:56:42 +0000 (05:56 +0000)]
Fix logs in btif_hh
am: 87279415b9

Change-Id: I86a707fbc2cc6ca7b104e7888a08d0a9cb8a1bc7

6 years agoFix logs in btif_hh
Hansong Zhang [Wed, 11 Oct 2017 23:43:53 +0000 (16:43 -0700)]
Fix logs in btif_hh

Fixed two logs which are incosistent with the actual error

Test: not needed.
Change-Id: I8937797148c8c71ef91f9fba5799192bf52692d8

6 years agoUse LOG() macros in BTA GATT logging
Jakub Pawlowski [Wed, 11 Oct 2017 03:37:32 +0000 (03:37 +0000)]
Use LOG() macros in BTA GATT logging
am: 2647452211

Change-Id: Ie27ddfa6eb686ca5b5c8aad8691f01b82e891711

6 years agoUse LOG() macros in BTA GATT logging
Jakub Pawlowski [Wed, 4 Oct 2017 19:22:10 +0000 (12:22 -0700)]
Use LOG() macros in BTA GATT logging

Test: compilation test
Change-Id: If7676af5bf915df57ab6e876d2f27500ebf5c07d

6 years agoMerge "Linux: silence gnu-variable-sized-type-not-at-end warnings"
Jakub Pawlowski [Tue, 10 Oct 2017 19:55:59 +0000 (19:55 +0000)]
Merge "Linux: silence gnu-variable-sized-type-not-at-end warnings"
am: a6244c79c5

Change-Id: Ieb61bef5ebcb170d1c2d8d0e92e65f32b6c654b5

6 years agoMerge "Linux: silence gnu-variable-sized-type-not-at-end warnings"
Treehugger Robot [Tue, 10 Oct 2017 19:48:35 +0000 (19:48 +0000)]
Merge "Linux: silence gnu-variable-sized-type-not-at-end warnings"

6 years agoMerge "HCI: Restart 5 seconds after an HCI timeout"
Myles Watson [Tue, 10 Oct 2017 18:46:21 +0000 (18:46 +0000)]
Merge "HCI: Restart 5 seconds after an HCI timeout"
am: 6320a4b859

Change-Id: Iea13b72de3fdf0d02a7cba4052cb7e8baa8e0d4f

6 years agoMerge "HCI: Restart 5 seconds after an HCI timeout"
Treehugger Robot [Tue, 10 Oct 2017 18:33:10 +0000 (18:33 +0000)]
Merge "HCI: Restart 5 seconds after an HCI timeout"

6 years agoLinux: silence gnu-variable-sized-type-not-at-end warnings
Jakub Pawlowski [Tue, 10 Oct 2017 17:12:30 +0000 (10:12 -0700)]
Linux: silence gnu-variable-sized-type-not-at-end warnings

Test: compile on linux using ninja
Change-Id: If3fed35017e4aa8cfc2740b49eb4ff547b4e7e5f

6 years agoChange DI record default company ID to Google
Andre Eisenbach [Tue, 10 Oct 2017 12:34:32 +0000 (12:34 +0000)]
Change DI record default company ID to Google
am: 484d8e4f66

Change-Id: I02a44ccd7900c718f55603cff616165385ec8dd7

6 years agoChange DI record default company ID to Google
Andre Eisenbach [Tue, 10 Oct 2017 10:29:49 +0000 (03:29 -0700)]
Change DI record default company ID to Google

Test: manual
Change-Id: I181e9716dc2c9e48272dcc7f1a00841b4ed5c8dc

6 years agoLinux build fix - include what you use
Jakub Pawlowski [Tue, 10 Oct 2017 06:14:49 +0000 (06:14 +0000)]
Linux build fix - include what you use
am: 7a7e8e963c

Change-Id: I58a6c891729c6ee5746dee249e39094e7540bc09

6 years agoLinux build fix - include what you use
Jakub Pawlowski [Tue, 10 Oct 2017 03:53:39 +0000 (20:53 -0700)]
Linux build fix - include what you use

sys/uio.h should be included for writev

Change-Id: I1f66391d15109366356af09c825afa1216fbbf34

6 years agoFix linking error during stack startup
Jakub Pawlowski [Tue, 10 Oct 2017 03:53:51 +0000 (03:53 +0000)]
Fix linking error during stack startup
am: 6ea3e1418b

Change-Id: I8eb43d9919f70970627a22f10d1af6b5950859e8

6 years agoFix linking error during stack startup
Jakub Pawlowski [Mon, 9 Oct 2017 22:13:38 +0000 (15:13 -0700)]
Fix linking error during stack startup

Change-Id: I0ac207eada1ddf2181a4c2826ede74310ce119d1

6 years agoManually convert to unary where coccinelle could not
Myles Watson [Mon, 9 Oct 2017 19:55:28 +0000 (19:55 +0000)]
Manually convert to unary where coccinelle could not
am: 5d5fcf26d9

Change-Id: Id59052d157cd09b5cf46298261a810c43e7f7fb7

6 years agoUse unary operator instead of == bool
Myles Watson [Mon, 9 Oct 2017 19:55:02 +0000 (19:55 +0000)]
Use unary operator instead of == bool
am: b749ebde2c

Change-Id: I61a1434e9fc7f86630b514aba6e0540937a1aa4c

6 years agoManually convert to unary where coccinelle could not
Myles Watson [Fri, 6 Oct 2017 23:51:21 +0000 (16:51 -0700)]
Manually convert to unary where coccinelle could not

Test: build
Change-Id: I7b5ea758b94bf225e8776f64256d644c3e96b198

6 years agoUse unary operator instead of == bool
Myles Watson [Fri, 6 Oct 2017 23:39:05 +0000 (16:39 -0700)]
Use unary operator instead of == bool

Automatically generated with coccinelle:

@@
expression e1;
@@

-e1 == false
+!e1

@@
expression e1;
@@

-false == e1
+!e1

@@
expression e1;
@@

-e1 == true
+e1

@@
expression e1;
@@

-true == e1
+e1

Test: build
Change-Id: Ic7df0dc43b550594855e457466b6bccd8f3443a3

6 years agoMerge "Remove the build team from OWNERS in system/bt"
Myles Watson [Fri, 6 Oct 2017 21:47:58 +0000 (21:47 +0000)]
Merge "Remove the build team from OWNERS in system/bt"
am: 9eb8abb9f8

Change-Id: Ibe8aa4f45105100087d3264596ef4ced4e6a96fc

6 years agoMerge "Remove the build team from OWNERS in system/bt"
Treehugger Robot [Fri, 6 Oct 2017 21:40:34 +0000 (21:40 +0000)]
Merge "Remove the build team from OWNERS in system/bt"

6 years agoMerge "Remove -Wno-typedef-redefinition"
Myles Watson [Fri, 6 Oct 2017 20:39:05 +0000 (20:39 +0000)]
Merge "Remove -Wno-typedef-redefinition"
am: 17927cfa5e

Change-Id: I3e722cfa3d85d87c0dee9cd27b0801cf22acbda9

6 years agoMerge "Remove -Wno-typedef-redefinition"
Treehugger Robot [Fri, 6 Oct 2017 20:27:29 +0000 (20:27 +0000)]
Merge "Remove -Wno-typedef-redefinition"

6 years agoHCI: Restart 5 seconds after an HCI timeout
Myles Watson [Fri, 6 Oct 2017 18:22:51 +0000 (11:22 -0700)]
HCI: Restart 5 seconds after an HCI timeout

Bug: 67209266
Test: build
Change-Id: I69a4a17382742327268a80dbc5c5be49059ecb3c

6 years agoRemove the build team from OWNERS in system/bt
Myles Watson [Thu, 5 Oct 2017 23:21:51 +0000 (16:21 -0700)]
Remove the build team from OWNERS in system/bt

Test: build
Change-Id: I17f1fa9c0b5cdf4dc871c54f5731371f6828255c

6 years agoUse -Werror in system/bt/vendor_libs/linux/interface/
Chih-Hung Hsieh [Fri, 6 Oct 2017 01:21:25 +0000 (01:21 +0000)]
Use -Werror in system/bt/vendor_libs/linux/interface/
am: ad01e9a992

Change-Id: Id6411c4c3f5929b47103f3c2550b4a13d5ca9b42

6 years agoRemove -Wno-typedef-redefinition
Myles Watson [Thu, 5 Oct 2017 23:38:11 +0000 (16:38 -0700)]
Remove -Wno-typedef-redefinition

Test: build
Change-Id: I42cc5ad8f77061bdce8906f7e454c8120f4e71b2

6 years agoUse -Werror in system/bt/vendor_libs/linux/interface/
Chih-Hung Hsieh [Mon, 2 Oct 2017 22:48:17 +0000 (15:48 -0700)]
Use -Werror in system/bt/vendor_libs/linux/interface/

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I2eca0a5fff52c83a86b060fd274c5a4cd1c53664

6 years agoMerge "Decrese the default verbosity for A2DP codec info logs"
Pavlin Radoslavov [Thu, 5 Oct 2017 01:59:52 +0000 (01:59 +0000)]
Merge "Decrese the default verbosity for A2DP codec info logs"
am: c25f957c7f

Change-Id: I4d2956a8f87088e52968a48e06a92fa1dde1dbb9

6 years agoMerge "Decrese the default verbosity for A2DP codec info logs"
Treehugger Robot [Thu, 5 Oct 2017 01:51:14 +0000 (01:51 +0000)]
Merge "Decrese the default verbosity for A2DP codec info logs"

6 years agoMerge "Added extra A2DP logging when there is an error"
Pavlin Radoslavov [Thu, 5 Oct 2017 01:46:04 +0000 (01:46 +0000)]
Merge "Added extra A2DP logging when there is an error"
am: 81e9b33cdf

Change-Id: Ibee8229736a8d50aeb79a5e39a33ea7339c85692

6 years agoMerge "Added extra A2DP logging when there is an error"
Treehugger Robot [Thu, 5 Oct 2017 01:39:45 +0000 (01:39 +0000)]
Merge "Added extra A2DP logging when there is an error"

6 years agoMerge "Fix net_test_bluetooth"
Jakub Pawlowski [Thu, 5 Oct 2017 01:32:23 +0000 (01:32 +0000)]
Merge "Fix net_test_bluetooth"
am: 936980bf40

Change-Id: I1e95b2748fc9fc589e6c82636f5d2fb5597f57f3

6 years agoMerge "Fix net_test_bluetooth"
Treehugger Robot [Thu, 5 Oct 2017 01:25:42 +0000 (01:25 +0000)]
Merge "Fix net_test_bluetooth"

6 years agoDecrese the default verbosity for A2DP codec info logs
Pavlin Radoslavov [Wed, 4 Oct 2017 18:26:04 +0000 (11:26 -0700)]
Decrese the default verbosity for A2DP codec info logs

Bug: 64159791
Test: Manual
Change-Id: Ida10f5d2aa6643df136a41891d7775e175c06570
(cherry picked from commit b4ae75f4524fd5bf55d015f860f1deaee0d81f43)

6 years agoAdded extra A2DP logging when there is an error
Pavlin Radoslavov [Wed, 4 Oct 2017 12:36:25 +0000 (05:36 -0700)]
Added extra A2DP logging when there is an error

Bug: 64159791
Test: Manual
Change-Id: Ic1001892b7abc9784a21a183d141df51b1b92fc0
(cherry picked from commit 6c6d2f6a14847ee75c72b1366449c45ab66feb00)

6 years agobtm: Return the result in btm_pm_compare_modes
Myles Watson [Wed, 4 Oct 2017 23:47:00 +0000 (23:47 +0000)]
btm: Return the result in btm_pm_compare_modes
am: 13538385f4

Change-Id: I0c2aee751cb58c9e89ded941b7359ddd9f4a38cb

6 years agoFix net_test_bluetooth
Jakub Pawlowski [Wed, 4 Oct 2017 23:01:26 +0000 (16:01 -0700)]
Fix net_test_bluetooth

Test: net_test_bluetooth
Change-Id: I8c84f0db3ce0e4f6efbd6d7d3cdc794be8fb7faa

6 years agobtm: Return the result in btm_pm_compare_modes
Myles Watson [Tue, 3 Oct 2017 23:51:30 +0000 (16:51 -0700)]
btm: Return the result in btm_pm_compare_modes

Test: build
Bug: 67383347
Change-Id: Id4407c1a73592674f0d86b1be1152abc088908b5

6 years agoUse std::list in GATT related code
Jakub Pawlowski [Wed, 4 Oct 2017 18:33:04 +0000 (18:33 +0000)]
Use std::list in GATT related code
am: d9ca4100b8

Change-Id: Ic62a1be3f450695bfaa649c6f39f451c9907102f

6 years agoUse std::list in GATT related code
Jakub Pawlowski [Sat, 9 Sep 2017 19:50:38 +0000 (12:50 -0700)]
Use std::list in GATT related code

Bug: 67057055
Test: sl4a Gatt* tests
Change-Id: I8201ebdad5ba4c3d5d0a2fd3d0fe9dc900b51d60

6 years agoMerge "Run clang format on files touched by CL 488398"
Myles Watson [Wed, 4 Oct 2017 17:38:53 +0000 (17:38 +0000)]
Merge "Run clang format on files touched by CL 488398"
am: 3494410e02

Change-Id: Id4fe99fb0e84b2b5a80401c73ebc704fd4c6cb10

6 years agoA2DP: Advance btif profile queue on OPENING->other_state transition
Jack He [Wed, 4 Oct 2017 17:37:39 +0000 (17:37 +0000)]
A2DP: Advance btif profile queue on OPENING->other_state transition
am: a362647758

Change-Id: I322c3ef42b38106a7cb1206b7e1c02dac79c3aa5

6 years agoHandle Disconnect request in AV Opening State handler
c_sdamga [Wed, 4 Oct 2017 17:36:25 +0000 (17:36 +0000)]
Handle Disconnect request in AV Opening State handler
am: ff1b9d26ca

Change-Id: I508456cc74a52b61ca0aadcde5d39588fcebb861

6 years agoMerge "Run clang format on files touched by CL 488398"
Treehugger Robot [Wed, 4 Oct 2017 17:22:17 +0000 (17:22 +0000)]
Merge "Run clang format on files touched by CL 488398"

6 years agoA2DP: Advance btif profile queue on OPENING->other_state transition
Jack He [Mon, 2 Oct 2017 21:07:33 +0000 (14:07 -0700)]
A2DP: Advance btif profile queue on OPENING->other_state transition

* Entering BTIF_AV_STATE_OPENING is only possible through
  BTIF_AV_CONNECT_REQ_EVT (initiated by us) OR
  BTA_AV_PENDING_EVT (initiated by remote)
  from BTIF_AV_STATE_IDLE
* If we go from BTIF_AV_CONNECT_REQ_EVT, we must have a pending
  connection request in btif_profile_queue that should be advanced when
  we quit BTIF_AV_STATE_OPENING state
* This CL adds a flag to indicate whether an AV connection is initiated
  by us and only advance queue when it is
* Also add queue advancement in BTA_AV_REJECT_EVT and BTA_AV_CLOSE_EVT

Bug: 67317954
Test: make
Change-Id: I16dc8ebf76c6edaacb1f7a4a44e604170ff9a8b0

6 years agoHandle Disconnect request in AV Opening State handler
c_sdamga [Mon, 20 Jul 2015 13:47:04 +0000 (19:17 +0530)]
Handle Disconnect request in AV Opening State handler

Usecase:
1. Uncheck media from settings UI
2. initiate A2dp connection from remote, send AVRCP play from remote

Failure:
A2dp connection stuck in opening state.

Rootcause:
When A2dp is unchecked from settings UI and remote initiated
a2dp connection and AVRCP play, music starts streaming on DUT
since A2dp connection disconnected. As A2dp connection was not
completed, btif state stuck in opening state.

Fix:
Handled the disconnection request in the opening state
so that AV state machine moves to proper state before
processing AVRCP Play.

Test: 1. Uncheck media from settings UI
2. initiate A2dp connection from remote, send AVRCP play

Bug: 35415160
Change-Id: If1cda5b78100419fdc60c97349efafdd4a18d40c

6 years agoRun clang format on files touched by CL 488398
Myles Watson [Tue, 19 Sep 2017 17:01:28 +0000 (10:01 -0700)]
Run clang format on files touched by CL 488398

https://android-review.googlesource.com/#/c/488398/

Test: build
Change-Id: Iefbd5b632087be00a12b1a0c851f9e3f3b514532

6 years agoFix adv instance validity check during suspend and resume of resolving list
Subramanian Srinivasan [Tue, 3 Oct 2017 19:31:12 +0000 (19:31 +0000)]
Fix adv instance validity check during suspend and resume of resolving list
am: 2e08795a89

Change-Id: I8a0b390c60ab2ef35407931e4e6baf56cddcfd69

6 years agoFix adv instance validity check during suspend and resume of resolving list
Subramanian Srinivasan [Fri, 29 Sep 2017 01:41:03 +0000 (18:41 -0700)]
Fix adv instance validity check during suspend and resume of resolving list

When BT is shutdown, multi advertisement instance pointer is made
null by BleAdvertisingManager::CleanUp function.
Any subsequent BleAdvertisingManager::Get function call made at
this point(eg during suspension and resumption of resolving list
activity)leads to a crash as the instance pointer is null.
Hence, use BleAdvertisingManager::IsInitialized function instead
of BleAdvertisingManager::Get function to check the validity of
multi advertisement instance.

Bug: 67325491
Change-Id: Ibbae7fa546bb52494be78eaff6d4b7b15614ab15

6 years agoAdd comments to function arrays to indicate usage
Stanley Tng [Tue, 3 Oct 2017 16:54:52 +0000 (16:54 +0000)]
Add comments to function arrays to indicate usage
am: 5af6abaf2e

Change-Id: Ic9672ec4fe12571004355735105a0a820f2159d4

6 years agoAdd comments to function arrays to indicate usage
Stanley Tng [Fri, 29 Sep 2017 16:01:25 +0000 (09:01 -0700)]
Add comments to function arrays to indicate usage

No logic change. More comments are added to function arrays to indicate
how each array entry are used.

Test: Manual
Change-Id: I59283cb9786da6f3a4b8a4b36e36e79a25ca6cb8

6 years agoMerge "Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]"
Dan Willemsen [Tue, 3 Oct 2017 02:54:53 +0000 (02:54 +0000)]
Merge "Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]"
am: 092fdf13ec

Change-Id: Ifbc8f21a19347ae08dfc4a04d3a7dcc9e890f3fc

6 years agoMerge "Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]"
Dan Willemsen [Tue, 3 Oct 2017 02:30:06 +0000 (02:30 +0000)]
Merge "Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]"

6 years agoMerge "HID: Free process_repage_timer to prevent leak"
Hemant Gupta [Mon, 2 Oct 2017 23:24:37 +0000 (23:24 +0000)]
Merge "HID: Free process_repage_timer to prevent leak"
am: 4a8ff03328

Change-Id: Ib962c89810306be308f9b6fc48f0404e98b6965d

6 years agoMerge "HID: Free process_repage_timer to prevent leak"
Treehugger Robot [Mon, 2 Oct 2017 23:02:56 +0000 (23:02 +0000)]
Merge "HID: Free process_repage_timer to prevent leak"

6 years agoAdd more logs for Bluetooth connection errors
Stanley Tng [Mon, 2 Oct 2017 18:34:32 +0000 (18:34 +0000)]
Add more logs for Bluetooth connection errors
am: a712d14638

Change-Id: I86ea947f8ced69263a08f4f9cdd55daf4f9fa8bf

6 years agoHID: Free process_repage_timer to prevent leak
Hemant Gupta [Wed, 13 Sep 2017 12:05:03 +0000 (17:35 +0530)]
HID: Free process_repage_timer to prevent leak

Usecase:
1) Perform BT on/off stress test
2) Check for memory leakage in code in subsequent BT on/off usecase

Expectation
No memory leak during BT on/off stress test

Observed result
Memory leakage in hid code where alarm process_repage_timer is not freed
and only cancelled

Fix:
Free alarm process_repage_timer during HID Host deregstration

Test: Checked with BT on/off usecase, and alarm process_repage_timer is now
freed in every BT on/off usecase.

Bug: 65657207
Change-Id: Iccecd126716a5660f4c37ddc917bacee84342297

6 years agoRename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]
Dan Willemsen [Mon, 2 Oct 2017 17:41:11 +0000 (10:41 -0700)]
Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]

In the future, target.linux will apply to all targets running a linux kernel
(android, linux_glibc, linux_bionic). So move all current users to the specific
linux_glibc.

There will be another cleanup pass later that will move some instances back to
target.linux if the properties should be shared with target.android and
target.linux_bionic, but target.linux needs to be removed first.

Test: out/soong/build.ninja identical before/after
Change-Id: Iadc1ba324e03fd2b1b52bf471ffa2a71e0ec3e61
Exempt-From-Owner-Approval: build system cleanup

6 years agoAdd more logs for Bluetooth connection errors
Stanley Tng [Thu, 28 Sep 2017 19:55:41 +0000 (12:55 -0700)]
Add more logs for Bluetooth connection errors

Test: manual
Change-Id: I63402ee8ffa8f57a70a9c9aaa0370d8ca599bbea

6 years agoMerge "Remove unused events handler for BLE scan clients"
Jakub Pawlowski [Fri, 29 Sep 2017 23:27:57 +0000 (23:27 +0000)]
Merge "Remove unused events handler for BLE scan clients"
am: 509e6a2c74

Change-Id: If141f51dec219c5e352c628304969376a339dfde