OSDN Git Service

android-x86/system-bt.git
7 years agoUse bt_bdaddr_t instead of BD_ADDR in HID related code am: 011a619519 am: 924f10e2e0...
Jakub Pawlowski [Wed, 14 Jun 2017 01:15:29 +0000 (01:15 +0000)]
Use bt_bdaddr_t instead of BD_ADDR in HID related code am: 011a619519 am: 924f10e2e0 am: d811be0da4
am: 8b1e97f51c

Change-Id: Ia94dee59b13312c7492139720845a7d2b0dc175b

7 years agoUse bt_bdaddr_t instead of BD_ADDR in HID related code am: 011a619519 am: 924f10e2e0
Jakub Pawlowski [Wed, 14 Jun 2017 01:11:10 +0000 (01:11 +0000)]
Use bt_bdaddr_t instead of BD_ADDR in HID related code am: 011a619519 am: 924f10e2e0
am: d811be0da4

Change-Id: I97ef8000818e31bd0153349407c85bff94a0fd55

7 years agoUse bt_bdaddr_t instead of BD_ADDR in HID related code am: 011a619519
Jakub Pawlowski [Wed, 14 Jun 2017 01:07:35 +0000 (01:07 +0000)]
Use bt_bdaddr_t instead of BD_ADDR in HID related code am: 011a619519
am: 924f10e2e0

Change-Id: Ie93a46d86852868000feeb1f85f4b7e0982cea15

7 years agoUse bt_bdaddr_t instead of BD_ADDR in HID related code
Jakub Pawlowski [Wed, 14 Jun 2017 01:03:35 +0000 (01:03 +0000)]
Use bt_bdaddr_t instead of BD_ADDR in HID related code
am: 011a619519

Change-Id: Ib48932d997cad9857c9e974984638068da29f232

7 years agoUse bt_bdaddr_t instead of BD_ADDR in HID related code
Jakub Pawlowski [Fri, 9 Jun 2017 23:00:25 +0000 (16:00 -0700)]
Use bt_bdaddr_t instead of BD_ADDR in HID related code

Test: compilation test, sl4a GattReadTest
Change-Id: I4e91375746fbd966608a830ff71de79be2b99e6c

7 years agoFix HID crashing on no descriptor am: 378f095217 am: f36f92aefa am: e6c4f61dac
Jakub Pawlowski [Wed, 14 Jun 2017 00:00:20 +0000 (00:00 +0000)]
Fix HID crashing on no descriptor am: 378f095217 am: f36f92aefa am: e6c4f61dac
am: 59419ea787

Change-Id: I1a332f39348f45ba8bcf96543f13213158c82ac7

7 years agoFix for fugu build am: 029fd8783b am: 2e6afeb3f5 am: fa7a5d8887
Jakub Pawlowski [Wed, 14 Jun 2017 00:00:03 +0000 (00:00 +0000)]
Fix for fugu build am: 029fd8783b am: 2e6afeb3f5 am: fa7a5d8887
am: 5fed739136

Change-Id: Ic98a31a430b0bc394f60db8f3b4028e3f48b8443

7 years agoUse bt_bdaddr_t instead of BD_ADDR am: c2276b0657 am: 47db4290c8 am: b7916890da
Jakub Pawlowski [Tue, 13 Jun 2017 23:59:47 +0000 (23:59 +0000)]
Use bt_bdaddr_t instead of BD_ADDR am: c2276b0657 am: 47db4290c8 am: b7916890da
am: 6e129305ea

Change-Id: I8c69a0c642d335b8c71d07f173ff77695a64b391

7 years agoFix HID crashing on no descriptor am: 378f095217 am: f36f92aefa
Jakub Pawlowski [Tue, 13 Jun 2017 23:58:46 +0000 (23:58 +0000)]
Fix HID crashing on no descriptor am: 378f095217 am: f36f92aefa
am: e6c4f61dac

Change-Id: I623742d931a28726ef0dbabea998a1a0ffc6e823

7 years agoFix for fugu build am: 029fd8783b am: 2e6afeb3f5
Jakub Pawlowski [Tue, 13 Jun 2017 23:58:30 +0000 (23:58 +0000)]
Fix for fugu build am: 029fd8783b am: 2e6afeb3f5
am: fa7a5d8887

