OSDN Git Service

android-x86/system-bt.git
7 years agobta_dm: Stop copying garbage
Martin Brabham [Mon, 12 Jun 2017 18:26:49 +0000 (18:26 +0000)]
bta_dm: Stop copying garbage
am: e92648629c  -s ours

Change-Id: I5f5f01d79ed8f16f7761e43028f5e221b1e7423d

7 years agobta_dm: Stop copying garbage
Martin Brabham [Mon, 1 May 2017 23:30:40 +0000 (16:30 -0700)]
bta_dm: Stop copying garbage

After we reach 7 ACL connections we have 7 peer device records.
Once we reach this then we lose a connection and shrink the list we
copy garbage into the last peer device record.  This can cause the flag
remove_dev_pending to be set to something > 0 thus true which causes the
stack to remove the device and its bonding information on the next
acl change event.

ACL Connections can happen from any connection (pairing, SDP, etc...)

Bug: 36598959
Test: Manual
Change-Id: Ifbaa4098edba442274ffde183960ef53169988e7
Merged-In: Ifbaa4098edba442274ffde183960ef53169988e7

7 years agoeSCO: Limit number of retries after mSBC connection failure
Jack He [Fri, 9 Jun 2017 23:30:00 +0000 (23:30 +0000)]
eSCO: Limit number of retries after mSBC connection failure
am: 12fb8883d0

Change-Id: I910b806866109a2ac70b1a9975baa908e307e67c

7 years agoeSCO: Limit number of retries after mSBC connection failure
Jack He [Wed, 7 Jun 2017 23:44:30 +0000 (16:44 -0700)]
eSCO: Limit number of retries after mSBC connection failure

* When peer device supports mSBC and codec negotiation, Fluoride stack
  will try to do the following when establishing a eSCO/SCO connection:
    1) Negotiate to mSBC by sending +BCS:2
    2) Try establishing eSCO/SCO connection using mSBC T2 settings
    3) If that failed, downgrade to mSBC T1 settings and retry
    4) If that failed, re-negotiate codec to CVSD, by sending +BCS:1
    5) Retry using CVSD S4 (HFP 1.7 and above) or S3 settings
    6) If this failed stop trying and report failure to upper stack
* Retry is achieved by:
    * Retry is only possible when inuse_codec = BTA_AG_CODEC_MSBC
    * Set codec_msbc_settings to BTA_AG_SCO_MSBC_SETTINGS_T1 when T2
       failed to connect in step 3 above
    * Set codec_fallback to true when T1 failed so that CVSD is used
       in step 4 above
* Retry stop is achieved by:
    * Set inuse_codec = BTA_AG_CODEC_CVSD
    * Set codec_msbc_settings back to BTA_AG_SCO_MSBC_SETTINGS_T2
    * Set codec_fallback to false and codec_updated to true so that
      the stack is ready for the next application triggerred SCO
      connection attempt
* Removed retry_with_sco_only as both Setup Synchronous Connection
  Command (0x0028) and Enhanced Setup Synchronous Connection Command
  (0x003D) fall back to SCO connection if eSCO is not supported.
  See page 858/2772 and 895/2772 of BT4.2 specification document
* Besides both code paths are the same for retry_with_sco_only after
  eSCO changes went in

Bug: 62426841
Test: make, HFP regression, testplans/91406
Change-Id: I205311c55e8763c48b6eb43c27f242927384036e
(cherry picked from commit e82e56bb2a1e5565b73333b60dc6b30936f52e80)

7 years agoIgnore the Class Of Device if the value is invalid
Pavlin Radoslavov [Fri, 9 Jun 2017 02:10:13 +0000 (02:10 +0000)]
Ignore the Class Of Device if the value is invalid
am: 7fe86917d7

Change-Id: I9d35ec3793ed61e10f11a500af868ebda682764b

7 years agoIgnore the Class Of Device if the value is invalid
Pavlin Radoslavov [Thu, 8 Jun 2017 22:22:52 +0000 (15:22 -0700)]
Ignore the Class Of Device if the value is invalid

If a Bluetooth Device is dual-mode and is discoverable as both
a Classic and a LE device, ignore unknown "zero" values
triggered by the LE advertisements. Otherwise, those could overwrite
a valid (previously discovered) Class Of Device.

Bug: 37615863
Test: Manual with LG HBS1100 headset
Change-Id: I5a0f6ef56248b41d973b850a5542475e45e0312d
(cherry picked from commit a052757882927c042399d614bc298f9704ce07a3)

7 years agoFix GATT over BREDR not connecting
Jakub Pawlowski [Thu, 8 Jun 2017 17:59:34 +0000 (17:59 +0000)]
Fix GATT over BREDR not connecting
am: e0035727e3

Change-Id: I97ece2b97b1000bb9104757680e03063ee04c432

7 years agoFix GATT over BREDR not connecting
Jakub Pawlowski [Wed, 7 Jun 2017 18:26:36 +0000 (11:26 -0700)]
Fix GATT over BREDR not connecting

For BREDR connections, the upper stack always sends the request with
transport type DUMO, and this should be treated as BREDR if the device
is not known as LE only.

Bug: 62387078
Test: pts GattOverBrEdrTest
Change-Id: I726252e85e78bff2c9585332d2748a0d92a9f6d3

