OSDN Git Service
Jakub Pawlowski [Wed, 14 Jun 2017 02:03:08 +0000 (02:03 +0000)]
Fix HID crashing on no descriptor
am:
a87ca9a392
Change-Id: I3ce60e5981bf1111b1aa728cd1c65270f88a8f27
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
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:55:17 +0000 (23:55 +0000)]
Fix HID crashing on no descriptor am:
378f095217
am:
f36f92aefa
Change-Id: I7b0ccee964a5da893e6d1ab206dd159f59dcdafe
Jakub Pawlowski [Tue, 13 Jun 2017 23:55:01 +0000 (23:55 +0000)]
Fix for fugu build am:
029fd8783b
am:
2e6afeb3f5
Change-Id: Ib25a33c43730ad8b3edc44add81ae941143be51b
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 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:32:49 +0000 (21:32 +0000)]
Use bt_bdaddr_t instead of BD_ADDR am:
c2276b0657
am:
47db4290c8
Change-Id: Ib4c1de8b99dd1f87a9e733d868f0a9beacdf9530
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 21:03:20 +0000 (21:03 +0000)]
Merge "Fix some includes" am:
107579ae93
am:
c2eb752327
Change-Id: I6bec00b825c0f5ea13b6fb67c5d551a8782ff02b
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
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
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
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
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
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
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
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)
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
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
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: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
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:12:47 +0000 (04:12 +0000)]
Merge "Include used STL header files" am:
bc363373f6
am:
2ca22380a5
Change-Id: I6e722bc87f432f9c9fb4149cc71812dc77ba2adf
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:14:43 +0000 (03:14 +0000)]
Merge "eSCO: Limit number of retries after mSBC connection failure" am:
c65112de69
am:
ed3c1d992c
Change-Id: Iad9823143556d20a377f642272400fa66286d74c
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"
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
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
Jakub Pawlowski [Fri, 9 Jun 2017 02:10:08 +0000 (02:10 +0000)]
Merge "GATT write improvements" am:
34feb41643
am:
3455ef0449
Change-Id: I12196450ec3b4e9f91fb8b9a00d85e96d3f5b8f5
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:39:21 +0000 (01:39 +0000)]
Ignore the Class Of Device if the value is invalid am:
a052757882
am:
e5056f6592
Change-Id: Ib00d2b697a1790df2040f48a34a7f61b3dfb6190
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
(cherry picked from commit
a052757882927c042399d614bc298f9704ce07a3)
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:09:24 +0000 (23:09 +0000)]
Merge "Add tracking of periodic_enable in adv_inst" am:
a50c91ad0d
am:
c7b55d6d5d
Change-Id: I9a5bb45f4666554e87f34c1364a17ee0685b95ce
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:50:13 +0000 (22:50 +0000)]
Merge "gatt_api minor style fixes" am:
c2a3b46b3a
am:
60b221387d
Change-Id: Ie15a7e79b119d140383a0b1633b1d1b59f775190
Jakub Pawlowski [Thu, 8 Jun 2017 22:49:42 +0000 (22:49 +0000)]
Merge "Don't handle server respons after it was deallocated" am:
6d150a149d
am:
93a67d5a1c
Change-Id: If3054a415fa925c9899796132449ef5cbfb5f337
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:50:31 +0000 (19:50 +0000)]
Merge "Ensure we don't send more packets than firmware allows" am:
ec8ab16abe
am:
33b2e123d8
Change-Id: Icf2812d79b81dcd39df2647841bc6498d5f589ee
Ruina Liu [Thu, 8 Jun 2017 19:50:11 +0000 (19:50 +0000)]
Merge "Fix transport quota exhaustion" am:
0a0ee916fd
am:
33d05d0dbd
Change-Id: Iaeb66d5db775f05578054a8622e89f4cce42d2dd
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:39:14 +0000 (18:39 +0000)]
Allow blocking AG SCO connects by policy am:
acdc11cae5
am:
7d44d990a7
Change-Id: I24c3f5380c00a66ee26337a2c471109f7bdcc084
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:58:45 +0000 (17:58 +0000)]
Fix GATT over BREDR not connecting
am:
e0035727e3
Change-Id: I5b149ca3735db7e951cf7d66c606cac60385646b
Jakub Pawlowski [Thu, 8 Jun 2017 17:55:01 +0000 (17:55 +0000)]
Merge changes If7a360bf,Ibc20c110 am:
206e9d8412
am:
6ce5e1b03e
Change-Id: I5e4f5f205ecb69478761bc3c25d8150cb51b85fc
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 [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:49:28 +0000 (03:49 +0000)]
Merge "Misc native service changes" am:
842574c91e
am:
3f18651236
Change-Id: Icbc22e0fbc729a6bfff7cc38c35f97bee8c872bf
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:18:41 +0000 (00:18 +0000)]
Add flag to bluetoothtbd to enable bluetooth on startup am:
e8e6c6ba4b
am:
c745d07b92
Change-Id: Ia4f49546198d6dd2dab20128bb46012f0da71bdf
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
Pavlin Radoslavov [Wed, 7 Jun 2017 22:05:28 +0000 (22:05 +0000)]
Disable 48.0kHz sampling rate for AAC
am:
ad73569d62
Change-Id: Ie55cf4ad1e3d43e3ce61230f9b6f411d75de8fe6
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:07:25 +0000 (21:07 +0000)]
Fix GATT over BREDR not connecting am:
3bd07c3618
am:
c6045a60d7
Change-Id: Ibc2b0acd48eb1b53538c35e8243466ba2fa3c332
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:24:45 +0000 (18:24 +0000)]
Fix loops iteration am:
bb95a1d622 am:
7bacf13459
am:
b0e90eb7b7
Change-Id: Ie973c611b464e60bbc65d1be48cc745aa61e050f
Jakub Pawlowski [Wed, 7 Jun 2017 18:22:11 +0000 (18:22 +0000)]
Fix loops iteration am:
bb95a1d622
am:
7bacf13459
Change-Id: I8e578684b46fe2faacda3b5f52c5f2de58e138cc
Jakub Pawlowski [Wed, 7 Jun 2017 18:18:43 +0000 (18:18 +0000)]
Fix loops iteration
am:
bb95a1d622
Change-Id: If6b4c6bc5ff24d61fd4998c618445cb9742915cd
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)
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