Change-Id: I37600e046dfe86c9198d353750a2155de4fc210b

7 years agoFix HID crashing on no descriptor am: 378f095217
Jakub Pawlowski [Tue, 13 Jun 2017 23:55:17 +0000 (23:55 +0000)]
Fix HID crashing on no descriptor am: 378f095217
am: f36f92aefa

Change-Id: I7b0ccee964a5da893e6d1ab206dd159f59dcdafe

7 years agoFix for fugu build am: 029fd8783b
Jakub Pawlowski [Tue, 13 Jun 2017 23:55:01 +0000 (23:55 +0000)]
Fix for fugu build am: 029fd8783b
am: 2e6afeb3f5

Change-Id: Ib25a33c43730ad8b3edc44add81ae941143be51b

7 years agoFix HID crashing on no descriptor
Jakub Pawlowski [Tue, 13 Jun 2017 23:51:19 +0000 (23:51 +0000)]
Fix HID crashing on no descriptor
am: 378f095217

Change-Id: Idf28228a7f5ef8128baa1171f27be62a913b43c8

7 years agoFix for fugu build
Jakub Pawlowski [Tue, 13 Jun 2017 23:51:00 +0000 (23:51 +0000)]
Fix for fugu build
am: 029fd8783b

Change-Id: I1aa8e1ecc0964da835bd3795f99282cd23f3ff13

7 years agoFix HID crashing on no descriptor
Jakub Pawlowski [Tue, 13 Jun 2017 21:16:57 +0000 (14:16 -0700)]
Fix HID crashing on no descriptor

Bug: 62461796
Test: compilation test
Change-Id: Ic7b1fcc4b6f3c8680f1810679ed609f2691fa4aa

7 years agoFix for fugu build
Jakub Pawlowski [Tue, 13 Jun 2017 23:41:45 +0000 (16:41 -0700)]
Fix for fugu build

Test: compilation with BLE_PRIVACY_SPT=TRUE
Change-Id: I1765ad009368077bb4c0be9673a27a9df428f41f

7 years agoUse bt_bdaddr_t instead of BD_ADDR am: c2276b0657 am: 47db4290c8
Jakub Pawlowski [Tue, 13 Jun 2017 21:46:49 +0000 (21:46 +0000)]
Use bt_bdaddr_t instead of BD_ADDR am: c2276b0657 am: 47db4290c8
am: b7916890da

Change-Id: I7a395d7300f5d9cf39cca84e9b3c0b19e2c9b8a1

7 years agoMerge "Fix some includes" am: 107579ae93 am: c2eb752327 am: a295df0621
Bailey Forrest [Tue, 13 Jun 2017 21:44:30 +0000 (21:44 +0000)]
Merge "Fix some includes" am: 107579ae93 am: c2eb752327 am: a295df0621
am: 4e125a285f

Change-Id: I1d6b7b28e2f3f66214d7b6ce44b45ea30849ed98

7 years agoUse bt_bdaddr_t instead of BD_ADDR am: c2276b0657
Jakub Pawlowski [Tue, 13 Jun 2017 21:32:49 +0000 (21:32 +0000)]
Use bt_bdaddr_t instead of BD_ADDR am: c2276b0657
am: 47db4290c8

Change-Id: Ib4c1de8b99dd1f87a9e733d868f0a9beacdf9530

7 years agoUse bt_bdaddr_t instead of BD_ADDR
Jakub Pawlowski [Tue, 13 Jun 2017 21:28:48 +0000 (21:28 +0000)]
Use bt_bdaddr_t instead of BD_ADDR
am: c2276b0657

Change-Id: I133f28f3434a44fe72c322cd61706589b03ecec2

7 years agoUse bt_bdaddr_t instead of BD_ADDR
Jakub Pawlowski [Fri, 9 Jun 2017 23:00:25 +0000 (16:00 -0700)]
Use bt_bdaddr_t instead of BD_ADDR

Test: compilation test, sl4a GattReadTest
Change-Id: I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6

7 years agoMerge "Fix some includes" am: 107579ae93 am: c2eb752327
Bailey Forrest [Tue, 13 Jun 2017 21:17:13 +0000 (21:17 +0000)]
Merge "Fix some includes" am: 107579ae93 am: c2eb752327
am: a295df0621