7 years agoMerge "Fix loops iteration" into oc-dr1-dev
Jakub Pawlowski [Wed, 7 Jun 2017 23:54:59 +0000 (23:54 +0000)]
Merge "Fix loops iteration" into oc-dr1-dev

7 years agoDisable 48.0kHz sampling rate for AAC
Pavlin Radoslavov [Wed, 7 Jun 2017 22:05:45 +0000 (22:05 +0000)]
Disable 48.0kHz sampling rate for AAC
am: ad73569d62

Change-Id: Ic295d9d8d09ba555372bd786b8045e309c80c390

7 years agoFix loops iteration
Jakub Pawlowski [Wed, 7 Jun 2017 16:07:26 +0000 (09:07 -0700)]
Fix loops iteration

The erase() already increment the iterator. If the loop additionally do
"it++", it will skip some elements, and might iterate over the end.

Test: compilation test
Change-Id: Ibd9c993d8e80d807f5d7bc920da36ee538477438

7 years agoDisable 48.0kHz sampling rate for AAC
Pavlin Radoslavov [Fri, 2 Jun 2017 17:45:43 +0000 (10:45 -0700)]
Disable 48.0kHz sampling rate for AAC

Some carkits have issues playing A2DP audio using AAC with 48.0kHz
sampling rate, while playing AAC with 44.1kHz sampling rate is fine.

Bug: 38443632
Bug: 62301376
Test: manual
Change-Id: I50de2db1d5386d41bfe361fbac99fc7ebbbd3640
(cherry picked from commit 3d268331ae32bd70f60984c9553db1c961073c42)

7 years agoUse std::unordered_set for keeping app_hold_link am: 3dda89880b am: f21ae6ed4f am...
Jakub Pawlowski [Wed, 7 Jun 2017 04:05:28 +0000 (04:05 +0000)]
Use std::unordered_set for keeping app_hold_link am: 3dda89880b am: f21ae6ed4f am: f13ffd521a
am: f987dd4bec

Change-Id: I2425fb1baf970e3d121e14e8294d45e2513ad47c

7 years agoUse std::unordered_set for keeping app_hold_link am: 3dda89880b am: f21ae6ed4f
Jakub Pawlowski [Wed, 7 Jun 2017 03:53:55 +0000 (03:53 +0000)]
Use std::unordered_set for keeping app_hold_link am: 3dda89880b am: f21ae6ed4f
am: f13ffd521a

Change-Id: I51e28d5202184f3dafba5d22682497f649ff326f

7 years agoUse std::unordered_set for keeping app_hold_link am: 3dda89880b
Jakub Pawlowski [Wed, 7 Jun 2017 03:45:56 +0000 (03:45 +0000)]
Use std::unordered_set for keeping app_hold_link am: 3dda89880b
am: f21ae6ed4f

Change-Id: I1d06135b7488cfe3a9f8dd7f33ef71aec4abef86

7 years agoUse std::unordered_set for keeping app_hold_link
Jakub Pawlowski [Wed, 7 Jun 2017 03:38:55 +0000 (03:38 +0000)]
Use std::unordered_set for keeping app_hold_link
am: 3dda89880b

Change-Id: I75b54eb119d655ede8331eb8105b01329a46a92e

7 years agoUse std::unordered_set for keeping app_hold_link
Jakub Pawlowski [Mon, 5 Jun 2017 22:23:32 +0000 (15:23 -0700)]
Use std::unordered_set for keeping app_hold_link

Change-Id: Ia8a0c9a2264979c1ff89faa5ddf17a83fcb7c7ce

7 years agoGet rid of clcb_idx in favour of pointers am: e4f42abab3 am: 5958c225ad am: 09273a05f4
Jakub Pawlowski [Wed, 7 Jun 2017 01:53:46 +0000 (01:53 +0000)]
Get rid of clcb_idx in favour of pointers am: e4f42abab3 am: 5958c225ad am: 09273a05f4
am: 866740dbf9

Change-Id: I721e60b6f892cee0901540be505a75be6e3d6d0b

7 years agouse std::queue for keeping tGATT_CMD_Q am: d1a9313471 am: 05bd66b651 am: 8b37d9d337
Jakub Pawlowski [Wed, 7 Jun 2017 01:53:29 +0000 (01:53 +0000)]
use std::queue for keeping tGATT_CMD_Q am: d1a9313471 am: 05bd66b651 am: 8b37d9d337
am: ad1e6a7c44

Change-Id: I0707f44414c56587e42ff41be058efc040c3e3ca

7 years agoGet rid of clcb_idx in favour of pointers am: e4f42abab3 am: 5958c225ad
Jakub Pawlowski [Wed, 7 Jun 2017 01:49:31 +0000 (01:49 +0000)]
Get rid of clcb_idx in favour of pointers am: e4f42abab3 am: 5958c225ad
am: 09273a05f4

Change-Id: I332f5503adbc01a98ebc9554be2f6102770c00e7

7 years agouse std::queue for keeping tGATT_CMD_Q am: d1a9313471 am: 05bd66b651
Jakub Pawlowski [Wed, 7 Jun 2017 01:49:13 +0000 (01:49 +0000)]
use std::queue for keeping tGATT_CMD_Q am: d1a9313471 am: 05bd66b651
am: 8b37d9d337

