OSDN Git Service
Jakub Pawlowski [Tue, 20 Jun 2017 01:19:49 +0000 (01:19 +0000)]
Replace BD_ADDR with bt_bdaddr_t in SDP and A2DP related code
am:
135b7f68e4
Change-Id: I0b233b1c26cfdc2e34a54829f5225051e40ff19f
Jakub Pawlowski [Tue, 20 Jun 2017 01:19:36 +0000 (01:19 +0000)]
Replace BD_ADDR with bt_bdaddr_t in hf client related code
am:
744eeca761
Change-Id: I93d760b2d394d2b85d79011e4d5ffa1d5d58074f
Jakub Pawlowski [Tue, 20 Jun 2017 01:18:04 +0000 (01:18 +0000)]
Replace BD_ADDR with bt_bdaddr_t in JV related code
am:
a09c348200
Change-Id: I6868cae7d9d5850e1111c81350b1c3bed6cf662a
Jakub Pawlowski [Fri, 16 Jun 2017 17:00:46 +0000 (10:00 -0700)]
Replace BD_ADDR with bt_bdaddr_t in SDP and A2DP related code
Test: compilation test
Change-Id: I59a69d56377d38f349def6b24aa5c7d5a3d4f859
Jakub Pawlowski [Tue, 20 Jun 2017 01:17:50 +0000 (01:17 +0000)]
use bt_bdaddr_t instead of BD_ADDR in PAN related code
am:
a83ac12406
Change-Id: Ied1db09af07d2f3b9fa7da73c3c757acc9c1542d
Jakub Pawlowski [Tue, 20 Jun 2017 01:17:37 +0000 (01:17 +0000)]
Replace BD_ADDR with bt_bdaddr_t in HL related code
am:
50cf52cf6b
Change-Id: I3aa7a7be02704e7dcce2078f989d156eab65742d
Jakub Pawlowski [Tue, 20 Jun 2017 01:17:22 +0000 (01:17 +0000)]
Use bt_bdaddr_t instead of BD_ADDR in AVDT related code
am:
903c16685e
Change-Id: I2fc7d8e2cc826afa2c210b68d2679f16651aa8bd
Jakub Pawlowski [Tue, 20 Jun 2017 01:17:09 +0000 (01:17 +0000)]
Get rid of no longer necessary bt_bdaddr_t helpers
am:
6da40f9782
Change-Id: Iecdea5cdaad1422b37cd0ab6304ad72591f2a2cb
Jakub Pawlowski [Fri, 16 Jun 2017 16:35:52 +0000 (09:35 -0700)]
Replace BD_ADDR with bt_bdaddr_t in hf client related code
Test: compilation test
Change-Id: Iee6b07b6a919e5d061a04cb3d919166661e673e8
Jakub Pawlowski [Fri, 16 Jun 2017 15:42:05 +0000 (08:42 -0700)]
Replace BD_ADDR with bt_bdaddr_t in JV related code
Test: compilation test
Change-Id: Ie0cf491506ebb898ba968586048d2b58248ba112
Jakub Pawlowski [Thu, 15 Jun 2017 18:53:33 +0000 (11:53 -0700)]
use bt_bdaddr_t instead of BD_ADDR in PAN related code
Test: compilation test
Change-Id: I1fced7529f3d91bf429c179cf4eba5157b35c8fd
Jakub Pawlowski [Thu, 15 Jun 2017 18:10:08 +0000 (11:10 -0700)]
Replace BD_ADDR with bt_bdaddr_t in HL related code
Test: compilation test
Change-Id: Ife04e0839a4a6f61b77a60f49bf44ab5bdacc874
Jakub Pawlowski [Wed, 14 Jun 2017 00:53:54 +0000 (17:53 -0700)]
Use bt_bdaddr_t instead of BD_ADDR in AVDT related code
Test: compilation test
Change-Id: Ibdfd79972d2270303cf1d2e0da26b23d8d5d62d5
Jakub Pawlowski [Thu, 15 Jun 2017 14:16:16 +0000 (07:16 -0700)]
Get rid of no longer necessary bt_bdaddr_t helpers
This are now implemented by the "==" and copy operator
Test: compilation test
Change-Id: I4438c54a9238ad9f3083f7f8a8159d1b7f0f9b32
Pavlin Radoslavov [Tue, 20 Jun 2017 00:45:03 +0000 (00:45 +0000)]
Add a mechanism to avoid using AVDTP RECONFIGURE for blacklisted devices
am:
e91297a4d1
Change-Id: I13ffe7aeebb3ef047a0bcc67ed99130153960195
Pavlin Radoslavov [Mon, 19 Jun 2017 19:44:11 +0000 (12:44 -0700)]
Add a mechanism to avoid using AVDTP RECONFIGURE for blacklisted devices
Some carkits report SUCCESS for AVDTP RECONFIGURE commands when
changing A2DP codec configuration. However, there is no audio coming
from the carkit.
Bug:
37625892
Test: Manual - A2DP Codec reconfiguration while streaming audio
Change-Id: I01f37a2514e490986a20e96ace78c92463403396
Jakub Pawlowski [Fri, 16 Jun 2017 18:54:24 +0000 (18:54 +0000)]
Get rid of last mentions of BD_ADDR from btif.
am:
760f967f47
Change-Id: I3f8ba6e54c5ae32208c9f2e3e4eb7d7db481ce08
Jakub Pawlowski [Thu, 15 Jun 2017 21:48:35 +0000 (14:48 -0700)]
Get rid of last mentions of BD_ADDR from btif.
Test: compilation test
Change-Id: I22f6b01b1a69eca96b05319692a2eb82ecc186a8
Avish Shah [Thu, 15 Jun 2017 17:53:41 +0000 (17:53 +0000)]
Merge "Bluetooth 5: Update LE2M implementation through DM (3/3)"
am:
a0e18e3982
Change-Id: Id01de29aa9a9b37e6cbbff0cd0a047416b84c5be
Jakub Pawlowski [Thu, 15 Jun 2017 17:53:19 +0000 (17:53 +0000)]
Fix btm_ble_get_acl_remote_addr
am:
a6fad9c196
Change-Id: I97fb9f6ad72a2b7aecbf7bb9c3fdcffcb8d786f9
Treehugger Robot [Thu, 15 Jun 2017 17:50:28 +0000 (17:50 +0000)]
Merge "Bluetooth 5: Update LE2M implementation through DM (3/3)"
Jakub Pawlowski [Thu, 15 Jun 2017 17:14:16 +0000 (17:14 +0000)]
Fix bad comparison in btm_ble_refresh_local_resolvable_private_addr
am:
3a30c69ead
Change-Id: Ib7e23f745c467e63b1099a1d922ae6551876c51a
Avish Shah [Thu, 13 Apr 2017 11:45:20 +0000 (17:15 +0530)]
Bluetooth 5: Update LE2M implementation through DM (3/3)
This patch moves LE2M implementation to the DM instead of tied to GATT.
Below are the reasons to make this change:
1) Per link setting usually be done under DM, such as link policy etc.
2) In the future, if LECOC is coming to use in more profile/apps,
we can not rely on GATT API for these. Separate API should be required.
3) we could have multiple logical GATT user on top of the same link.
4) Also this will avoid duplicating all the APIs on GATTC and GATTS.
Bug:
37586939
Test: sl4a PhyTest passed
Change-Id: I7330be85d1bb98a4cc66b69462b01c23c9375362
Jakub Pawlowski [Thu, 15 Jun 2017 15:32:56 +0000 (08:32 -0700)]
Fix btm_ble_get_acl_remote_addr
Second parameter, conn_addr, should be assigned the value. Right now we
only modify the place in memory where the pointer points to.
This bug was introduced in commit
c2276b06572ab6fc1f900fbb1f41087e77d47e2a
Test: compilation test
Change-Id: If52a6b02f4ad0d88a6461a4d76e4f8317dcaac9f
Jakub Pawlowski [Thu, 15 Jun 2017 15:22:24 +0000 (08:22 -0700)]
Fix bad comparison in btm_ble_refresh_local_resolvable_private_addr
This issue was introduced while switching from BD_ADDR to bt_bdaddr_t
Test: Pairing with BLE mouse
Change-Id: I6f6e2386cbd8449bd38d65d1d9c1c5a0032f2156
Ivan Podogov [Wed, 14 Jun 2017 14:56:21 +0000 (14:56 +0000)]
Fix build breakage from change I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
am:
2e7e691aea
Change-Id: Id89930a5acdf45cea5bb22c1e25854476326bbd2
Ivan Podogov [Wed, 14 Jun 2017 10:40:36 +0000 (11:40 +0100)]
Fix build breakage from change I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
Test: manual build
Change-Id: I7d37ee188d2258e3a52c700c7748b53804cb1c0a
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
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
Jakub Pawlowski [Tue, 13 Jun 2017 23:51:19 +0000 (23:51 +0000)]
Fix HID crashing on no descriptor
am:
378f095217
Change-Id: Idf28228a7f5ef8128baa1171f27be62a913b43c8
Jakub Pawlowski [Tue, 13 Jun 2017 23:51:00 +0000 (23:51 +0000)]
Fix for fugu build
am:
029fd8783b
Change-Id: I1aa8e1ecc0964da835bd3795f99282cd23f3ff13
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
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
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
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
Bailey Forrest [Tue, 13 Jun 2017 20:56:14 +0000 (20:56 +0000)]
Merge "Fix some includes"
am:
107579ae93
Change-Id: I4bdbd6a54e1928856167c570b727b6d28998034d
Treehugger Robot [Tue, 13 Jun 2017 20:36:18 +0000 (20:36 +0000)]
Merge "Fix 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
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
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
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
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
Treehugger Robot [Fri, 9 Jun 2017 22:00:10 +0000 (22:00 +0000)]
Merge "smp: Fix long SMP_Trace_* log messages"
Treehugger Robot [Fri, 9 Jun 2017 21:59:05 +0000 (21:59 +0000)]
Merge "bta: 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
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
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
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
Bailey Forrest [Fri, 9 Jun 2017 04:10:47 +0000 (04:10 +0000)]
Merge "Include used STL header files"
am:
bc363373f6
Change-Id: Ib56d392f7b88d260f7211d13c8d79d84fe62bd2e
Treehugger Robot [Fri, 9 Jun 2017 04:06:00 +0000 (04:06 +0000)]
Merge "Include used STL header files"
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
Treehugger Robot [Fri, 9 Jun 2017 03:08:26 +0000 (03:08 +0000)]
Merge "eSCO: Limit number of retries after mSBC connection failure"
Jakub Pawlowski [Fri, 9 Jun 2017 02:07:39 +0000 (02:07 +0000)]
Merge "GATT write improvements"
am:
34feb41643
Change-Id: I9b950c052af3968138d0476f93b8899d89f31a96
Jakub Pawlowski [Fri, 9 Jun 2017 02:01:29 +0000 (02:01 +0000)]
Merge "GATT write improvements"
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
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
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
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
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
Jakub Pawlowski [Thu, 8 Jun 2017 23:07:23 +0000 (23:07 +0000)]
Merge "Add tracking of periodic_enable in adv_inst"
am:
a50c91ad0d
Change-Id: Idc80f7c7bab0bc88b81176ad6a631415d20cdad5
Jakub Pawlowski [Thu, 8 Jun 2017 22:58:56 +0000 (22:58 +0000)]
Merge "Add tracking of periodic_enable in adv_inst"
Jakub Pawlowski [Thu, 8 Jun 2017 22:46:33 +0000 (22:46 +0000)]
Merge "gatt_api minor style fixes"
am:
c2a3b46b3a
Change-Id: If76bcc6faeecf8597f56b171535752d64f04e0a1
Jakub Pawlowski [Thu, 8 Jun 2017 22:46:14 +0000 (22:46 +0000)]
Merge "Don't handle server respons after it was deallocated"
am:
6d150a149d
Change-Id: I2a21c1b1585b986d9cb07f3c3beb40a45caed7e6
Jakub Pawlowski [Thu, 8 Jun 2017 22:43:23 +0000 (22:43 +0000)]
Merge "gatt_api minor style fixes"
Jakub Pawlowski [Thu, 8 Jun 2017 22:40:13 +0000 (22:40 +0000)]
Merge "Don't handle server respons after it was deallocated"
Yamei Du [Thu, 8 Jun 2017 19:46:58 +0000 (19:46 +0000)]
Merge "Ensure we don't send more packets than firmware allows"
am:
ec8ab16abe
Change-Id: I6084a7edf6a878b1294099ff76e300fee95bea1e
Ruina Liu [Thu, 8 Jun 2017 19:46:41 +0000 (19:46 +0000)]
Merge "Fix transport quota exhaustion"
am:
0a0ee916fd
Change-Id: Id0cc56113fb8c883af4987ec0910c29c7f0a61d9
Treehugger Robot [Thu, 8 Jun 2017 19:41:33 +0000 (19:41 +0000)]
Merge "Ensure we don't send more packets than firmware allows"
Treehugger Robot [Thu, 8 Jun 2017 19:39:00 +0000 (19:39 +0000)]
Merge "Fix transport quota exhaustion"
Jakub Pawlowski [Thu, 8 Jun 2017 19:27:30 +0000 (12:27 -0700)]
gatt_api minor style fixes
Test: compilation test
Change-Id: I7656513b2999cec5aefbb5b9f75e10e9436d0412
Sunny Kapdi [Sat, 3 Jun 2017 01:11:05 +0000 (18:11 -0700)]
Add tracking of periodic_enable in adv_inst
Track state of periodic advertisement similar to
extended advertisement. Make sure periodic adv
is disabled prior to calling remove adv set
Test: net_test_stack_multi_adv
Bug:
62306759
Change-Id: I677211a0bca40e7151c8c7ee138bac623888291d
Zach Johnson [Thu, 8 Jun 2017 18:36:18 +0000 (18:36 +0000)]
Allow blocking AG SCO connects by policy
am:
acdc11cae5
Change-Id: Ic468c3340f1f9b4b71f1267b096a372f9851c0af
Zach Johnson [Wed, 19 Apr 2017 04:03:07 +0000 (21:03 -0700)]
Allow blocking AG SCO connects by policy
Needed for devices that support both HFP AG and HFP HF.
btsnoop logs show the sequence of events leading to failure:
(corroborated by bt logcat)
1. ACL connection with remote phone established on handle 0x01
2. ACL connection with remote headset established on handle 0x02
3. Incoming call in HF role from phone
4. Phone call locally published to telecom
5. Answer incoming call
6. SCO connection established with phone in HF role
7. AG role with headset picks up on call state change to answered
via BTA_AG_IN_CALL_CONN_RES
8. Inside handler for BTA_AG_IN_CALL_CONN_RES, bta_ag_sco_open called
to establish the SCO connection in the AG role with the headset,
stomping on the previous (wanted) SCO connection with the phone.
Fix is to publish the SCO audio route policy to fluoride, so we can
stop 8 from happening.
Bug:
32958838
Test: manual:
received incoming call in HF role, audio worked both ways;
recieved incoming MT call, headset audio in AG role worked both ways
Change-Id: I12961598e8200bd1d5adb46ee8ec3a802114b80a
Yamei Du [Wed, 18 Nov 2015 09:28:07 +0000 (17:28 +0800)]
Ensure we don't send more packets than firmware allows
Make TX complete callback after we've sent the packet
to the lower layers and adjusted our in flight packet
count.
Bug:
26763700
Test: manual
Change-Id: Iaba14a11c1583da2a72769ebd096e0baedf857c3
Ruina Liu [Thu, 24 Sep 2015 02:04:16 +0000 (10:04 +0800)]
Fix transport quota exhaustion
BREDR and BLE use round-robin for link quota.
If you have exhausted one transport's quota,
the break will cause traffic for all transports
to cease.
Change to a continue to prevent this.
Change-Id: I7ca739dfbf02acd2e30527c16ca616a7bad70c51
Test: manual
CR-Id: ALPS02303646
Jakub Pawlowski [Thu, 8 Jun 2017 17:22:51 +0000 (10:22 -0700)]
Don't handle server respons after it was deallocated
After a request is send to the GATT server, it might timeout, or get
cancelled, i.e. by client unregistering. If a response to such request
is later received, it should not be parsed. Currently such response is
parsed, and can call the response callback again, also on already
unregistered app.
Test: compilation test
Change-Id: Ia76770a693cd35d49973462c4d233d70f8a4e165
Jakub Pawlowski [Thu, 8 Jun 2017 17:51:34 +0000 (17:51 +0000)]
Merge changes If7a360bf,Ibc20c110
am:
206e9d8412
Change-Id: I395a3aaee058bdf0d8f14082451d021ddcb9609c
Jakub Pawlowski [Thu, 8 Jun 2017 17:43:54 +0000 (17:43 +0000)]
Merge changes If7a360bf,Ibc20c110
* changes:
gatt_cleanup_upon_disc refactor
Simplify read/write start
Bailey Forrest [Thu, 8 Jun 2017 03:46:28 +0000 (03:46 +0000)]
Merge "Misc native service changes"
am:
842574c91e
Change-Id: Iccf1fc5a6acd1c8b4a543658764ba12917bad8b8
Treehugger Robot [Thu, 8 Jun 2017 03:42:32 +0000 (03:42 +0000)]
Merge "Misc native service changes"
Jakub Pawlowski [Thu, 8 Jun 2017 00:29:26 +0000 (17:29 -0700)]
gatt_cleanup_upon_disc refactor
gatt_end_operation internally always call gatt_clcb_dealloc. Make sure
both those methods don't get called in gatt_cleanup_upon_disc. Also
minor style fixes.
Test: compilation test
Change-Id: If7a360bfd1ac2ccd7bb1565e8efe459333f8f025
Jakub Pawlowski [Sat, 3 Jun 2017 18:04:04 +0000 (11:04 -0700)]
Simplify read/write start
When read or write is started with insuficcient encryption, and the
encryption fails, it will either return immediate error
GATT_NO_RESOURCES, or the operation will be enqueued. In case the
enqueued operation fails again on the BTM_SetEncryption, no callback
will never be called, and no operation error will be returned. The
gatt_end_operation will never get called for the CLCB, and it will never
be freed, causing memory leak.
This patch fixes this by making sure that the call to
gatt_security_check_start always consumes the CLCB - either by executing
operation, queuing it, or returning error. This also ensures that if
BTM_SetEncryption fails, it will always be handled the same way - by
calling the callback.
Test: manual
Change-Id: Ibc20c1101cc7b5b6043e75df93b23a5b24b791e9
Bailey Forrest [Thu, 8 Jun 2017 00:16:46 +0000 (00:16 +0000)]
Add flag to bluetoothtbd to enable bluetooth on startup
am:
e8e6c6ba4b
Change-Id: Ieec57f7a4a023c4f080abc48865357f0b213850b
Bailey Forrest [Wed, 7 Jun 2017 21:41:54 +0000 (14:41 -0700)]
Misc native service changes
Bug: None
Test: Build bluetoothtbd
Change-Id: Ie81e023735799a726a5fdd62c443795beaf3eeac
Bailey Forrest [Wed, 7 Jun 2017 21:50:08 +0000 (14:50 -0700)]
Add flag to bluetoothtbd to enable bluetooth on startup
Bluetooth startup takes a few seconds and it can be done in parallel
during the boot up process.
Bug: None
Test: Test on device.
Change-Id: Ia23bdd6907b6f24d1e3eacb011173acf64a583ed
Jakub Pawlowski [Wed, 7 Jun 2017 21:03:31 +0000 (21:03 +0000)]
Fix GATT over BREDR not connecting
am:
3bd07c3618
Change-Id: Iab8c43982daa098f4587ffd9fda282f499af1df4
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
Jakub Pawlowski [Wed, 7 Jun 2017 18:18:43 +0000 (18:18 +0000)]
Fix loops iteration
am:
bb95a1d622
Change-Id: If6b4c6bc5ff24d61fd4998c618445cb9742915cd
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
Pavlin Radoslavov [Wed, 7 Jun 2017 14:19:44 +0000 (14:19 +0000)]
Disable 48.0kHz sampling rate for AAC
am:
3d268331ae
Change-Id: I8435c13619a686a5da20c063e172d100099db9e4
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
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
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
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
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
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
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
Jakub Pawlowski [Wed, 7 Jun 2017 01:37:14 +0000 (01:37 +0000)]
Refactor tGATT_BG_CONN_DEV
am:
7cfd8391f6
Change-Id: Ie9855cd0da4a631303cb4228928587b4ee3abe99
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
Ting-Yuan Huang [Wed, 7 Jun 2017 00:35:41 +0000 (00:35 +0000)]
Merge "Suppress false compiler warnings"
am:
1e37a045a7
Change-Id: I93f117b739af6a3ab0db85ee310186cdcea689db