Change-Id: Ia123ff7b96fa07351083f9f5c8ff96ceb8e3bc1a

7 years agoMerge "Fix some includes" am: 107579ae93
Bailey Forrest [Tue, 13 Jun 2017 21:03:20 +0000 (21:03 +0000)]
Merge "Fix some includes" am: 107579ae93
am: c2eb752327

Change-Id: I6bec00b825c0f5ea13b6fb67c5d551a8782ff02b

7 years agoMerge "Fix some includes"
Bailey Forrest [Tue, 13 Jun 2017 20:56:14 +0000 (20:56 +0000)]
Merge "Fix some includes"
am: 107579ae93

Change-Id: I4bdbd6a54e1928856167c570b727b6d28998034d

7 years agoMerge "Fix some includes"
Treehugger Robot [Tue, 13 Jun 2017 20:36:18 +0000 (20:36 +0000)]
Merge "Fix some includes"

7 years agoFix some includes
Bailey Forrest [Mon, 12 Jun 2017 23:48:02 +0000 (16:48 -0700)]
Fix some includes

- include fcntl.h for O_WRONLY,O_CREAT,O_TRUNC
- Change sys/stat.h, sys/types.h to use <>

Bug: None
Test: Build
Change-Id: I4ce1ceeba8ffdc6ff8b47ae43fcd8764d259f067

7 years agoMerge "bta_dm: Stop copying garbage am: e92648629c -s ours am: aafb604628 -s ours...
Martin Brabham [Mon, 12 Jun 2017 18:33:08 +0000 (18:33 +0000)]
Merge "bta_dm: Stop copying garbage am: e92648629c  -s ours am: aafb604628  -s ours" into oc-dr1-dev-plus-aosp
am: f1d32d1524  -s ours

Change-Id: Ibcb9c037ddfe4b672d5612632f28eb27587a279a

7 years agobta_dm: Stop copying garbage am: e92648629c -s ours am: eefc24e3af -s ours
Martin Brabham [Mon, 12 Jun 2017 18:32:50 +0000 (18:32 +0000)]
bta_dm: Stop copying garbage am: e92648629c  -s ours am: eefc24e3af  -s ours
am: 9c8855fd5d  -s ours

Change-Id: I87e49bca6aacc4b72476fa54fdff875adb7c44f3

7 years agoMerge "bta_dm: Stop copying garbage am: e92648629c -s ours am: aafb604628 -s ours...
Android Build Merger (Role) [Mon, 12 Jun 2017 18:30:03 +0000 (18:30 +0000)]
Merge "bta_dm: Stop copying garbage am: e92648629c  -s ours am: aafb604628  -s ours" into oc-dr1-dev-plus-aosp

7 years agobta_dm: Stop copying garbage am: e92648629c -s ours
Martin Brabham [Mon, 12 Jun 2017 18:29:50 +0000 (18:29 +0000)]
bta_dm: Stop copying garbage am: e92648629c  -s ours
am: eefc24e3af  -s ours

Change-Id: Iff793f88f1eace327cde9ce269e218e979cc9064

7 years agobta_dm: Stop copying garbage am: e92648629c -s ours
Martin Brabham [Mon, 12 Jun 2017 18:29:50 +0000 (18:29 +0000)]
bta_dm: Stop copying garbage am: e92648629c  -s ours
am: aafb604628  -s ours

Change-Id: Ib21eb7a9e95bc43c12c09200506af3239db7a41c

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: Ib789b5106589d4c660bf0ea075ffc4fbfdebf38c

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 agoMove bt_bdaddr_t operator to global header file am: a2d3cb2281 am: 0e80de07fd am...
Jakub Pawlowski [Sat, 10 Jun 2017 02:00:45 +0000 (02:00 +0000)]
Move bt_bdaddr_t operator to global header file am: a2d3cb2281 am: 0e80de07fd am: acf8cec8ce
am: ef6d8f44aa

Change-Id: If8c7b2fef1a306738fc3271c4dd41935a343e563

7 years agoMove bt_bdaddr_t operator to global header file am: a2d3cb2281 am: 0e80de07fd
Jakub Pawlowski [Sat, 10 Jun 2017 01:58:14 +0000 (01:58 +0000)]
Move bt_bdaddr_t operator to global header file am: a2d3cb2281 am: 0e80de07fd
am: acf8cec8ce