Change-Id: I78e802eada40f4b5c29cb74fba580fed9b1c6ce7

7 years agoGet rid of clcb_idx in favour of pointers am: e4f42abab3
Jakub Pawlowski [Wed, 7 Jun 2017 01:47:00 +0000 (01:47 +0000)]
Get rid of clcb_idx in favour of pointers am: e4f42abab3
am: 5958c225ad

Change-Id: Iad5b0a28e81f8a7eb6e332c22481ae49656e975e

7 years agouse std::queue for keeping tGATT_CMD_Q am: d1a9313471
Jakub Pawlowski [Wed, 7 Jun 2017 01:46:46 +0000 (01:46 +0000)]
use std::queue for keeping tGATT_CMD_Q am: d1a9313471
am: 05bd66b651

Change-Id: I2face2724f4c52c14769bd1c79a6783f8e4c2d47

7 years agoGet rid of clcb_idx in favour of pointers
Jakub Pawlowski [Wed, 7 Jun 2017 01:44:28 +0000 (01:44 +0000)]
Get rid of clcb_idx in favour of pointers
am: e4f42abab3

Change-Id: Ie15226cacea4121d0bb7ca9a9cec732d0170f4f1

7 years agoRefactor tGATT_BG_CONN_DEV am: 7cfd8391f6 am: 77157460ba am: 7b55503837
Jakub Pawlowski [Wed, 7 Jun 2017 01:44:16 +0000 (01:44 +0000)]
Refactor tGATT_BG_CONN_DEV am: 7cfd8391f6 am: 77157460ba am: 7b55503837
am: 3491d92903

Change-Id: I1e69aa803d3e25080cd9e485e69eefe1918de025

7 years agouse std::queue for keeping tGATT_CMD_Q
Jakub Pawlowski [Wed, 7 Jun 2017 01:44:15 +0000 (01:44 +0000)]
use std::queue for keeping tGATT_CMD_Q
am: d1a9313471

Change-Id: I2708947e05fdf3835c23874af353349b203f11e4

7 years agoRefactor tGATT_BG_CONN_DEV am: 7cfd8391f6 am: 77157460ba
Jakub Pawlowski [Wed, 7 Jun 2017 01:41:42 +0000 (01:41 +0000)]
Refactor tGATT_BG_CONN_DEV am: 7cfd8391f6 am: 77157460ba
am: 7b55503837

Change-Id: I3f1ef7c9daea0aee2769cc4386eb32b2d8c3e96f

7 years agoRefactor tGATT_BG_CONN_DEV am: 7cfd8391f6
Jakub Pawlowski [Wed, 7 Jun 2017 01:39:45 +0000 (01:39 +0000)]
Refactor tGATT_BG_CONN_DEV am: 7cfd8391f6
am: 77157460ba

Change-Id: I0d5bc72270c5d7b2cd88cb5e91ace28a07e2cc99

7 years agoGet rid of clcb_idx in favour of pointers
Jakub Pawlowski [Wed, 31 May 2017 16:44:00 +0000 (09:44 -0700)]
Get rid of clcb_idx in favour of pointers

Test: compilation test
Change-Id: Ib2c4b13b85343693e6cff4a94eed49382e3aec00

7 years agouse std::queue for keeping tGATT_CMD_Q
Jakub Pawlowski [Wed, 31 May 2017 00:19:46 +0000 (17:19 -0700)]
use std::queue for keeping tGATT_CMD_Q

Test: compilation
Change-Id: I4df9a075d27a306067c48c652f5da1fb156c4a9b

7 years agoRefactor tGATT_BG_CONN_DEV
Jakub Pawlowski [Wed, 7 Jun 2017 01:37:14 +0000 (01:37 +0000)]
Refactor tGATT_BG_CONN_DEV
am: 7cfd8391f6

Change-Id: Ie9855cd0da4a631303cb4228928587b4ee3abe99

7 years agoRefactor tGATT_BG_CONN_DEV
Jakub Pawlowski [Tue, 6 Jun 2017 17:03:07 +0000 (10:03 -0700)]
Refactor tGATT_BG_CONN_DEV

* Use list for keeping the devices instead of fixes array, get rid of
  the in_use field.
* Use unordered_set instead of array to keep gatt_if of apps interested
  in specific device.
* the in_use flag was never cleared before, this had the potential to
  fill the whole array when multiple devices were addred/removed to the
  whitelist. This issue is fixed now.

Test: compilation test
Change-Id: Id87c2ae9c5b0ce0887a4fa9be50e34d646d22a13

7 years agoMerge "Suppress false compiler warnings" am: 1e37a045a7 am: cbd6ec860d am: 2b64c1eb00
Ting-Yuan Huang [Wed, 7 Jun 2017 00:53:41 +0000 (00:53 +0000)]
Merge "Suppress false compiler warnings" am: 1e37a045a7 am: cbd6ec860d am: 2b64c1eb00
am: 544f01deaa

Change-Id: Ia48478fa59a447ab61673aac1c0a10da91172263

7 years agoMerge "Suppress false compiler warnings" am: 1e37a045a7 am: cbd6ec860d
Ting-Yuan Huang [Wed, 7 Jun 2017 00:40:09 +0000 (00:40 +0000)]
Merge "Suppress false compiler warnings" am: 1e37a045a7 am: cbd6ec860d
am: 2b64c1eb00

