OSDN Git Service
Hansong Zhang [Fri, 12 Jan 2018 19:17:13 +0000 (19:17 +0000)]
Merge "Fix unexpected behavior in SDP" into oc-dev am:
02ee3ed2df am:
dada4eefbc
am:
c13a7d179c
Change-Id: Id5df3f342cf280b8041c10bd9c5192f2e19b3140
Hansong Zhang [Fri, 12 Jan 2018 19:11:39 +0000 (19:11 +0000)]
Merge "Fix unexpected behavior in SDP" into oc-dev am:
02ee3ed2df
am:
dada4eefbc
Change-Id: I672f43f0f0c174aa1cb340356a7665ec8be2cfd0
Hansong Zhang [Fri, 12 Jan 2018 19:05:11 +0000 (19:05 +0000)]
Merge "Fix unexpected behavior in SDP" into oc-dev
am:
02ee3ed2df
Change-Id: If02f6da17d32d1a96b2fb9054e1ae955e84c3db2
Hansong Zhang [Fri, 12 Jan 2018 18:59:26 +0000 (18:59 +0000)]
Merge "Fix unexpected behavior in SDP" into oc-dev
Pavlin Radoslavov [Fri, 12 Jan 2018 18:05:43 +0000 (18:05 +0000)]
Allocate/free the SDP connection timers only during stack startup/shutdown am:
0dbe21d88e am:
f51db59dc4
am:
e4138563ef
Change-Id: I3caaf26b41d27530f51aab68373780dc607aa053
Pavlin Radoslavov [Fri, 12 Jan 2018 17:59:28 +0000 (17:59 +0000)]
Allocate/free the SDP connection timers only during stack startup/shutdown am:
0dbe21d88e
am:
f51db59dc4
Change-Id: I6fda9a621d422563e6bb25b2a06b52bf431b1547
Pavlin Radoslavov [Fri, 12 Jan 2018 17:52:55 +0000 (17:52 +0000)]
Allocate/free the SDP connection timers only during stack startup/shutdown
am:
0dbe21d88e
Change-Id: Ia44bc15836dc853b4f6d7a36ef975696b7dbf019
Pavlin Radoslavov [Fri, 12 Jan 2018 01:28:16 +0000 (17:28 -0800)]
Allocate/free the SDP connection timers only during stack startup/shutdown
This avoids freeing the sdp_conn_timer within the alarm callback itself.
Bug:
67110137
Test: Manual
Change-Id: I775b4b532cd42cf207258c53c6052a167a124627
Merged-In: I775b4b532cd42cf207258c53c6052a167a124627
(cherry picked from commit
ef6a4a0c9d9220a7d909863349d7a0c0b967d54c)
Jakub Pawlowski [Fri, 12 Jan 2018 00:30:30 +0000 (00:30 +0000)]
Merge "Refactor l2c_lcc_get_next_xmit_sdu_seg" am:
950dd0323e
am:
54ed9b12a1
Change-Id: I209d1ee7d14c8563b127ccf5a98acb51714e3518
Jakub Pawlowski [Fri, 12 Jan 2018 00:30:11 +0000 (00:30 +0000)]
Merge "L2CAP: Add parameter to indicate last piece of an SDU" am:
27a288f89b
am:
373cc2e16e
Change-Id: I2d01197c817e8075ac0eab99a8d61213a85ccd05
Jakub Pawlowski [Fri, 12 Jan 2018 00:20:58 +0000 (00:20 +0000)]
Merge "Refactor l2c_lcc_get_next_xmit_sdu_seg"
am:
950dd0323e
Change-Id: I1051f0dfbad2dbda72f5b13f22dbffeb00975597
Jakub Pawlowski [Fri, 12 Jan 2018 00:20:37 +0000 (00:20 +0000)]
Merge "L2CAP: Add parameter to indicate last piece of an SDU"
am:
27a288f89b
Change-Id: Iad84b098036daf43758d0f7ae8c264412a470a57
Treehugger Robot [Thu, 11 Jan 2018 23:28:37 +0000 (23:28 +0000)]
Merge "Refactor l2c_lcc_get_next_xmit_sdu_seg"
Treehugger Robot [Thu, 11 Jan 2018 23:21:44 +0000 (23:21 +0000)]
Merge "L2CAP: Add parameter to indicate last piece of an SDU"
Jakub Pawlowski [Wed, 10 Jan 2018 11:11:33 +0000 (03:11 -0800)]
Refactor l2c_lcc_get_next_xmit_sdu_seg
* use "PDU" instead of "segment" in variable names
* simplify computation of first_pdu, last_pdu, no_of_bytes_to_send
* remove unnecessary null checks
Test: manual
Bug:
68359837
Change-Id: Iecf511df2a51c2c103ecb3b524c6ed17910a7062
Jakub Pawlowski [Wed, 10 Jan 2018 10:54:47 +0000 (02:54 -0800)]
L2CAP: Add parameter to indicate last piece of an SDU
This information will be used in future patches to notify packet
completition to upper layers.
Test: manual
Bug:
68359837
Change-Id: Ie4aa937b4da5aa83fa552a8603195a6933d64cc6
Hemant Gupta [Thu, 11 Jan 2018 19:07:11 +0000 (19:07 +0000)]
HID: Update condition for checking LE HID handle validity am:
af94891aa6
am:
2887f8e9a4
Change-Id: I4273bb0a48aa5de0d82287f8d2aadfeb28276743
Hemant Gupta [Thu, 11 Jan 2018 19:05:11 +0000 (19:05 +0000)]
HID: Update condition for checking LE HID handle validity
am:
af94891aa6
Change-Id: I9036068c749c5d35b3605a68db0f79293a3d9c37
Myles Watson [Thu, 11 Jan 2018 18:32:07 +0000 (18:32 +0000)]
Merge "SDP: Pass the bounds to process_service_*_rsp" into oc-dev am:
42fc16e912 am:
685f122dd6
am:
73ab49f213
Change-Id: I3ca16425205f0d66e0a43ad97a5d46aef7b413e9
Myles Watson [Thu, 11 Jan 2018 18:29:35 +0000 (18:29 +0000)]
Merge "SDP: Pass the bounds to process_service_*_rsp" into oc-dev am:
42fc16e912
am:
685f122dd6
Change-Id: I1647550fb07b82131b954994313c8b2f8f1011a7
Myles Watson [Thu, 11 Jan 2018 18:27:34 +0000 (18:27 +0000)]
Merge "SDP: Pass the bounds to process_service_*_rsp" into oc-dev
am:
42fc16e912
Change-Id: I9ca0f453f67a53f56ec86db47976fb28d6cbcf5e
TreeHugger Robot [Thu, 11 Jan 2018 18:23:24 +0000 (18:23 +0000)]
Merge "SDP: Pass the bounds to process_service_*_rsp" into oc-dev
Hemant Gupta [Thu, 11 Jan 2018 09:52:49 +0000 (15:22 +0530)]
HID: Update condition for checking LE HID handle validity
1) Pair and connect with BR/EDR HID devices and LE devices
such that the total number of connected paired devices
becomes 7. It is not required that connection to all devices be
maintained, they can be disconnected as well afterwards.
2) Pair and connect with a new LE device. Connection fails
3) Retry connecting to same LE device. Connection does not go through
4) Turn BT off
Observed Result:
1) LE device cannot be connected in step 2
2) Tombstone in BT while switching off BT with below signature
backtrace:
#00 pc
0000000000092438 /system/lib64/libc.so (ifree+88)
#01 pc
000000000009298c /system/lib64/libc.so (je_free+120)
#02 pc
00000000001b266c /system/lib64/hw/bluetooth.default.so (_Z18osi_free_and_resetPPv+84)
#03 pc
0000000000062f84 /system/lib64/hw/bluetooth.default.so
(_Z17bta_hh_sm_executeP14tBTA_HH_DEV_CBtP12tBTA_HH_DATA+880)
#04 pc
0000000000063120 /system/lib64/hw/bluetooth.default.so (_Z16bta_hh_hdl_eventP6BT_HDR+296)
#05 pc
000000000007bbc4 /system/lib64/hw/bluetooth.default.so (_Z13bta_sys_eventP6BT_HDR+60)
#06 pc
00000000001b4d88 /system/lib64/hw/bluetooth.default.so (_ZL22internal_dequeue_readyPv+80)
#07 pc
00000000001b96f4 /system/lib64/hw/bluetooth.default.so (_ZL11run_reactorP9reactor_ti+312)
#08 pc
00000000001b9590 /system/lib64/hw/bluetooth.default.so (_Z13reactor_startP9reactor_t+80)
#09 pc
00000000001baf24 /system/lib64/hw/bluetooth.default.so (_ZL10run_threadPv+256)
#10 pc
0000000000067bc4 /system/lib64/libc.so (_ZL15__pthread_startPv+36)
#11 pc
000000000001f264 /system/lib64/libc.so (__start_thread+68)
Root Cause:
Wrong conditional check in macro BTA_HH_IS_LE_DEV_HDL_VALID which ignores the condition that max
14 HID devices can be connected and all of them can be LE as well.
Fix:
Update the condition in macro BTA_HH_IS_LE_DEV_HDL_VALID to compare with BTA_HH_MAX_DEVICE instead of
BTA_HH_LE_MAX_KNOWN
Test: Not yet performed, only code and log analysis
Fixes:
71842479
Change-Id: I2b56b6f109787608e25c340150be313f0f5397be
Jakub Pawlowski [Thu, 11 Jan 2018 15:58:54 +0000 (15:58 +0000)]
Fix buffer overflow in GAP_ConnWriteData am:
9f9c47683e
am:
a763e802cf
Change-Id: I19238166b45659f6f9a07f37e2896b2b1a1fe0ac
Jakub Pawlowski [Thu, 11 Jan 2018 15:51:37 +0000 (15:51 +0000)]
Fix buffer overflow in GAP_ConnWriteData
am:
9f9c47683e
Change-Id: Iae50fac27ce79a0a8ef002f465fcf0db59119c79
Jakub Pawlowski [Mon, 8 Jan 2018 21:06:45 +0000 (13:06 -0800)]
Fix buffer overflow in GAP_ConnWriteData
Bug: none
Test: exchange data with MPS>11000
Change-Id: I01c60d6f08529be051e921789c41f7065f45534f
Pavlin Radoslavov [Thu, 11 Jan 2018 01:35:17 +0000 (01:35 +0000)]
Removed alarm callback execution statistics am:
b9ebb4ab26 am:
944a096f7c am:
484a8ff430 am:
dfe7791399 am:
bbe82d4017 -s ours am:
64480abff1 -s ours am:
0dc97a5e67 -s ours
am:
8fad8659a6 -s ours
Change-Id: I2833008990a0e1d48744b2dc8a2e7f16ef39cbde
Pavlin Radoslavov [Thu, 11 Jan 2018 01:32:47 +0000 (01:32 +0000)]
Removed alarm callback execution statistics am:
b9ebb4ab26 am:
944a096f7c am:
484a8ff430 am:
dfe7791399 am:
bbe82d4017 -s ours am:
64480abff1 -s ours
am:
0dc97a5e67 -s ours
Change-Id: I42ad8c214d1f11fe407fe983fe8a028bcb7dec7c
Pavlin Radoslavov [Thu, 11 Jan 2018 01:30:43 +0000 (01:30 +0000)]
Removed alarm callback execution statistics am:
b9ebb4ab26 am:
944a096f7c am:
484a8ff430 am:
dfe7791399 am:
bbe82d4017 -s ours
am:
64480abff1 -s ours
Change-Id: I93ae08d51eefd921262316e39c4531ed21cbc4e6
Pavlin Radoslavov [Thu, 11 Jan 2018 01:26:46 +0000 (01:26 +0000)]
Removed alarm callback execution statistics am:
b9ebb4ab26 am:
944a096f7c am:
484a8ff430 am:
dfe7791399
am:
bbe82d4017 -s ours
Change-Id: Ice40110fbd607769f53dceaa111b61524c4820b7
Pavlin Radoslavov [Thu, 11 Jan 2018 01:23:09 +0000 (01:23 +0000)]
Removed alarm callback execution statistics am:
b9ebb4ab26 am:
944a096f7c am:
484a8ff430
am:
dfe7791399
Change-Id: I3f8f645bfdbb7c27d44dba115dc321a6ab51fc7a
Pavlin Radoslavov [Thu, 11 Jan 2018 01:21:14 +0000 (01:21 +0000)]
Removed alarm callback execution statistics am:
b9ebb4ab26 am:
944a096f7c
am:
484a8ff430
Change-Id: I7a2e3f2fd89c4c7df94f3650768c221f986b2c18
Pavlin Radoslavov [Thu, 11 Jan 2018 01:18:37 +0000 (01:18 +0000)]
Removed alarm callback execution statistics am:
b9ebb4ab26
am:
944a096f7c
Change-Id: I69a82dfa9cc6e3201ffed6cf6761a3a6c1f4ff70
Pavlin Radoslavov [Thu, 11 Jan 2018 01:16:06 +0000 (01:16 +0000)]
Removed alarm callback execution statistics
am:
b9ebb4ab26
Change-Id: I21f70a4a332f9335e609b763f26571c3f74991dd
Pavlin Radoslavov [Thu, 11 Jan 2018 00:46:24 +0000 (00:46 +0000)]
Removed alarm callback execution statistics am:
1772ba8319 am:
052c2ea0f4 -s ours
am:
32690675bd -s ours
Change-Id: I67d3c6dbd41cde366dffb46a1d9d86d6aafbfece
Pavlin Radoslavov [Thu, 11 Jan 2018 00:40:16 +0000 (00:40 +0000)]
Removed alarm callback execution statistics am:
1772ba8319
am:
052c2ea0f4 -s ours
Change-Id: I3448db710b6195be5fa2656b230fd08ef0835f6d
Pavlin Radoslavov [Thu, 11 Jan 2018 00:33:43 +0000 (00:33 +0000)]
Removed alarm callback execution statistics
am:
1772ba8319
Change-Id: If7efaacf80e5b867eba2d5efa263a40a888c1048
Pavlin Radoslavov [Thu, 11 Jan 2018 00:23:50 +0000 (00:23 +0000)]
Removed alarm callback execution statistics
am:
90ffe3f90a
Change-Id: I622f8ec0e19dafd1637f3fdd6fd3ee630c111794
Myles Watson [Wed, 10 Jan 2018 22:16:15 +0000 (14:16 -0800)]
SDP: Pass the bounds to process_service_*_rsp
Test: build
Bug:
68161546
Change-Id: Icf53d4d05f99b5e0a2b3f4d3735b6fbfd62adaa3
Hansong Zhang [Wed, 10 Jan 2018 01:16:35 +0000 (17:16 -0800)]
Fix unexpected behavior in SDP
Bug:
68776054
Bug:
68817966
Test: Bluetooth SDP still works
Change-Id: I4eef22679a313b88d7e8ec463b29dbb592c6b5b9
Jakub Pawlowski [Wed, 10 Jan 2018 21:22:49 +0000 (21:22 +0000)]
Remove duplicated code in l2cap_sock - on_l2cap_write_fixed_done am:
19d30611c4
am:
37c9d5d587
Change-Id: Ie987f35d8526add01767d5f588e573af813adb63
Jakub Pawlowski [Wed, 10 Jan 2018 21:05:02 +0000 (21:05 +0000)]
Remove duplicated code in l2cap_sock - on_l2cap_write_fixed_done
am:
19d30611c4
Change-Id: I595e4b78830248ef813fc285647cfb9f4e8be30a
Pavlin Radoslavov [Mon, 8 Jan 2018 19:37:05 +0000 (11:37 -0800)]
Removed alarm callback execution statistics
Updating the alarm state after the callback returns can be problematic
in case the callback itself deleted the alarm.
Bug:
67110137
Test: Manual
Change-Id: Id4de06eebedb792cadd63d09efb68672e9bddc69
Merged-In: Id4de06eebedb792cadd63d09efb68672e9bddc69
(cherry picked from commit
04574e1cde3b0d46b59b4b6ebab935ac60af9f97)
Pavlin Radoslavov [Mon, 8 Jan 2018 19:37:05 +0000 (11:37 -0800)]
Removed alarm callback execution statistics
Updating the alarm state after the callback returns can be problematic
in case the callback itself deleted the alarm.
Bug:
67110137
Test: Manual
Change-Id: Id4de06eebedb792cadd63d09efb68672e9bddc69
Merged-In: Id4de06eebedb792cadd63d09efb68672e9bddc69
(cherry picked from commit
04574e1cde3b0d46b59b4b6ebab935ac60af9f97)
Pavlin Radoslavov [Mon, 8 Jan 2018 19:37:05 +0000 (11:37 -0800)]
Removed alarm callback execution statistics
Updating the alarm state after the callback returns can be problematic
in case the callback itself deleted the alarm.
Bug:
67110137
Test: Manual
Change-Id: Id4de06eebedb792cadd63d09efb68672e9bddc69
Merged-In: Id4de06eebedb792cadd63d09efb68672e9bddc69
(cherry picked from commit
04574e1cde3b0d46b59b4b6ebab935ac60af9f97)
Jakub Pawlowski [Mon, 8 Jan 2018 09:23:52 +0000 (01:23 -0800)]
Remove duplicated code in l2cap_sock - on_l2cap_write_fixed_done
Test: none
Bug:
68359837
Change-Id: Ic3ebe0b7eebbd0122e7f7751ab3b48d6acf62da6
Jakub Pawlowski [Wed, 10 Jan 2018 13:12:55 +0000 (13:12 +0000)]
Merge "Move repeated code from l2cu_check_channel_congestion into a separate function" am:
8b2fed1b27
am:
b59356f161
Change-Id: I613a25c2a5f312e063273a35d66568ed7175e0a5
Jakub Pawlowski [Wed, 10 Jan 2018 13:09:56 +0000 (13:09 +0000)]
Merge "Move repeated code from l2cu_check_channel_congestion into a separate function"
am:
8b2fed1b27
Change-Id: I51d9f87d4653d5d94ad0c1a9020de147ca092f25
Treehugger Robot [Wed, 10 Jan 2018 13:04:58 +0000 (13:04 +0000)]
Merge "Move repeated code from l2cu_check_channel_congestion into a separate function"
Jakub Pawlowski [Wed, 10 Jan 2018 10:55:42 +0000 (10:55 +0000)]
Merge "Make AdvertiseManager shutdown gracefully" am:
b17a48392c
am:
ab19fbe019
Change-Id: I066ee2fe0e6de6bce666d013dceba7e25e6255d1
Jakub Pawlowski [Wed, 10 Jan 2018 10:52:40 +0000 (10:52 +0000)]
Merge "Make AdvertiseManager shutdown gracefully"
am:
b17a48392c
Change-Id: Ie59144e16b00c6949e0bbcbe2fc51cde5702f13c
Treehugger Robot [Wed, 10 Jan 2018 10:48:27 +0000 (10:48 +0000)]
Merge "Make AdvertiseManager shutdown gracefully"
Jack He [Wed, 10 Jan 2018 03:58:24 +0000 (03:58 +0000)]
Merge "HFP: Print human readable event and state name by default" am:
6d6cf5fb43
am:
0c70a71a45
Change-Id: I7d0b658db102679868b078d2d6a197f6e12d1f0b
Jack He [Wed, 10 Jan 2018 03:58:02 +0000 (03:58 +0000)]
Merge "HFP: Remove used BTA call-in events and methods" am:
5608f53c83
am:
ab200f6831
Change-Id: I9f7fadfd1cb8d7d3463e66d1bf1de1931edc3cf1
Jack He [Wed, 10 Jan 2018 03:55:27 +0000 (03:55 +0000)]
Merge "HFP: Print human readable event and state name by default"
am:
6d6cf5fb43
Change-Id: I1a89332766159d79f025278967021290ff2df183
Jack He [Wed, 10 Jan 2018 03:55:02 +0000 (03:55 +0000)]
Merge "HFP: Remove used BTA call-in events and methods"
am:
5608f53c83
Change-Id: If9ab82df01142945f1e790d20278c35c0848cd36
Treehugger Robot [Wed, 10 Jan 2018 03:47:04 +0000 (03:47 +0000)]
Merge "HFP: Print human readable event and state name by default"
Treehugger Robot [Wed, 10 Jan 2018 03:46:48 +0000 (03:46 +0000)]
Merge "HFP: Remove used BTA call-in events and methods"
Lianchao Song [Wed, 10 Jan 2018 02:49:23 +0000 (02:49 +0000)]
Merge "Fix SIGSEGV during Hands-free client SDP" am:
853a841341
am:
f45ca00da1
Change-Id: Ibb390e74bcfaddae6d119b0f9d9831ca970edf5f
Lianchao Song [Wed, 10 Jan 2018 02:45:49 +0000 (02:45 +0000)]
Merge "Fix SIGSEGV during Hands-free client SDP"
am:
853a841341
Change-Id: I0b8496cfdcb2aa3086e7d59a3d7cb62078997f4f
Treehugger Robot [Wed, 10 Jan 2018 02:40:49 +0000 (02:40 +0000)]
Merge "Fix SIGSEGV during Hands-free client SDP"
Jack He [Sun, 7 Jan 2018 01:00:37 +0000 (17:00 -0800)]
HFP: Print human readable event and state name by default
* Debug log in HFP's BTA code is gated by BTA_AG_SCO_DEBUG and
BTA_AG_DEBUG flags. These are non-standard flags that must be
configured at compile time. Instead, debug logs should be gated by
flags in bt_stack.conf only
* This change enables human readable debug output by default by removing
these flags, and refactor the string conversion functions
Bug:
70538124
Test: runtest bluetooth, native unit tests
Change-Id: I99fd00016020a9c6b14928906f07bca4f0ea482d
Jack He [Wed, 10 Jan 2018 00:25:46 +0000 (16:25 -0800)]
HFP: Remove used BTA call-in events and methods
* Since SCO over HCI is temporarily unsupported on the stack, SCO data
call-in methods are no longer used by the stack and thus should be
removed. For example, bta_ag_ci_sco_data() and BTA_AG_CI_SCO_DATA_EVT.
* Since raw RFCOMM access is disabled, various RFCOMM data call-in
methods are no longer used by the stack and thus should be removed.
For example, bta_ag_ci_rx_data() and BTA_AG_CI_RX_WRITE_EVT
Bug:
70538124
Test: runtest bluetooth, native unit test
Change-Id: Iacd60042e97b1be5f800319723836285eb68b2b9
Jack He [Wed, 10 Jan 2018 00:27:15 +0000 (00:27 +0000)]
HFP: Remove AG RFCOMM data pass through mode am:
3f10b14ea5
am:
2daa33463d
Change-Id: Ie0c39c0c6f6f63902ee15d6b5645bab7840d53a9
Jack He [Wed, 10 Jan 2018 00:27:06 +0000 (00:27 +0000)]
HFP: Remove redundant AG data callout code am:
c4829e81df
am:
6650742194
Change-Id: I4ad9970ad146e335ce101202bbe6c5b7731b429d
Jack He [Wed, 10 Jan 2018 00:26:56 +0000 (00:26 +0000)]
HFP: Add isInbandRingingEnabled() API (3/4) am:
02b28fba44
am:
c61dbe4a8a
Change-Id: I6a047d322219faad61e8781bccf37cac0e42ff28
Jack He [Wed, 10 Jan 2018 00:18:52 +0000 (00:18 +0000)]
HFP: Remove AG RFCOMM data pass through mode
am:
3f10b14ea5
Change-Id: Ic686cb919a37a9a6418ed56ce7f8d9da1d43211c
Jack He [Wed, 10 Jan 2018 00:18:45 +0000 (00:18 +0000)]
HFP: Remove redundant AG data callout code
am:
c4829e81df
Change-Id: I11e7c92839657477654ff7838df050cbdbd1ad13
Jack He [Wed, 10 Jan 2018 00:18:38 +0000 (00:18 +0000)]
HFP: Add isInbandRingingEnabled() API (3/4)
am:
02b28fba44
Change-Id: I49ad1510c1bdf6c9ad44c3611ebdcb13e4ee8eb0
Jack He [Sat, 6 Jan 2018 23:53:29 +0000 (15:53 -0800)]
HFP: Remove AG RFCOMM data pass through mode
* In BTA_AG_PASS_THROUGH mode defined in bta_ag_api.h, RFCOMM data is
passed directly to the upper layer. In this case, AT commands are
parsed in the user application instead of being parsed within the fluoride
stack.
* However, this mode is never used on the stack as btif_hf.cc only call
BTA_AgEnable() with BTA_AG_PARSE parameter value. Currently, AT
commands are only parsed within the fluoride stack
* This change removes this feature since the pass through mode is
never used, tested, nor maintained
Bug:
70538124
Test: runtest bluetooth, native unit tests, no functional change
Change-Id: I921d5ee950e4abadea8433c5b2d5882a99923cb0
Jack He [Sat, 6 Jan 2018 23:31:42 +0000 (15:31 -0800)]
HFP: Remove redundant AG data callout code
* Methods in bta_ag_co.cc are almost empty and should be removed
* Only bta_ag_co_init() calls BTM_WriteVoiceSettings(). This can be
called directly from BTA. The callout wrapper is unnecessary
Bug:
70538124
Test: runtest bluetooth, native unit tests, no functional change
Change-Id: I20ab1c033d18f3405e7efb8446b44153b24f3cb0
Jack He [Sat, 6 Jan 2018 01:18:29 +0000 (17:18 -0800)]
HFP: Add isInbandRingingEnabled() API (3/4)
* Use BluetoothHeadset.isInbandRingingEnabled() API to check whether
in-band ringing is currently enabled in the system when deciding on
audio routes for ringtone
* Use this value obtained in Java layer to initialize native HFP/HSP
stack instead of checking it in native layer
Bug:
71646213
Test: make, toggle in-band ringing from Development Settings and observe
whether Telecom service tries to open SCO when there is an
incoming call
Change-Id: I917537b6d17681151639ff29a56ac9c0c7e0e7e8
Lianchao Song [Fri, 22 Dec 2017 08:55:47 +0000 (16:55 +0800)]
Fix SIGSEGV during Hands-free client SDP
Fixes:
70367002
Change-Id: I2fd7a00551157a000b87c7bbdbc8a2c93cff21c4
Pavlin Radoslavov [Tue, 9 Jan 2018 20:53:51 +0000 (20:53 +0000)]
Run by default the 64-bit unit tests on 64-bit devices am:
e07f3d084d
am:
c92d4961b8
Change-Id: I9266da7ce1db8a88dc864f5d107345aec5797544
Pavlin Radoslavov [Tue, 9 Jan 2018 20:53:29 +0000 (20:53 +0000)]
Disable CFI verification for unit tests that are using gtest+gmock am:
ee021ef64d
am:
6c8fb22537
Change-Id: Ia7e6804c33617ca361b3627a5b480cfdad5d99f8
Pavlin Radoslavov [Tue, 9 Jan 2018 20:46:39 +0000 (20:46 +0000)]
Run by default the 64-bit unit tests on 64-bit devices
am:
e07f3d084d
Change-Id: I14a2c0eeaec519df9bdefe3ada05c48efc3d3198
Pavlin Radoslavov [Tue, 9 Jan 2018 20:46:33 +0000 (20:46 +0000)]
Disable CFI verification for unit tests that are using gtest+gmock
am:
ee021ef64d
Change-Id: I8de3be780406fae5bb0142d3c51c83d38da4d9d3
Jakub Pawlowski [Tue, 9 Jan 2018 11:45:09 +0000 (03:45 -0800)]
Move repeated code from l2cu_check_channel_congestion into a separate function
Test: compilation
Bug:
68359837
Change-Id: I69edf0d549633a2d9d0c73eae4efbaf47d302ab4
Pavlin Radoslavov [Tue, 9 Jan 2018 13:58:53 +0000 (05:58 -0800)]
Run by default the 64-bit unit tests on 64-bit devices
Bug:
71739588
Test: cd system/bt; mm -j 40; test/run_unit_tests.sh
Change-Id: Ie4206a8935456a0b62b7a4b90c7247f398a6a7ef
Pavlin Radoslavov [Tue, 9 Jan 2018 13:36:20 +0000 (05:36 -0800)]
Disable CFI verification for unit tests that are using gtest+gmock
Apparently, the CFI verification crashes unit tests that
are using gtest+gmock. Interestingly, those tests succeed for 32-bit
binaries, and fail for 64-bit binaries.
Bug:
71739588
Test: Running the 64-bit version of the unit tests in test/run_unit_tests.sh
Change-Id: Id1f6b3667b3f9eabb0719e65aea18c6950de63a8
Jakub Pawlowski [Thu, 22 Jun 2017 16:46:18 +0000 (09:46 -0700)]
Make AdvertiseManager shutdown gracefully
If the Bluetooth stack is shutdown while AdvertiseManager has a pending HCI
operation being executed, the callback to that operation might be
executed after the manager was deleted. In order to fix any potential
issues, always use a weak pointer to the advertisement manager. This will
prevent the callbacks from getting executed.
In case of callbacks that are not executed on the AdvertiseManager
instance, one can check if the weak pointer is still valid, and properly
handle the stack shutdown.
Test: BleAdvertisingManagerTest:test_cleanup_during_execution
Change-Id: I8d33de4f64267a880880082c5498375c083addef
Jakub Pawlowski [Mon, 8 Jan 2018 21:35:25 +0000 (21:35 +0000)]
Prevent LE CoC from dropping data when remote MPS>8087 am:
8452b05b1a
am:
0384aae7bb
Change-Id: I02a574f1794b5083307cc357298d6dc4729478a2
Jack He [Mon, 8 Jan 2018 21:14:02 +0000 (21:14 +0000)]
HFP: Add APIs for set and get active device (3/3) am:
9761185772
am:
3b45afe246
Change-Id: Ic41a49abff6ff0049a0eb28bd384798672a102b6
Pavlin Radoslavov [Mon, 8 Jan 2018 21:02:18 +0000 (21:02 +0000)]
Added internal API to get/set the A2DP Active Device am:
5fd3e62821
am:
676734bd45
Change-Id: I3fc5dd1119584a9aebcd361dd8402b7ff07f5e80
Jack He [Mon, 8 Jan 2018 20:21:00 +0000 (20:21 +0000)]
HFP: Use disableinbandringing instead of enableinbandringing am:
72804890b6
am:
985ce35907
Change-Id: I1f17a7fda94728e43d4b6b19448db787f6275a7c
Jakub Pawlowski [Mon, 8 Jan 2018 08:35:58 +0000 (08:35 +0000)]
Prevent LE CoC from dropping data when remote MPS>8087
am:
8452b05b1a
Change-Id: Ifae837ba653efab320d5f6b2b7a10fa15444a0c7
Jakub Pawlowski [Fri, 5 Jan 2018 10:41:36 +0000 (02:41 -0800)]
Prevent LE CoC from dropping data when remote MPS>8087
When using LE Coc through Java socket, one can read MPS from
getMaxTransmitPacketSize(). If this value is bigger than
local device L2CAP_MAX_SDU_LENGTH, data sent to remote will be
truncated. This patch fixes that by using properly big buffer for
receiving data from socket on native side.
Test: connect with device with MPS bigger than MPS, alternatively set
L2CAP_MAX_SDU_LENGTH to i.e. 30 on device during test and try to write
"remote MPS" of bytes to remote device.
Bug:
68359837
Change-Id: I02bef80f0dd0f0d6850704ac7787c5f3f5b9b3ab
Jack He [Sat, 6 Jan 2018 17:52:41 +0000 (17:52 +0000)]
HFP: Add APIs for set and get active device (3/3)
am:
9761185772
Change-Id: I1dc0936d87b7e42f68ab7919f6b8bb245fff905b
Pavlin Radoslavov [Sat, 6 Jan 2018 17:41:24 +0000 (17:41 +0000)]
Added internal API to get/set the A2DP Active Device
am:
5fd3e62821
Change-Id: Ie5ee734f1e471eebcaa4ce07abe35999a068736e
Jack He [Sat, 6 Jan 2018 17:33:13 +0000 (17:33 +0000)]
HFP: Use disableinbandringing instead of enableinbandringing
am:
72804890b6
Change-Id: Ia9187da1a44978410bfcac41eb1b48eb86e2cfaf
Jack He [Thu, 7 Dec 2017 02:35:11 +0000 (18:35 -0800)]
HFP: Add APIs for set and get active device (3/3)
* Add set active device APIs to set active device from Java layer
* Set active device to the first connected device if no one set it
before
* Clear active device on RFCOMM disconnection if active device is the
one getting disconnected
* Currently, the active device value is not used in any functional code
Bug:
68951996
Test: runtest -j40 bluetooth
Change-Id: Id0c00e89178b0f963ed8642e72c7010160dd1d68
Pavlin Radoslavov [Tue, 19 Dec 2017 21:26:22 +0000 (13:26 -0800)]
Added internal API to get/set the A2DP Active Device
1. Call BluetoothA2dp.setActiveDevice(BluetoothDevice device) to set
a connected A2DP device as active.
2. Listen for BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED intent
that will contain the latest active device (in EXTRA_DEVICE field).
If the active device could not be changed, the EXTRA_DEVICE
field could be null.
3. If setActiveDevice() is NOT in-progress, BluetoothA2dp.getActiveDevice()
can be used. If setActiveDevice() is in-progress, the result is undefined.
4. BluetoothA2dp.setActiveDevice() could be called by some other parts of
the system, so interested parties should always listen for
BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED intents and prepared
for active device updates.
Bug:
71555243
Test: Manual
Change-Id: Ia25465e17a4539e940d09523cb621b230abd31e3
Jack He [Thu, 7 Dec 2017 23:15:56 +0000 (15:15 -0800)]
HFP: Use disableinbandringing instead of enableinbandringing
* Use disableinbandringing system property as in-band ringing is enabled
by default so an active user choice would disable it instead of
enabling it
Bug:
65383086
Test: make, try toggling the preference and verify in-band ringing
behavior
Change-Id: I9b10743960c933b223481d2efb68af538689c507
Merged-In: I9b10743960c933b223481d2efb68af538689c507
(cherry picked from commit
71de85091506eeeaab6e73cccf0ebd5bb06f2af1)
Jakub Pawlowski [Fri, 5 Jan 2018 11:24:18 +0000 (11:24 +0000)]
Revert "Use vector instead of raw pointer in l2cap socket write handling" am:
a32cfc9406
am:
ef27326ed4
Change-Id: I28400f163fad55b413a91ad79482f0749a3e84d0
Jakub Pawlowski [Fri, 5 Jan 2018 11:22:16 +0000 (11:22 +0000)]
Revert "Use vector instead of raw pointer in l2cap socket write handling"
am:
a32cfc9406
Change-Id: I82bcb6ba5934527716f86347ab66a924af7d0de7
Jakub Pawlowski [Fri, 5 Jan 2018 09:36:44 +0000 (09:36 +0000)]
Revert "Use vector instead of raw pointer in l2cap socket write handling"
This reverts commit
4da2ff53e694c5bee2973c55bb14eb40f74a9d3d.
Change-Id: Id8a399ec6f7474b92579c4647899e424feeb0d33
Jakub Pawlowski [Fri, 5 Jan 2018 07:31:16 +0000 (07:31 +0000)]
Use vector instead of raw pointer in l2cap socket write handling am:
4da2ff53e6
am:
599477c4c8
Change-Id: I2cfcf4e886237a0c2964a28adb0fd6f041fd42d4
Jakub Pawlowski [Fri, 5 Jan 2018 07:29:10 +0000 (07:29 +0000)]
Use vector instead of raw pointer in l2cap socket write handling
am:
4da2ff53e6
Change-Id: If0bfaed0ee4d1221f9075c94c00c0ef87e756ee9
Jakub Pawlowski [Tue, 31 Oct 2017 06:15:43 +0000 (23:15 -0700)]
Use vector instead of raw pointer in l2cap socket write handling
Currently, when we receive data from upper layers for LE CoC socket,
we store it in memory and pass a raw pointer around, keeping memory
until the write is acknowledged by controller and event is sent back to
btif layer in on_l2cap_write*_done. If anything goes wrong, we might
loose the pointer to the data and have a memory leak.
From now on, we store the data in std::vector and pass its ownership
down the stack. The moment the data is copied into lower layer buffer,
vector is automatically freed. We no longer pass the data back to
on_l2cap_write*_done callback.
Bug:
68359837
Test: compilation test
Change-Id: If34c0fba8d4a040a242b8c655491b8967a03b96a
Yasuyoshi Terui [Fri, 5 Jan 2018 05:52:24 +0000 (05:52 +0000)]
Add to receive BTHF_CALL_STATE_DISCONNECTED at HFP am:
c8da011a74
am:
60ccd1d0b4
Change-Id: I809580e699f8fa9f740b5dba78f5cd696a072793