Change-Id: I8a93c67e84abbac706e09f0e6bf9c70d782fc751

7 years agoMove bt_bdaddr_t operator to global header file am: a2d3cb2281
Jakub Pawlowski [Sat, 10 Jun 2017 01:55:44 +0000 (01:55 +0000)]
Move bt_bdaddr_t operator to global header file am: a2d3cb2281
am: 0e80de07fd

Change-Id: I478cecb69fb7288a304368b936bff07051706912

7 years agoMove bt_bdaddr_t operator to global header file
Jakub Pawlowski [Sat, 10 Jun 2017 01:53:14 +0000 (01:53 +0000)]
Move bt_bdaddr_t operator to global header file
am: a2d3cb2281

Change-Id: I1573c4443bdde450e0e70ab38a642e3bb862a479

7 years agoeSCO: Limit number of retries after mSBC connection failure am: 12fb8883d0 am: b4ceb77eaf
Jack He [Sat, 10 Jun 2017 00:01:03 +0000 (00:01 +0000)]
eSCO: Limit number of retries after mSBC connection failure am: 12fb8883d0 am: b4ceb77eaf
am: 73f59f01d8

Change-Id: I5d6a9221bdd1629aecc71b40988d3084bb7905d5

7 years agoeSCO: Limit number of retries after mSBC connection failure am: 12fb8883d0 am: 88f78c5c14
Jack He [Sat, 10 Jun 2017 00:00:41 +0000 (00:00 +0000)]
eSCO: Limit number of retries after mSBC connection failure am: 12fb8883d0 am: 88f78c5c14
am: 8e02b512a6

Change-Id: I9222591a47ad3a704dec3cc1df087ab3bbad01e2

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

Change-Id: Ib88d35f2d5a21aafa81401bd76f037dfdd897025

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

Change-Id: Ibfa620e867c0afe201bd974adb1227aa6a19e2da

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 [Fri, 9 Jun 2017 23:27:33 +0000 (23:27 +0000)]
eSCO: Limit number of retries after mSBC connection failure
am: 12fb8883d0

Change-Id: I90f4ce530e1f4d11dc609563c3bc9f09478bc901

7 years agoMove bt_bdaddr_t operator to global header file
Jakub Pawlowski [Fri, 9 Jun 2017 21:02:03 +0000 (14:02 -0700)]
Move bt_bdaddr_t operator to global header file

This is to simplify bt_bdaddr_t handling

Test: compilation
Change-Id: I06ac6c2f0402ed13a2c04f86494d3c4fd0165963

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 agoMerge "smp: Fix long SMP_Trace_* log messages" am: 233f7fd203 am: bad573f2bd am:...
johnshamoon [Fri, 9 Jun 2017 23:18:20 +0000 (23:18 +0000)]
Merge "smp: Fix long SMP_Trace_* log messages" am: 233f7fd203 am: bad573f2bd am: cfb9691397
am: 9a6c8c2fdb

Change-Id: I6afc5f2c1c16a7904910113060a876780b73e0ef

7 years agoMerge "bta: Update APPL_TRACE_* logs and call parameter" am: ffee35d068 am: f0d172b38...
jruthe [Fri, 9 Jun 2017 23:17:58 +0000 (23:17 +0000)]
Merge "bta: Update APPL_TRACE_* logs and call parameter" am: ffee35d068 am: f0d172b382 am: 23b6204f1f
am: 60889ade43

Change-Id: I74924010bdfcb0c0673bc4124a83c721fba323ad

7 years agoMerge "smp: Fix long SMP_Trace_* log messages" am: 233f7fd203 am: bad573f2bd
johnshamoon [Fri, 9 Jun 2017 22:38:12 +0000 (22:38 +0000)]
Merge "smp: Fix long SMP_Trace_* log messages" am: 233f7fd203 am: bad573f2bd
am: cfb9691397

Change-Id: Ie629fdc6e12be3b886f566be1c0a27d299d85781