Change-Id: I7422a7ba773ebb1036cb8f4915b0e52e3b48f41b

7 years agoMerge "Suppress false compiler warnings" am: 1e37a045a7
Ting-Yuan Huang [Wed, 7 Jun 2017 00:38:09 +0000 (00:38 +0000)]
Merge "Suppress false compiler warnings" am: 1e37a045a7
am: cbd6ec860d

Change-Id: I0b1c8842ace8c0c0314d977a1ae7531dabaaa9ea

7 years agoMerge "Suppress false compiler warnings"
Ting-Yuan Huang [Wed, 7 Jun 2017 00:35:41 +0000 (00:35 +0000)]
Merge "Suppress false compiler warnings"
am: 1e37a045a7

Change-Id: I93f117b739af6a3ab0db85ee310186cdcea689db

7 years agoMerge "Suppress false compiler warnings"
Treehugger Robot [Wed, 7 Jun 2017 00:25:50 +0000 (00:25 +0000)]
Merge "Suppress false compiler warnings"

7 years agoLinux build fix am: 66e8571f6c am: 1f99591592 am: 1da224279c
Jakub Pawlowski [Wed, 7 Jun 2017 00:12:08 +0000 (00:12 +0000)]
Linux build fix am: 66e8571f6c am: 1f99591592 am: 1da224279c
am: a0946e07c1

Change-Id: Iaeb6426769e79ab75e090184467d5716cee263e9

7 years agoLinux build fix am: 66e8571f6c am: 1f99591592
Jakub Pawlowski [Tue, 6 Jun 2017 23:57:41 +0000 (23:57 +0000)]
Linux build fix am: 66e8571f6c am: 1f99591592
am: 1da224279c

Change-Id: Iebe58ffae32d0762a383a51ce1ae3ee175894e50

7 years agoLinux build fix am: 66e8571f6c
Jakub Pawlowski [Tue, 6 Jun 2017 23:54:08 +0000 (23:54 +0000)]
Linux build fix am: 66e8571f6c
am: 1f99591592

Change-Id: I4548a48d8ba1ce9025f75c3574b50e6ede6b8ab2

7 years agoLinux build fix
Jakub Pawlowski [Tue, 6 Jun 2017 23:52:41 +0000 (23:52 +0000)]
Linux build fix
am: 66e8571f6c

Change-Id: I351660a275f1d837c6c07f269580dbd7e11de0f9

7 years agoSuppress false compiler warnings
Ting-Yuan Huang [Tue, 9 May 2017 22:57:40 +0000 (15:57 -0700)]
Suppress false compiler warnings

In theory, static analyzer can't be 100% acurate for certain types of
analysis.

Bug: 38178471
Test: Built without seeing these warnings.
Change-Id: I63d2d02565cc040189ed70813eb42e06dd8c9f2a

7 years agoLinux build fix
Jakub Pawlowski [Tue, 6 Jun 2017 22:11:30 +0000 (15:11 -0700)]
Linux build fix

Change-Id: I2850577447a605877a8bc12f5ad852cacf4e0b3e

7 years agoGet rid of BTA_GATTC_API_REFRESH_EVT am: d7ee6f2e85 am: 96e7c2a740 am: 55418cf457
Jakub Pawlowski [Tue, 6 Jun 2017 21:53:40 +0000 (21:53 +0000)]
Get rid of BTA_GATTC_API_REFRESH_EVT am: d7ee6f2e85 am: 96e7c2a740 am: 55418cf457
am: bb1a19ce4d

Change-Id: Ie9ba9347fa624215ec5a7214527b85f1658524c0

7 years agoGet rid of trivial BTA_GATTC_ events am: 31a6bf4f11 am: 195f8c2599 am: 8984cf457f
Jakub Pawlowski [Tue, 6 Jun 2017 21:53:24 +0000 (21:53 +0000)]
Get rid of trivial BTA_GATTC_ events am: 31a6bf4f11 am: 195f8c2599 am: 8984cf457f
am: 155ae3d0de

Change-Id: I60130937330d0aace504f42eb7effe91f7dd2a07

7 years agoGet rid of BTA_GATTC_API_REFRESH_EVT am: d7ee6f2e85 am: 96e7c2a740
Jakub Pawlowski [Tue, 6 Jun 2017 21:40:14 +0000 (21:40 +0000)]
Get rid of BTA_GATTC_API_REFRESH_EVT am: d7ee6f2e85 am: 96e7c2a740
am: 55418cf457

Change-Id: I0173cb0f311c54618b60f67ca5033fde5debbb8c

7 years agoGet rid of trivial BTA_GATTC_ events am: 31a6bf4f11 am: 195f8c2599
Jakub Pawlowski [Tue, 6 Jun 2017 21:39:58 +0000 (21:39 +0000)]
Get rid of trivial BTA_GATTC_ events am: 31a6bf4f11 am: 195f8c2599
am: 8984cf457f

Change-Id: I160733d1e62357d9785c3c7f31b1a3c962ef51ad