7 years agoMerge "bta: Update APPL_TRACE_* logs and call parameter" am: ffee35d068 am: f0d172b382
jruthe [Fri, 9 Jun 2017 22:37:54 +0000 (22:37 +0000)]
Merge "bta: Update APPL_TRACE_* logs and call parameter" am: ffee35d068 am: f0d172b382
am: 23b6204f1f

Change-Id: Ib74284ea8492e45fbafe00818c9e6e470ddab1c2

7 years agoMerge "smp: Fix long SMP_Trace_* log messages" am: 233f7fd203
johnshamoon [Fri, 9 Jun 2017 22:12:42 +0000 (22:12 +0000)]
Merge "smp: Fix long SMP_Trace_* log messages" am: 233f7fd203
am: bad573f2bd

Change-Id: Ife167474f864b6c2b78758657ba948b843c01fa4

7 years agoMerge "bta: Update APPL_TRACE_* logs and call parameter" am: ffee35d068
jruthe [Fri, 9 Jun 2017 22:12:27 +0000 (22:12 +0000)]
Merge "bta: Update APPL_TRACE_* logs and call parameter" am: ffee35d068
am: f0d172b382

Change-Id: I89106aa0503212d113c1bfdb4c9e99205e8afe83

7 years agoMerge "smp: Fix long SMP_Trace_* log messages"
johnshamoon [Fri, 9 Jun 2017 22:09:50 +0000 (22:09 +0000)]
Merge "smp: Fix long SMP_Trace_* log messages"
am: 233f7fd203

Change-Id: I82fd49362c33c23d973767af2005e841d4b3cafb

7 years agoMerge "bta: Update APPL_TRACE_* logs and call parameter"
jruthe [Fri, 9 Jun 2017 22:09:32 +0000 (22:09 +0000)]
Merge "bta: Update APPL_TRACE_* logs and call parameter"
am: ffee35d068

Change-Id: I526b4dd5ee192647e5f385ad5247c8e567615081

7 years agoMerge "smp: Fix long SMP_Trace_* log messages"
Treehugger Robot [Fri, 9 Jun 2017 22:00:10 +0000 (22:00 +0000)]
Merge "smp: Fix long SMP_Trace_* log messages"

7 years agoMerge "bta: Update APPL_TRACE_* logs and call parameter"
Treehugger Robot [Fri, 9 Jun 2017 21:59:05 +0000 (21:59 +0000)]
Merge "bta: Update APPL_TRACE_* logs and call parameter"

7 years agobta: Update APPL_TRACE_* logs and call parameter
jruthe [Wed, 31 May 2017 20:55:42 +0000 (13:55 -0700)]
bta: Update APPL_TRACE_* logs and call parameter

Also update messages to use __func__ rather than hard-coding
function names in log messages.

Test: Pair two devices
Change-Id: I8d3a9e293c71775caee420b8da6bc3e4385a46dd

7 years agosmp: Fix long SMP_Trace_* log messages
johnshamoon [Wed, 31 May 2017 18:32:24 +0000 (11:32 -0700)]
smp: Fix long SMP_Trace_* log messages

Test: Manually pair two devices
Change-Id: Iebf43688220922563c0e1028d9e75a4cae2fc1bd

7 years agoGet rid of GATT_TRACE_* logs in favour of base/logging.h am: d8be0e590a am: 265ef4c33...
Jakub Pawlowski [Fri, 9 Jun 2017 05:53:24 +0000 (05:53 +0000)]
Get rid of GATT_TRACE_* logs in favour of base/logging.h am: d8be0e590a am: 265ef4c336 am: 1fd76851b0
am: 2bdcf445db

Change-Id: I07aa85e2dfd06ae2efaf2ab01c28f55b621fa411

7 years agoGet rid of GATT_TRACE_* logs in favour of base/logging.h am: d8be0e590a am: 265ef4c336
Jakub Pawlowski [Fri, 9 Jun 2017 05:51:25 +0000 (05:51 +0000)]
Get rid of GATT_TRACE_* logs in favour of base/logging.h am: d8be0e590a am: 265ef4c336
am: 1fd76851b0

Change-Id: Id78a5e4a8cf42b8324b321cd68c0be7c5b35841f

7 years agoGet rid of GATT_TRACE_* logs in favour of base/logging.h am: d8be0e590a
Jakub Pawlowski [Fri, 9 Jun 2017 05:48:55 +0000 (05:48 +0000)]
Get rid of GATT_TRACE_* logs in favour of base/logging.h am: d8be0e590a
am: 265ef4c336