7 years agoGet rid of BTA_GATTC_API_REFRESH_EVT am: d7ee6f2e85
Jakub Pawlowski [Tue, 6 Jun 2017 21:26:09 +0000 (21:26 +0000)]
Get rid of BTA_GATTC_API_REFRESH_EVT am: d7ee6f2e85
am: 96e7c2a740

Change-Id: I32957ad7b296c7b5d64d38698bc7edef48f2a6c5

7 years agoGet rid of trivial BTA_GATTC_ events am: 31a6bf4f11
Jakub Pawlowski [Tue, 6 Jun 2017 21:25:53 +0000 (21:25 +0000)]
Get rid of trivial BTA_GATTC_ events am: 31a6bf4f11
am: 195f8c2599

Change-Id: Ice81eee5f60a28b960dd2139d79c998bc84f43e9

7 years agoGet rid of BTA_GATTC_API_REFRESH_EVT
Jakub Pawlowski [Tue, 6 Jun 2017 21:20:58 +0000 (21:20 +0000)]
Get rid of BTA_GATTC_API_REFRESH_EVT
am: d7ee6f2e85

Change-Id: Ic9f253ab5489d133698cae3f243ccda7d78d1c62

7 years agoGet rid of trivial BTA_GATTC_ events
Jakub Pawlowski [Tue, 6 Jun 2017 21:20:43 +0000 (21:20 +0000)]
Get rid of trivial BTA_GATTC_ events
am: 31a6bf4f11

Change-Id: Id25b40895fae8722534e830f06532b62aac44d7b

7 years agoGet rid of BTA_GATTC_API_REFRESH_EVT
Jakub Pawlowski [Mon, 5 Jun 2017 19:42:45 +0000 (12:42 -0700)]
Get rid of BTA_GATTC_API_REFRESH_EVT

Test: compilation test
Change-Id: I631962183ac63d2b168005060bb1f0d4964b0884

7 years agoGet rid of trivial BTA_GATTC_ events
Jakub Pawlowski [Mon, 5 Jun 2017 19:20:04 +0000 (12:20 -0700)]
Get rid of trivial BTA_GATTC_ events

Test: compilation test
Change-Id: I8c705d1bb0532cbe0dd69b1f3b0b5d1a63534a23

7 years agoInitial DBus transport support am: 79c2ff968f am: 0c00f5664a am: 43ffbbe81f
Jakub Pawlowski [Tue, 6 Jun 2017 20:57:27 +0000 (20:57 +0000)]
Initial DBus transport support am: 79c2ff968f am: 0c00f5664a am: 43ffbbe81f
am: 51393cd234

Change-Id: I73b7d89ffc568ad0e26dbe40be792b17631246f6

7 years agoFix order of parameters to BTA_GATTC_Open am: 11410a31b1
Jakub Pawlowski [Tue, 6 Jun 2017 20:57:14 +0000 (20:57 +0000)]
Fix order of parameters to BTA_GATTC_Open am: 11410a31b1
am: 8ebf607111

Change-Id: I4dc35b81cc939eeb7a9abc5d3f9b19751dfcb5bc

7 years agoInitial DBus transport support am: 79c2ff968f am: 0c00f5664a
Jakub Pawlowski [Tue, 6 Jun 2017 20:55:46 +0000 (20:55 +0000)]
Initial DBus transport support am: 79c2ff968f am: 0c00f5664a
am: 43ffbbe81f

Change-Id: Id6150d77ca20f17ba6af59ef09b8efc8982f3250

7 years agoFix order of parameters to BTA_GATTC_Open
Jakub Pawlowski [Tue, 6 Jun 2017 20:55:19 +0000 (20:55 +0000)]
Fix order of parameters to BTA_GATTC_Open
am: 11410a31b1

Change-Id: Id66d9c2503bc391911a09884d77a4fc4ea0f0bb2

7 years agoInitial DBus transport support am: 79c2ff968f
Jakub Pawlowski [Tue, 6 Jun 2017 20:53:19 +0000 (20:53 +0000)]
Initial DBus transport support am: 79c2ff968f
am: 0c00f5664a

Change-Id: Icb9097f15cb87a5e864ad38fd2285161f57ae65d

7 years agoInitial DBus transport support
Jakub Pawlowski [Tue, 6 Jun 2017 20:51:19 +0000 (20:51 +0000)]
Initial DBus transport support
am: 79c2ff968f

Change-Id: If2e1458120b318d983acbc50cf5f9653e17f03f5

7 years agoInitial DBus transport support
Jakub Pawlowski [Mon, 31 Oct 2016 19:56:12 +0000 (12:56 -0700)]
Initial DBus transport support

This patch adds initial support for DBus transport on Linux. It exposes
initial implementation of Adapter that can be Enabled and Disabled. One
can also introspect the interface to find the exposed methods. Further
patches will extend it's functionality.

Test: ninja -C out/Default -j 40
Change-Id: I173cc752b8d8aaa8706ed36f75f5a043cc987b1a

7 years agoFix order of parameters to BTA_GATTC_Open am: 47474c3e58 am: 73275ae076 am: 3923f52175
Jakub Pawlowski [Tue, 6 Jun 2017 00:28:48 +0000 (00:28 +0000)]
Fix order of parameters to BTA_GATTC_Open am: 47474c3e58 am: 73275ae076 am: 3923f52175
am: 66570f8572