Change-Id: If3ac9623f064dac4a73e5afcf51770967332d4b0

7 years agoGet rid of GATT_TRACE_* logs in favour of base/logging.h
Jakub Pawlowski [Fri, 9 Jun 2017 05:46:54 +0000 (05:46 +0000)]
Get rid of GATT_TRACE_* logs in favour of base/logging.h
am: d8be0e590a

Change-Id: Idbe853cfc87bef4db7b03a3b8fb36f021f67dc6c

7 years agoGet rid of GATT_TRACE_* logs in favour of base/logging.h
Jakub Pawlowski [Fri, 9 Jun 2017 00:04:47 +0000 (17:04 -0700)]
Get rid of GATT_TRACE_* logs in favour of base/logging.h

Change-Id: Id77d313c5bff5e611441599da351a766d0ce5916

7 years agoMerge "Include used STL header files" am: bc363373f6 am: 2ca22380a5 am: 6e64496f06
Bailey Forrest [Fri, 9 Jun 2017 04:17:48 +0000 (04:17 +0000)]
Merge "Include used STL header files" am: bc363373f6 am: 2ca22380a5 am: 6e64496f06
am: b6f174c76d

Change-Id: I704f3450315d7bec7719ee78549a4e51fdbd9af0

7 years agoMerge "Include used STL header files" am: bc363373f6 am: 2ca22380a5
Bailey Forrest [Fri, 9 Jun 2017 04:15:16 +0000 (04:15 +0000)]
Merge "Include used STL header files" am: bc363373f6 am: 2ca22380a5
am: 6e64496f06

Change-Id: Ib851ffe773d05f3bbb937e15b1adfa64c04f982b

7 years agoMerge "Include used STL header files" am: bc363373f6
Bailey Forrest [Fri, 9 Jun 2017 04:12:47 +0000 (04:12 +0000)]
Merge "Include used STL header files" am: bc363373f6
am: 2ca22380a5

Change-Id: I6e722bc87f432f9c9fb4149cc71812dc77ba2adf

7 years agoMerge "Include used STL header files"
Bailey Forrest [Fri, 9 Jun 2017 04:10:47 +0000 (04:10 +0000)]
Merge "Include used STL header files"
am: bc363373f6

Change-Id: Ib56d392f7b88d260f7211d13c8d79d84fe62bd2e

7 years agoMerge "Include used STL header files"
Treehugger Robot [Fri, 9 Jun 2017 04:06:00 +0000 (04:06 +0000)]
Merge "Include used STL header files"

7 years agoMerge "eSCO: Limit number of retries after mSBC connection failure" am: c65112de69...
Jack He [Fri, 9 Jun 2017 03:19:14 +0000 (03:19 +0000)]
Merge "eSCO: Limit number of retries after mSBC connection failure" am: c65112de69 am: ed3c1d992c am: 8d342dcc05
am: 6432a2130f

Change-Id: If2f8fabdd4f1f3b3a7362602e41662f4c2bf3e35

7 years agoMerge "eSCO: Limit number of retries after mSBC connection failure" am: c65112de69...
Jack He [Fri, 9 Jun 2017 03:17:13 +0000 (03:17 +0000)]
Merge "eSCO: Limit number of retries after mSBC connection failure" am: c65112de69 am: ed3c1d992c
am: 8d342dcc05

Change-Id: I9bb563b44d3388972f8bf5a67daf02491a3a0542

7 years agoMerge "eSCO: Limit number of retries after mSBC connection failure" am: c65112de69
Jack He [Fri, 9 Jun 2017 03:14:43 +0000 (03:14 +0000)]
Merge "eSCO: Limit number of retries after mSBC connection failure" am: c65112de69
am: ed3c1d992c

Change-Id: Iad9823143556d20a377f642272400fa66286d74c

7 years agoMerge "eSCO: Limit number of retries after mSBC connection failure"
Jack He [Fri, 9 Jun 2017 03:12:13 +0000 (03:12 +0000)]
Merge "eSCO: Limit number of retries after mSBC connection failure"
am: c65112de69

Change-Id: I57bdffaac640741e62078fd2fe206c22ca8f3144