Change-Id: If261005ccd39e204abf1d0b2849afd44a2e4dec8

7 years agoFix order of parameters to BTA_GATTC_Open am: 47474c3e58 am: 73275ae076
Jakub Pawlowski [Tue, 6 Jun 2017 00:16:50 +0000 (00:16 +0000)]
Fix order of parameters to BTA_GATTC_Open am: 47474c3e58 am: 73275ae076
am: 3923f52175

Change-Id: Id7001fa6be73111e26a29cef7acb8f2230a95806

7 years agoFix order of parameters to BTA_GATTC_Open am: 47474c3e58
Jakub Pawlowski [Tue, 6 Jun 2017 00:11:50 +0000 (00:11 +0000)]
Fix order of parameters to BTA_GATTC_Open am: 47474c3e58
am: 73275ae076

Change-Id: Iad0473d3cd1c6ef355c410b2fb50578856d24116

7 years agoFix order of parameters to BTA_GATTC_Open
Jakub Pawlowski [Tue, 6 Jun 2017 00:06:50 +0000 (00:06 +0000)]
Fix order of parameters to BTA_GATTC_Open
am: 47474c3e58

Change-Id: I4a305269942e19b5a33521f3071cf24253db81c4

7 years agoFix order of parameters to BTA_GATTC_Open
Jakub Pawlowski [Sat, 3 Jun 2017 23:39:04 +0000 (16:39 -0700)]
Fix order of parameters to BTA_GATTC_Open

Different order of parameters in different flavours of method caused
bug in btif_gatt_client.cc, where every client would be started as
opportunistic. This issue was introduced in commit
16bb48b320cde54a1a06a525f4d9be1421689649

Bug: 34951749
Test: sl4a GattReadTest was flaky without this patch
Change-Id: I243b11bd8e2c0da9f01cbd3eab95dc808bd54006

7 years agoFix order of parameters to BTA_GATTC_Open
Jakub Pawlowski [Sat, 3 Jun 2017 23:39:04 +0000 (16:39 -0700)]
Fix order of parameters to BTA_GATTC_Open

Different order of parameters in different flavours of method caused
bug in btif_gatt_client.cc, where every client would be started as
opportunistic. This issue was introduced in commit
16bb48b320cde54a1a06a525f4d9be1421689649

Bug: 34951749
Test: sl4a GattReadTest was flaky without this patch
Change-Id: I243b11bd8e2c0da9f01cbd3eab95dc808bd54006

7 years agoPass GATT cb's by reference and other style fixes am: f4c0292c63 am: f5de435643 am...
Jakub Pawlowski [Sat, 3 Jun 2017 02:43:19 +0000 (02:43 +0000)]
Pass GATT cb's by reference and other style fixes am: f4c0292c63 am: f5de435643 am: 75c8ce2a50
am: 1e76bd7e38

Change-Id: I6fc85537118159e1c8592baa14c08ba940ac3527

7 years agoUse std::queue for pending_enc_clcb am: eb3ab848f8 am: 8db401f92d am: 8395ce7081
Jakub Pawlowski [Sat, 3 Jun 2017 02:43:16 +0000 (02:43 +0000)]
Use std::queue for pending_enc_clcb am: eb3ab848f8 am: 8db401f92d am: 8395ce7081
am: 0d810425bf

Change-Id: I3d372d48ddc10d323b0b4de9a6aec458bbb996ff

7 years agoPass GATT cb's by reference and other style fixes am: f4c0292c63 am: f5de435643
Jakub Pawlowski [Sat, 3 Jun 2017 02:39:34 +0000 (02:39 +0000)]
Pass GATT cb's by reference and other style fixes am: f4c0292c63 am: f5de435643
am: 75c8ce2a50

Change-Id: Ia56eab5e39f6c374d4f6cc3263cab4083ac557f4

7 years agoUse std::queue for pending_enc_clcb am: eb3ab848f8 am: 8db401f92d
Jakub Pawlowski [Sat, 3 Jun 2017 02:39:31 +0000 (02:39 +0000)]
Use std::queue for pending_enc_clcb am: eb3ab848f8 am: 8db401f92d
am: 8395ce7081

Change-Id: I5dc613353cb29ff39aa84228e2d142c369a2b0b1

7 years agoPass GATT cb's by reference and other style fixes am: f4c0292c63
Jakub Pawlowski [Sat, 3 Jun 2017 02:35:34 +0000 (02:35 +0000)]
Pass GATT cb's by reference and other style fixes am: f4c0292c63
am: f5de435643

Change-Id: Ib31990fdb1301bdba18c821b1a98709d80935ae1

7 years agoUse std::queue for pending_enc_clcb am: eb3ab848f8
Jakub Pawlowski [Sat, 3 Jun 2017 02:35:31 +0000 (02:35 +0000)]
Use std::queue for pending_enc_clcb am: eb3ab848f8
am: 8db401f92d

Change-Id: I81e646cd0929fd5cc6bdd00fc3adb1c6aacf9f1b

7 years agoPass GATT cb's by reference and other style fixes
Jakub Pawlowski [Sat, 3 Jun 2017 02:32:02 +0000 (02:32 +0000)]
Pass GATT cb's by reference and other style fixes
am: f4c0292c63

Change-Id: Idac488cdb04185733e47f796a6bbac2c607e28fa