7 years agoMerge "eSCO: Limit number of retries after mSBC connection failure"
Treehugger Robot [Fri, 9 Jun 2017 03:08:26 +0000 (03:08 +0000)]
Merge "eSCO: Limit number of retries after mSBC connection failure"

7 years agoMerge "Merge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7"...
Pavlin Radoslavov [Fri, 9 Jun 2017 02:16:13 +0000 (02:16 +0000)]
Merge "Merge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7" into oc-dev-plus-aosp am: dd48e58446" into oc-dr1-dev-plus-aosp
am: a7866e5be2

Change-Id: I0b63caa2cb626188e6d9b1f5bc24e7c69a5bc023

7 years agoMerge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7 am: 2900d9de...
Pavlin Radoslavov [Fri, 9 Jun 2017 02:15:38 +0000 (02:15 +0000)]
Merge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7 am: 2900d9de33" into oc-dr1-dev-plus-aosp
am: 555727590a

Change-Id: Ic9e93a9305b7d799f67577ee68f490c5ac40bdc7

7 years agoMerge "GATT write improvements" am: 34feb41643 am: 3455ef0449 am: e8ed18e203
Jakub Pawlowski [Fri, 9 Jun 2017 02:15:14 +0000 (02:15 +0000)]
Merge "GATT write improvements" am: 34feb41643 am: 3455ef0449 am: e8ed18e203
am: a1cfd3f230

Change-Id: Ib9a76c062a5bec3a394dea5047175d4a00c8346c

7 years agoMerge "Merge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7"...
Android Build Merger (Role) [Fri, 9 Jun 2017 02:14:00 +0000 (02:14 +0000)]
Merge "Merge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7" into oc-dev-plus-aosp am: dd48e58446" into oc-dr1-dev-plus-aosp

7 years agoMerge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7" into oc...
Pavlin Radoslavov [Fri, 9 Jun 2017 02:13:41 +0000 (02:13 +0000)]
Merge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7" into oc-dev-plus-aosp
am: dd48e58446

Change-Id: I3b473edc01e9b09b5aac6b5002626170a673fd1e

7 years agoMerge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7 am: 2900d9de...
Android Build Merger (Role) [Fri, 9 Jun 2017 02:13:36 +0000 (02:13 +0000)]
Merge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7 am: 2900d9de33" into oc-dr1-dev-plus-aosp

7 years agoMerge "GATT write improvements" am: 34feb41643 am: 3455ef0449
Jakub Pawlowski [Fri, 9 Jun 2017 02:13:14 +0000 (02:13 +0000)]
Merge "GATT write improvements" am: 34feb41643 am: 3455ef0449
am: e8ed18e203

Change-Id: Ieae1986e37891870078fb0ec9d9fd61bd9d9d0d0

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

Change-Id: I975fdb9cc3434d56376d73ce00ebfaa00bc60432

7 years agoMerge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7" into oc...
Android Build Merger (Role) [Fri, 9 Jun 2017 02:10:34 +0000 (02:10 +0000)]
Merge "Ignore the Class Of Device if the value is invalid am: 7fe86917d7" into oc-dev-plus-aosp

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 [Fri, 9 Jun 2017 02:10:12 +0000 (02:10 +0000)]
Ignore the Class Of Device if the value is invalid
am: 7fe86917d7

Change-Id: Iadd935ac9901bfa64d2b27ed2705e0fbf977d193

7 years agoMerge "GATT write improvements" am: 34feb41643
Jakub Pawlowski [Fri, 9 Jun 2017 02:10:08 +0000 (02:10 +0000)]
Merge "GATT write improvements" am: 34feb41643
am: 3455ef0449

Change-Id: I12196450ec3b4e9f91fb8b9a00d85e96d3f5b8f5

7 years agoMerge "GATT write improvements"
Jakub Pawlowski [Fri, 9 Jun 2017 02:07:39 +0000 (02:07 +0000)]
Merge "GATT write improvements"
am: 34feb41643

Change-Id: I9b950c052af3968138d0476f93b8899d89f31a96

7 years agoMerge "GATT write improvements"
Jakub Pawlowski [Fri, 9 Jun 2017 02:01:29 +0000 (02:01 +0000)]
Merge "GATT write improvements"

7 years agoIgnore the Class Of Device if the value is invalid am: a052757882 am: e5056f6592...
Pavlin Radoslavov [Fri, 9 Jun 2017 01:45:43 +0000 (01:45 +0000)]
Ignore the Class Of Device if the value is invalid am: a052757882 am: e5056f6592 am: f3ea3df13d
am: ce1fd3344d

Change-Id: Id7429e53bc1335727f49ee7ef79eee688389445c

7 years agoIgnore the Class Of Device if the value is invalid am: a052757882 am: e5056f6592
Pavlin Radoslavov [Fri, 9 Jun 2017 01:43:11 +0000 (01:43 +0000)]
Ignore the Class Of Device if the value is invalid am: a052757882 am: e5056f6592
am: f3ea3df13d

Change-Id: I3a7908f8afa40707b4dd12ff54fb95a7455f141b

7 years agoIgnore the Class Of Device if the value is invalid am: a052757882
Pavlin Radoslavov [Fri, 9 Jun 2017 01:39:21 +0000 (01:39 +0000)]
Ignore the Class Of Device if the value is invalid am: a052757882
am: e5056f6592

Change-Id: Ib00d2b697a1790df2040f48a34a7f61b3dfb6190

7 years agoIgnore the Class Of Device if the value is invalid
Pavlin Radoslavov [Fri, 9 Jun 2017 01:36:54 +0000 (01:36 +0000)]
Ignore the Class Of Device if the value is invalid
am: a052757882

Change-Id: I1b28fb403a5231539fedf05d8b4af9cc5d3304ae

7 years agoGATT write improvements
Jakub Pawlowski [Thu, 8 Jun 2017 19:27:30 +0000 (12:27 -0700)]
GATT write improvements

When doing GATT write, crash if p_clcb->p_attr_buf is null, or if
op_subtype is unknown. Both of this cases signal possible memory
corruption, and should be treated as fatal.
Properly handle GATT_CONGESTED error when doing long write.

Test: compilation test
Change-Id: Ia56f3bbd06cde2978b0ce2210ebe58042504938c

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

7 years agoInclude used STL header files
Bailey Forrest [Thu, 8 Jun 2017 23:29:28 +0000 (16:29 -0700)]
Include used STL header files

Without these, cpplint's include-what-you-use fails.

Bug: None
Test: Build
Change-Id: I99954688b0041b10cfb7c18c8744cd889bf7a22e

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 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

7 years agoMerge "Add tracking of periodic_enable in adv_inst" am: a50c91ad0d am: c7b55d6d5d...
Jakub Pawlowski [Thu, 8 Jun 2017 23:15:55 +0000 (23:15 +0000)]
Merge "Add tracking of periodic_enable in adv_inst" am: a50c91ad0d am: c7b55d6d5d am: e22ecd7839
am: 329b4a36bf

Change-Id: I4343c8fc21d80a0c039707d60a27ad038a2ef0de

7 years agoMerge "Add tracking of periodic_enable in adv_inst" am: a50c91ad0d am: c7b55d6d5d
Jakub Pawlowski [Thu, 8 Jun 2017 23:11:54 +0000 (23:11 +0000)]
Merge "Add tracking of periodic_enable in adv_inst" am: a50c91ad0d am: c7b55d6d5d
am: e22ecd7839

Change-Id: Id87b4ca5cc7ea307a71831dffb8694de90fae064

7 years agoMerge "gatt_api minor style fixes" am: c2a3b46b3a am: 60b221387d am: c581376714
Jakub Pawlowski [Thu, 8 Jun 2017 23:09:36 +0000 (23:09 +0000)]
Merge "gatt_api minor style fixes" am: c2a3b46b3a am: 60b221387d am: c581376714
am: 2887e4162c

Change-Id: I58f67eb8932497645fab24c750f2efa62bb48295

7 years agoMerge "Add tracking of periodic_enable in adv_inst" am: a50c91ad0d
Jakub Pawlowski [Thu, 8 Jun 2017 23:09:24 +0000 (23:09 +0000)]
Merge "Add tracking of periodic_enable in adv_inst" am: a50c91ad0d
am: c7b55d6d5d

Change-Id: I9a5bb45f4666554e87f34c1364a17ee0685b95ce