7 years agoUse std::queue for pending_enc_clcb
Jakub Pawlowski [Sat, 3 Jun 2017 02:32:00 +0000 (02:32 +0000)]
Use std::queue for pending_enc_clcb
am: eb3ab848f8

Change-Id: Ia8a712f92f922818a5c68e8476864f535156a1b8

7 years agoPass GATT cb's by reference and other style fixes
Jakub Pawlowski [Tue, 30 May 2017 18:21:04 +0000 (11:21 -0700)]
Pass GATT cb's by reference and other style fixes

Test: compilation test
Change-Id: I410d0d0a0bf49b9f3ca5e034c66fe8e82661cee7

7 years agoUse std::queue for pending_enc_clcb
Jakub Pawlowski [Tue, 30 May 2017 16:59:54 +0000 (09:59 -0700)]
Use std::queue for pending_enc_clcb

Test: 62188929
Change-Id: Ide07f15c5e5b6bc8b93ac350081b7bef7c7b3938

7 years agoFix params of SetPeriodicAdvertisingParameters am: 0af739bcb4
Sunny Kapdi [Fri, 2 Jun 2017 01:17:33 +0000 (01:17 +0000)]
Fix params of SetPeriodicAdvertisingParameters am: 0af739bcb4
am: cb4fa74910

Change-Id: Iefa9f772b66513a081008825b47382d8f6907025

7 years agoFix params of SetPeriodicAdvertisingParameters
Sunny Kapdi [Fri, 2 Jun 2017 01:11:17 +0000 (01:11 +0000)]
Fix params of SetPeriodicAdvertisingParameters
am: 0af739bcb4

Change-Id: I9cda61113a2347ff778530cdabc254e14d367f52

7 years agoFix params of SetPeriodicAdvertisingParameters am: a85cb8ea67 am: 426325f728 am:...
Sunny Kapdi [Fri, 2 Jun 2017 00:35:09 +0000 (00:35 +0000)]
Fix params of SetPeriodicAdvertisingParameters am: a85cb8ea67 am: 426325f728 am: aa563f712e
am: ff65e5c7aa

Change-Id: I219ca26ccc088409127d9ffaa3cfab35aed9fce1

7 years agoFix params of SetPeriodicAdvertisingParameters am: a85cb8ea67 am: 426325f728
Sunny Kapdi [Fri, 2 Jun 2017 00:21:42 +0000 (00:21 +0000)]
Fix params of SetPeriodicAdvertisingParameters am: a85cb8ea67 am: 426325f728
am: aa563f712e

Change-Id: Ia3871cc56f482c4c30252b0bbb5d780d58774e9c

7 years agoFix params of SetPeriodicAdvertisingParameters am: a85cb8ea67
Sunny Kapdi [Fri, 2 Jun 2017 00:18:42 +0000 (00:18 +0000)]
Fix params of SetPeriodicAdvertisingParameters am: a85cb8ea67
am: 426325f728

Change-Id: Ia4f5af5a3f337123b872e6e2a94fcb21039cdd44

7 years agoFix params of SetPeriodicAdvertisingParameters
Sunny Kapdi [Fri, 2 Jun 2017 00:16:11 +0000 (00:16 +0000)]
Fix params of SetPeriodicAdvertisingParameters
am: a85cb8ea67

Change-Id: I56a6b3cb07bc22afbe485476ae9bc79b8e68c7a6

7 years agoFix params of SetPeriodicAdvertisingParameters
Sunny Kapdi [Thu, 1 Jun 2017 21:34:03 +0000 (14:34 -0700)]
Fix params of SetPeriodicAdvertisingParameters

Fix the sequence of SetPeriodicAdvertisingParameters
in the hci_cmd

Bug: 62268713
Change-Id: Ibdcd362458e9d7ee2f95106a2aefa76e1c264103

7 years agoMerge "GATT: Fixed typo while notifying connection update" into oc-dev am: 044e4c3de0
Avish Shah [Thu, 1 Jun 2017 22:42:48 +0000 (22:42 +0000)]
Merge "GATT: Fixed typo while notifying connection update" into oc-dev am: 044e4c3de0
am: a95bc5de74

Change-Id: I2fad95e3d2a389edeaf38c1bd09e704523c5b1f8

7 years agoMerge "GATT: Fixed typo while notifying connection update" into oc-dev
Avish Shah [Thu, 1 Jun 2017 22:39:02 +0000 (22:39 +0000)]
Merge "GATT: Fixed typo while notifying connection update" into oc-dev
am: 044e4c3de0

Change-Id: Idfa23fc3b466a57d1514a58ea6b18773a3fcfc49

7 years agoMerge "GATT: Fixed typo while notifying connection update" into oc-dev
TreeHugger Robot [Thu, 1 Jun 2017 22:36:18 +0000 (22:36 +0000)]
Merge "GATT: Fixed typo while notifying connection update" into oc-dev

7 years agoFix params of SetPeriodicAdvertisingParameters
Sunny Kapdi [Thu, 1 Jun 2017 21:34:03 +0000 (14:34 -0700)]
Fix params of SetPeriodicAdvertisingParameters

Fix the sequence of SetPeriodicAdvertisingParameters
in the hci_cmd

Bug: 62268713
Change-Id: Ibdcd362458e9d7ee2f95106a2aefa76e1c264103

7 years agoMerge changes I90a48db4,I8b9815a0 into oc-dev am: 4d92cda9c7
Myles Watson [Thu, 1 Jun 2017 21:00:10 +0000 (21:00 +0000)]
Merge changes I90a48db4,I8b9815a0 into oc-dev am: 4d92cda9c7
am: f97a090787

Change-Id: Iffc0917f7719cc5a82bda965332d00ebcc24122f

7 years agoMerge changes I90a48db4,I8b9815a0 into oc-dev
Myles Watson [Thu, 1 Jun 2017 20:56:44 +0000 (20:56 +0000)]
Merge changes I90a48db4,I8b9815a0 into oc-dev
am: 4d92cda9c7

Change-Id: I565e5ad59f8200393deeb359349b012c1cca9967

7 years agoGATT: Fixed typo while notifying connection update am: 44a1c7eafb am: 5b707312f9...
Avish Shah [Thu, 1 Jun 2017 20:56:25 +0000 (20:56 +0000)]
GATT: Fixed typo while notifying connection update am: 44a1c7eafb am: 5b707312f9 am: 3d3e8dd7bc
am: f5a1d5e286

Change-Id: I4f93329742763b787cc8a95a17824cc5ed38307e

7 years agoGATT: Fixed typo while notifying connection update am: 44a1c7eafb am: 5b707312f9
Avish Shah [Thu, 1 Jun 2017 20:50:55 +0000 (20:50 +0000)]
GATT: Fixed typo while notifying connection update am: 44a1c7eafb am: 5b707312f9
am: 3d3e8dd7bc

Change-Id: I0227edded7be640d427bee2a76f0803c2942ab9d

7 years agoMerge changes I90a48db4,I8b9815a0 into oc-dev
TreeHugger Robot [Thu, 1 Jun 2017 20:50:11 +0000 (20:50 +0000)]
Merge changes I90a48db4,I8b9815a0 into oc-dev

* changes:
  HCI: Improve timeout handling
  HCI: Get debug info from the firmware on timeout

7 years agoGATT: Fixed typo while notifying connection update am: 44a1c7eafb
Avish Shah [Thu, 1 Jun 2017 20:48:23 +0000 (20:48 +0000)]
GATT: Fixed typo while notifying connection update am: 44a1c7eafb
am: 5b707312f9

Change-Id: I82d5a6b6c5f7bc3a024d434555bb410113a470f7

7 years agoGATT: Fixed typo while notifying connection update
Avish Shah [Thu, 1 Jun 2017 20:46:28 +0000 (20:46 +0000)]
GATT: Fixed typo while notifying connection update
am: 44a1c7eafb

Change-Id: I70cc6c866889d4328153c5170b564e12ab6a4b6a

7 years agoGATT: Fixed typo while notifying connection update
Avish Shah [Wed, 31 May 2017 05:13:57 +0000 (10:43 +0530)]
GATT: Fixed typo while notifying connection update

Current conditions checks whether the app registered for
PHY_UPDATE instead it should check for CONN_UPDATE.

Bug: 62206018
Test: Manual
Change-Id: Ie9d068a24d13ea0b186b0ca874531aa4ffd1121f
(cherry picked from commit 44a1c7eafb2db9012c26dd622726655f19fbc0b7)

7 years agoGATT: Fixed typo while notifying connection update
Avish Shah [Wed, 31 May 2017 05:13:57 +0000 (10:43 +0530)]
GATT: Fixed typo while notifying connection update

Current conditions checks whether the app registered for
PHY_UPDATE instead it should check for CONN_UPDATE.

Bug: 62206018
Test: Manual
Change-Id: Ie9d068a24d13ea0b186b0ca874531aa4ffd1121f

7 years agoDO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83 -s...
Yamei Du [Thu, 1 Jun 2017 07:57:23 +0000 (07:57 +0000)]
DO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83  -s ours am: 0d0e9514ad  -s ours am: e6befb96a8  -s ours
am: 29d308097a  -s ours

Change-Id: I89dd5fcdf778ab9fd1721d89154faa51ce95842b

7 years agoDO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83 -s...
Yamei Du [Thu, 1 Jun 2017 07:57:13 +0000 (07:57 +0000)]
DO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83  -s ours am: 0d0e9514ad  -s ours am: 40d02aabb5  -s ours
am: 9f5bcf0440  -s ours

Change-Id: I6bd32bfcdc6c4d5dde5edfe71314d422f291dc27

7 years agoDO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83 -s...
Yamei Du [Thu, 1 Jun 2017 07:52:36 +0000 (07:52 +0000)]
DO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83  -s ours am: 0d0e9514ad  -s ours
am: e6befb96a8  -s ours

Change-Id: I61bf69bf501502d3adf7b2028e07d4da74d75768

7 years agoDO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83 -s...
Yamei Du [Thu, 1 Jun 2017 07:51:59 +0000 (07:51 +0000)]
DO NOT MERGE ANYWHERE HOGP mouse connect failed during OPP TX am: dae59d3b83  -s ours am: 0d0e9514ad  -s ours
am: 40d02aabb5  -s ours

Change-Id: I33cb779c17b49f2bdf5512d92d71950c71ee0754