OSDN Git Service
Casper Bonde [Tue, 9 Jun 2015 22:05:04 +0000 (22:05 +0000)]
am
818d0f2a: SAP: Make it possible to enforce a 16-digit pin code (1/5)
* commit '
818d0f2afb10c75125b0df9ea2bce6108268a269':
SAP: Make it possible to enforce a 16-digit pin code (1/5)
Casper Bonde [Thu, 21 May 2015 09:08:45 +0000 (11:08 +0200)]
SAP: Make it possible to enforce a 16-digit pin code (1/5)
This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.
This is needed for the SIM access profile.
Change-Id: I02886ce284f27295205def3c66fb76372f5dab4f
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Eric Laurent [Fri, 5 Jun 2015 19:59:10 +0000 (19:59 +0000)]
am
15d6b314: Revert "A2DP audio HAL: implement get_presentation_position()"
* commit '
15d6b3144d92167d1f4f88cc87a50c2571a2c166':
Revert "A2DP audio HAL: implement get_presentation_position()"
Eric Laurent [Fri, 5 Jun 2015 18:55:24 +0000 (11:55 -0700)]
Revert "A2DP audio HAL: implement get_presentation_position()"
This reverts commit
0b6c835cab0391f73a453686f4e665dd02661d77.
Bug:
21660426.
Mallikarjuna GB [Fri, 5 Jun 2015 02:05:25 +0000 (02:05 +0000)]
am
74f0bd0e: Initialize btif_max_hf_clients with proper value
* commit '
74f0bd0e8c5cce69690eb7a7c6c7429013082647':
Initialize btif_max_hf_clients with proper value
Mallikarjuna GB [Fri, 5 Jun 2015 01:53:56 +0000 (01:53 +0000)]
am
46d706a9: Fix issues in A2dp, Avrcp, HF and AG reported by static analysis tool
* commit '
46d706a9849dcd027d562200a0a43e6e9156aceb':
Fix issues in A2dp, Avrcp, HF and AG reported by static analysis tool
Mallikarjuna GB [Thu, 21 May 2015 08:54:05 +0000 (14:24 +0530)]
Initialize btif_max_hf_clients with proper value
btif_max_hf_clients which is an unsigned 16bit integer is
initialized with -1(0xFFFF) in btif_hf.c. Later on, when
application calls init with max_hf_clients as 1, btif_max_hf_clients
will be set to 1. But, before this happens, context switch happened
from application context to btif context with btif_max_hf_clients as -1.
In the btif context, BTA_AgRegister gets called in for loop for 0xFFFF
times. We are running out of scbs due to this.
Initialize btif_max_hf_clients with 1. Assign it to max_hf_clients
before context switch happens.
Change-Id: Ibde1bebbab2eb64442027164236f1d82e4269d23
Anubhav Gupta [Fri, 5 Jun 2015 01:35:43 +0000 (01:35 +0000)]
am
1f9dfcbb: Ignore STOP command if A2DP stream is suspended
* commit '
1f9dfcbb526c8d0cba080e02df7c4613b7433f18':
Ignore STOP command if A2DP stream is suspended
Anubhav Gupta [Fri, 5 Jun 2015 01:35:42 +0000 (01:35 +0000)]
am
a4f66355: Remove check for stream type in a2dp hal_callbacks.
* commit '
a4f66355a304e869d22195fb7177756bb2243cff':
Remove check for stream type in a2dp hal_callbacks.
Mallikarjuna GB [Fri, 5 Jun 2015 01:35:41 +0000 (01:35 +0000)]
am
40969d03: Clear remote BD address information.
* commit '
40969d03ffa9cfe67dbd3cec6ce074443638ce4a':
Clear remote BD address information.
Mallikarjuna GB [Fri, 5 Jun 2015 01:35:41 +0000 (01:35 +0000)]
am
0ba8b230: Don\'t stop sniff timer before checking for service ID entry
* commit '
0ba8b2303ed8d0f2c0636befe28b89cfe33169de':
Don't stop sniff timer before checking for service ID entry
Mallikarjuna GB [Fri, 7 Nov 2014 11:22:25 +0000 (16:52 +0530)]
Fix issues in A2dp, Avrcp, HF and AG reported by static analysis tool
- Fixes to validate Array Index Value and Null Pointer
Dereference reported by static analysis tool.
Change-Id: Id1492315f68378fdcfa517bd0a5cacefc8ebfddb
Mallikarjuna GB [Fri, 5 Jun 2015 01:20:49 +0000 (01:20 +0000)]
am
7d29482d: Don\'t initiate sniff in sniff mode
* commit '
7d29482dd040a00be373092a566b0d7c5b4827fb':
Don't initiate sniff in sniff mode
Mallikarjuna GB [Fri, 5 Jun 2015 01:20:48 +0000 (01:20 +0000)]
am
f9a0014f: Updated ATD string parsing
* commit '
f9a0014f94600966dc75e185a4c67fd424e0e24b':
Updated ATD string parsing
Mallikarjuna GB [Fri, 5 Jun 2015 01:20:48 +0000 (01:20 +0000)]
am
16eae386: Stop AG collision timer.
* commit '
16eae38653e9f1bc2e7779dd7d5792adc05d2dbb':
Stop AG collision timer.
Anubhav Gupta [Mon, 17 Nov 2014 01:02:45 +0000 (17:02 -0800)]
Ignore STOP command if A2DP stream is suspended
Ignore STOP command if A2DP stream is already suspended.
Some carkits send STOP command before VOIP call initiation
but don't send PLAY when call ends which hinders DUT to resume
audio playback after call termination.
Change-Id: I41cc1fc6f4b6cfaa1560d729baa0ca27f6dfe8c8
Anubhav Gupta [Tue, 7 Oct 2014 12:58:19 +0000 (18:28 +0530)]
Remove check for stream type in a2dp hal_callbacks.
Stream type is invalid till signalling channel
connection establishment is completed. Do not
check stream type while calling HAL callback.
Change-Id: I69fb19636f3e9bb72202c450dcef9e7bc2e53731
Mallikarjuna GB [Mon, 22 Sep 2014 04:30:36 +0000 (10:00 +0530)]
Clear remote BD address information.
This change makes sure that when RFCOMM
connection fails for HFP, AG control block
clears the remote bd address. This will prevent
the misuse of remote bd address.
Change-Id: I9b14cfe7ae18e72f0972704ac3aa5e915f70ddb3
Mallikarjuna GB [Fri, 5 Jun 2015 01:11:16 +0000 (01:11 +0000)]
am
c380680c: Return ERROR for invalid CHLD command arguments
* commit '
c380680cf4bdfd7cd4befea57f81407fccb88752':
Return ERROR for invalid CHLD command arguments
Anubhav Gupta [Fri, 5 Jun 2015 01:11:16 +0000 (01:11 +0000)]
am
137bed02: Reject second AVRCP connection.
* commit '
137bed026881654febddfa2d797e06ce9f8e58fa':
Reject second AVRCP connection.
Mallikarjuna GB [Fri, 22 May 2015 09:44:25 +0000 (15:14 +0530)]
Don't stop sniff timer before checking for service ID entry
- Avoid stopping sniff timer before checking for service
ID entry for which bta_sys_conn_close is called since if
entry is not present we return without re-starting timer
and ACL doesn't go into sniff.
Change-Id: I063da8e58e067ade5d646debf086bb443066106c
Mallikarjuna GB [Thu, 21 May 2015 13:37:30 +0000 (19:07 +0530)]
Don't initiate sniff in sniff mode
This change makes sure that AG does not retry
to intiate sniff if device is already in remote
initiated sniff mode.
Change-Id: I77a0c4c0aaf2e93e3168f49998fe22a971d46212
Mallikarjuna GB [Thu, 21 May 2015 13:47:06 +0000 (19:17 +0530)]
Updated ATD string parsing
This change makes sure that the Dial string
parsing accepts 'pause' and 'wait' characters
too.
Change-Id: Ie56b355199a3d4292d0ee9913852292147ccf55f
Mallikarjuna GB [Wed, 22 Oct 2014 13:56:41 +0000 (19:26 +0530)]
Stop AG collision timer.
This change makes sure to stop collision
timer of AG when cleanup is happening
while BT turn off.
Change-Id: Ia877f98ba3136ec3278cbec5ab0d7ef2abfc6ed5
Anubhav Gupta [Fri, 5 Jun 2015 00:55:31 +0000 (00:55 +0000)]
am
d81bd014: Disable SCMST feature for A2DP Sink
* commit '
d81bd014fe76408692ac2f57cf6c1423ae2a2751':
Disable SCMST feature for A2DP Sink
Mallikarjuna GB [Fri, 5 Jun 2015 00:55:30 +0000 (00:55 +0000)]
am
846c48f8: Restarting PM timer for AG while reading OR writing
* commit '
846c48f8a8a648302e0584acfe6e8e222d22fd1d':
Restarting PM timer for AG while reading OR writing
Anubhav Gupta [Fri, 5 Jun 2015 00:55:30 +0000 (00:55 +0000)]
am
d59ee6c2: Set the proper authentication level for AvOpen
* commit '
d59ee6c25920cf9db218f2d5ac46624c69c3ba09':
Set the proper authentication level for AvOpen
Mallikarjuna GB [Thu, 21 May 2015 13:32:39 +0000 (19:02 +0530)]
Return ERROR for invalid CHLD command arguments
Return ERROR for invalid chld commands like "AT+CHLD=!"
or "AT+CHLD=0a" etc. In such cases, held call was getting
terminated.
Change-Id: I93d159b20da7086fac3374ce2e163d1309680045
Anubhav Gupta [Thu, 13 Mar 2014 13:46:29 +0000 (19:16 +0530)]
Reject second AVRCP connection.
This change rejects the RC connection from
second device if the DUT is already connected
to RC of first device.
This addresses the problem of improper closure
of Uinput device on disconnection of Avrcp
to make sure Avrcp passthrough commands work
as desired.
Change-Id: If2e39cd90575baffd0e4442b8e7cd2a91eebdf56
Anubhav Gupta [Thu, 19 Jun 2014 11:20:11 +0000 (16:50 +0530)]
Disable SCMST feature for A2DP Sink
Do not send SCMST enabled in GetCapabilities
for A2dp sink role.
Change-Id: I2bff7e04d852c6d3c8c1b7e1c41ae50ef3ff0543
Mallikarjuna GB [Fri, 22 May 2015 08:31:19 +0000 (14:01 +0530)]
Restarting PM timer for AG while reading OR writing
- Once AG receives any data(eg. AT commands) from
remote device(HF) and sending the response to remote
device, PM(Bluedroid power Manager) timer should be restarted
(stop & start) for AG.
- Increased the sniff timer value to 7 seconds for AV & AG
profiles to avoid sniff related IOT issues.
Change-Id: I8c1b79d272391b3fa34b193477a34d561f4c508d
Anubhav Gupta [Mon, 14 Jul 2014 13:23:37 +0000 (18:53 +0530)]
Set the proper authentication level for AvOpen
During Avopen security was made none hence A2DP
connection was happening without bonding when
DUT is paired with DUT and then pairing entry
is deleted from remote and then only A2dp is
tried to be reconnected from DUT. A2dp appears
to be connected in this usecase but the device
entry is shown in available devices list instead
of paired one.
Changes made from No security to SEC Authenticate
Change-Id: I7fc39fe8acef874f0031c9b78d4269a62b94e4b0
Mallikarjuna GB [Thu, 4 Jun 2015 20:49:10 +0000 (20:49 +0000)]
am
8a67ac70: Don\'t open SCO for 2nd MO call if a call is active
* commit '
8a67ac702cd4d4a4cbebd1e765800141b84e6fc0':
Don't open SCO for 2nd MO call if a call is active
Mallikarjuna GB [Thu, 4 Jun 2015 20:49:09 +0000 (20:49 +0000)]
am
2d0d790c: Don\'t close SCO for MO calls
* commit '
2d0d790ca98b6c46be085e1e0a3e6d16ebd8cddf':
Don't close SCO for MO calls
Mallikarjuna GB [Fri, 19 Sep 2014 14:57:17 +0000 (20:27 +0530)]
Don't open SCO for 2nd MO call if a call is active
When user dials a 2nd call, do not open SCO if 1st call was
active on DUT earpiece or speaker.
Change-Id: I974f5bcf917e6972705e60cf1da195eae23f885a
Mallikarjuna GB [Thu, 4 Jun 2015 20:19:48 +0000 (20:19 +0000)]
am
c8c082b7: SCO connection should happen after SLC.
* commit '
c8c082b730910b64dbc38a7ee89bb141be46daa6':
SCO connection should happen after SLC.
Andre Eisenbach [Thu, 4 Jun 2015 20:19:47 +0000 (20:19 +0000)]
am
e1ded77a: Fix compile error in bta_ag_sco.c
* commit '
e1ded77ae6d10854dc2bd1aebdd9b53442cc4ba4':
Fix compile error in bta_ag_sco.c
Mallikarjuna GB [Tue, 28 Oct 2014 17:43:51 +0000 (23:13 +0530)]
Don't close SCO for MO calls
This change removes condition to disconnect SCO
when MO call process is started.
Change-Id: I2af4ab82c097c7d9ce1bc892bdf40cc09ff6d97e
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:27 +0000 (19:22 +0000)]
am
5b675bc4: Create listen SCO for HS1 if HS2 disconnects during SCO xfer
* commit '
5b675bc41986a159023c51b561e81939f0632f95':
Create listen SCO for HS1 if HS2 disconnects during SCO xfer
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:26 +0000 (19:22 +0000)]
am
902ba021: Don\'t open SCO on state change for multi party call on DUT.
* commit '
902ba02141c5cea3320ec1746c0fe0fad80122bc':
Don't open SCO on state change for multi party call on DUT.
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:25 +0000 (19:22 +0000)]
am
d288b2af: Reset sniff subrating while in SCO
* commit '
d288b2af6bf5ebb41554f223adf2e7f536d2f1e5':
Reset sniff subrating while in SCO
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:24 +0000 (19:22 +0000)]
am
a7ce13fe: Open SCO for held call.
* commit '
a7ce13feaa2a84ff329f2bbd4ab964f0f6d54f0a':
Open SCO for held call.
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:24 +0000 (19:22 +0000)]
am
7b0bfd32: Update call state before opening SCO.
* commit '
7b0bfd32833a8da08069b60e6568aace90778b62':
Update call state before opening SCO.
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:23 +0000 (19:22 +0000)]
am
d345bb20: Handle multi party call states
* commit '
d345bb208fe35923b60bca6af76b0a6e023fc56f':
Handle multi party call states
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:22 +0000 (19:22 +0000)]
am
c2c8a1fc: Update held call state to connected headset
* commit '
c2c8a1fce4a577fc1a14a96fe96cab3043db4140':
Update held call state to connected headset
Mallikarjuna GB [Wed, 8 Oct 2014 08:31:16 +0000 (14:01 +0530)]
SCO connection should happen after SLC.
This change makes sure that SCO audio
connection request is not processed until
HFP SLC connection is done.
Change-Id: Ia2fcad49882deaaf049ae190d90442e5ca7ad71b
Andre Eisenbach [Thu, 4 Jun 2015 18:43:57 +0000 (11:43 -0700)]
Fix compile error in bta_ag_sco.c
Change-Id: I8839ba732560a31a5e8a2351ea4bfb16999cf5ea
Mallikarjuna GB [Thu, 21 May 2015 14:34:46 +0000 (20:04 +0530)]
Create listen SCO for HS1 if HS2 disconnects during SCO xfer
During SCO transfer process from HS1 to HS2, firstly active SCO for
HS1 is disconnected. However, if suddenly HS2 disconnects even
before SCO transfer is complete, listen SCO for HS1 is not created.
This causes further incoming SCO connections from HS1 to be rejected.
The change creates listen SCO for HS1 and moves SCO state properly
to LISTEN.
Change-Id: I0993c1ba1c24b3b7e9c243d179a913d7a0c40446
Mallikarjuna GB [Thu, 21 May 2015 14:20:27 +0000 (19:50 +0530)]
Don't open SCO on state change for multi party call on DUT.
When multi party calls(1 active, 1 held) are ongoing on phone
speaker and any of these call drops, do not open SCO for
other call since user expects call to still remain on phone
speaker.
Change-Id: I9079c809ac665fc1c6e890302e37d23a12f8d4f4
Mallikarjuna GB [Thu, 21 May 2015 13:11:03 +0000 (18:41 +0530)]
Reset sniff subrating while in SCO
Sniff subrating should not be used when link is
in SCO connection. Since the subrating value is
higher, the link would take more time to process
ACL data while in SCO connection causing unwanted
results like delay in SCO disconnects.
Change-Id: I7b964faa397624b65e0158209b8743efe13a6075
Mallikarjuna GB [Sat, 30 May 2015 17:25:18 +0000 (22:55 +0530)]
Open SCO for held call.
Use case:
1. Connect to headset/carkit
2. Make an outgoing call from AG
3. Turn off BT on AG
4. Hold the call from AG
5. Turn on BT on AG (No SCO link is established here)
6. Unhold call from AG (still no SCO link is established)
Failure:
No SCO connection established when held call is there
during headset connection.
Root cause:
SCO is not initiated when SLC is done during held call.
Fix:
AG opens SCO connection when HF connected while in call and
the call was in held state.
Change-Id: I63d7655d26ddbf68cbf94c745df745cffa917b5e
Mallikarjuna GB [Fri, 28 Nov 2014 04:51:15 +0000 (10:21 +0530)]
Update call state before opening SCO.
This change makes sure to update the current
call state before opening SCO connection when
incoming call is answered. Some car kits are
strict in checking this sequence and go in
bad state if not done this way.
Change-Id: Ie744dc26c02d897eaf016ee73022bfc2a0db067e
Mallikarjuna GB [Fri, 22 May 2015 06:26:48 +0000 (11:56 +0530)]
Handle multi party call states
UseCase:
1. Set up Bluetooth connection between phone and remote device.
2. Disconnect BT link by turning off remote device.
3. Start Mo call from phone.
4. Receive MT call from far end.
5. Turn on remote device.
6. BT connection gets established successfully, but audio
doesn't get transferred to headset.
Failure:
Call audio not routed to BT HS. SCO not established.
Root cause:
When a HS connects while in an active call and 2nd call
(incoming/outgoing/alerting) setup ongoing, incorrect post SLC
call setup updates might cause HS to get confused as phone had
already updated correct call states in CIND response during SLC.
This may cause HS to behave abnormally like delayed response to
BCS as seen with jabra wave +.
Fix:
Avoid sending incorrect call updates post SLC since we already
have sent correct updates during SLC as reponse to CIND.
Change-Id: I53e57baf7cca782af6f374a043667971c66a956d
Mallikarjuna GB [Thu, 21 May 2015 12:28:12 +0000 (17:58 +0530)]
Update held call state to connected headset
In a three way call scenario, when an active
call is dropped by remote, the single held call
state is not updated to the connected headset.
This change will make sure that it is updated
properly.
Change-Id: I558602e791279d510edb23989b125cd8f7a7ebde
Casper Bonde [Wed, 3 Jun 2015 04:03:54 +0000 (04:03 +0000)]
am
a954124f: Add support for MITM for BluetoothSockets (4/4)
* commit '
a954124fc5429f259e47258af64e159c621cc6e0':
Add support for MITM for BluetoothSockets (4/4)
Casper Bonde [Thu, 21 May 2015 09:07:52 +0000 (11:07 +0200)]
Add support for MITM for BluetoothSockets (4/4)
This change adds an option to enforce Man-in-the-middle protection
for the authentication process. This feature is needed for the Sim
Access Profile.
Change-Id: I2eda507ffdcb4a194434adedf207e1e9951b80c3
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Pavlin Radoslavov [Wed, 3 Jun 2015 02:22:59 +0000 (02:22 +0000)]
am
56a3be0d: Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free
* commit '
56a3be0d6eaa1bc264736e399fb32d3094f0b513':
Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free
Casper Bonde [Wed, 3 Jun 2015 02:22:12 +0000 (02:22 +0000)]
am
1b0f1077: SAP: Change to use new SDP Api (1/4)
* commit '
1b0f107768ba1a0f93abf68851bacbe650f27eff':
SAP: Change to use new SDP Api (1/4)
Pavlin Radoslavov [Tue, 2 Jun 2015 20:54:58 +0000 (13:54 -0700)]
Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free
There were several leftover places that were still using
malloc/calloc/free .
Those are replaced to use osi_malloc/osi_calloc/osi_free like
majority of the rest of the code.
Note: There are few remaining places that are still using
malloc/calloc/free:
* Some of the unit tests
* audio_a2dp_hw/audio_a2dp_hw.c
It is used as part of the audio.a2dp.default.so library,
and the bluetooth.default.so library
Its usage of malloc/calloc/free should be refactored
independently.
Change-Id: Iafbed996e5f1ae8eb1343fb2acfadf32e515e419
Casper Bonde [Thu, 16 Apr 2015 13:21:27 +0000 (15:21 +0200)]
SAP: Change to use new SDP Api (1/4)
Added support for Sim Access Profile (SAP) in the SDPManager.
To make it easier to test, both SDP record creation and seach
is added.
Change-Id: Idae480fb64224e0e5dec7fb07ff4efb9312a5461
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
Sunny Kapdi [Tue, 2 Jun 2015 18:06:06 +0000 (18:06 +0000)]
am
5feb0af8: Fix memory corruption due to BLE multi-adv macro
* commit '
5feb0af81d30dbcc33ea2ffb10714a58dd0cef09':
Fix memory corruption due to BLE multi-adv macro
Sunny Kapdi [Tue, 2 Jun 2015 05:21:28 +0000 (22:21 -0700)]
Fix memory corruption due to BLE multi-adv macro
INST_ID_IDX_MAX macro was not protected with parenthesis, resulting
in incorrect calculation of the size needed to allocate memory for
the client_if map.
Change-Id: Ib3591f4f9ac7288f2191e9078a71aab431ca7130
Hemant Gupta [Tue, 2 Jun 2015 14:25:08 +0000 (14:25 +0000)]
am
87072892: HID: Handle closing of uhid driver in case failure
* commit '
87072892dc006f4c037aae0a346eda6c18e6b8ba':
HID: Handle closing of uhid driver in case failure
Hemant Gupta [Tue, 2 Jun 2015 14:24:42 +0000 (14:24 +0000)]
am
6ba8fda6: Add proper checks for PAN & BNEP in BD stack
* commit '
6ba8fda60a9137a9f53f7e14edd87184610744fc':
Add proper checks for PAN & BNEP in BD stack
Srinu Jella [Tue, 2 Jun 2015 14:24:23 +0000 (14:24 +0000)]
am
e11f228d: Reset pairing state to idle only for the current device
* commit '
e11f228d1a18486cd00c36487812a763487a236f':
Reset pairing state to idle only for the current device
Pavlin Radoslavov [Tue, 2 Jun 2015 14:22:28 +0000 (14:22 +0000)]
am
a9130e07: Moved the OSI alarm_shutdown() operations to alarm_cleanup()
* commit '
a9130e07646835a8550611bed32138ed79385a38':
Moved the OSI alarm_shutdown() operations to alarm_cleanup()
Pavlin Radoslavov [Tue, 2 Jun 2015 14:21:51 +0000 (14:21 +0000)]
am
b65ec7bd: Disable the OSI allocation tracker.
* commit '
b65ec7bdb30115ce0d39cf7ee1e355b61fc2a360':
Disable the OSI allocation tracker.
Andre Eisenbach [Tue, 2 Jun 2015 14:20:18 +0000 (14:20 +0000)]
am
a250280f: Check transport before subscribing for service changes
* commit '
a250280feff8c8fa28a2e33881a2cdf73540f753':
Check transport before subscribing for service changes
Hemant Gupta [Wed, 19 Nov 2014 13:39:54 +0000 (19:09 +0530)]
HID: Handle closing of uhid driver in case failure
This patch handles closure of the uhid driver in case of following:
- Due to concurrency of disconnection from a conencted device
and an incoming connection request from another device, the error
code for the ACL disconnection becomes HCI_ERR_HOST_REJECT_SECURITY
in the stack.
- On reception of disconnection with that error codes, the uhid driver
was not closed from the btif layer leading to issues in reconnection
with same device that got disconnected.
Change-Id: I13c83757051850cc631aa1c24a036a2e1a4d0087
Hemant Gupta [Wed, 15 Oct 2014 14:29:23 +0000 (19:59 +0530)]
Add proper checks for PAN & BNEP in BD stack
This patch fixes issues for PAN & BNEP in BD stack identified
by static analysis tool.
Change-Id: I29417dae982abb5cef11379f8d03baad11ffde8b
Srinu Jella [Thu, 13 Nov 2014 11:52:28 +0000 (17:22 +0530)]
Reset pairing state to idle only for the current device
Reset the pair state during auth complete for the BD_ADDR of the pairing
device only. The authentication complete event may come for profile level
authetication also. In such cases, if device already in paired state,
there is no need to reset the pairing state.
Change-Id: Id0ef9127895177527a6d4559ad873aa1c62a56bb
Miao Chou [Tue, 2 Jun 2015 05:27:19 +0000 (05:27 +0000)]
am
e35d6ccc: gn-build: Build net_test_device using GN + ninja
* commit '
e35d6ccc58c52279eae36078ba3368d240f3ab1f':
gn-build: Build net_test_device using GN + ninja
Miao Chou [Sat, 30 May 2015 04:16:19 +0000 (21:16 -0700)]
gn-build: Build net_test_device using GN + ninja
This CL adds gtest dependency to device/BUILD.gn to enable building
net_test_device using GN + ninja.
Bug:
21444879
Change-Id: I3760511d884f7b3562f86abcec96f679704ef2f4
Arman Uguray [Tue, 2 Jun 2015 01:57:01 +0000 (01:57 +0000)]
am
6c014aca: gn-build: Get bluetooth.default.so to compile
* commit '
6c014acaabf783f2f07b66695ee8bf510a2fff88':
gn-build: Get bluetooth.default.so to compile
Arman Uguray [Tue, 2 Jun 2015 00:46:58 +0000 (00:46 +0000)]
am
303b6ff1: gn-build: Get //bta:bta to compile
* commit '
303b6ff16e1d257a491d2ae4fac2cd1b78850f67':
gn-build: Get //bta:bta to compile
Arman Uguray [Tue, 2 Jun 2015 00:35:35 +0000 (00:35 +0000)]
am
d30195cb: gn-build: Get btif to compile as its own module
* commit '
d30195cbf09735da593e186c4c99cce6232b072e':
gn-build: Get btif to compile as its own module
Arman Uguray [Fri, 29 May 2015 22:30:13 +0000 (15:30 -0700)]
gn-build: Get bluetooth.default.so to compile
Now that most of the modules here are compiled in their own static libraries,
there is no need to include their sources from main/BUILD.gn. This CL cleans
this up and adds all the missing dependencies for the //main:bluetooth.default
shared library target. Missing includes and non-Android compile errors have
always been fixed.
BUG=
21339022
Change-Id: Ibcc693d5ff17aa9c446db777d4b9fbb706f8c7dd
Arman Uguray [Fri, 29 May 2015 22:49:34 +0000 (15:49 -0700)]
gn-build: Get //bta:bta to compile
This CL gets the //bta:bta target to compile using GN + ninja.
BUG=
21339022
Change-Id: I98e7ab732515b638f4f0c356a62f218ec223662a
Arman Uguray [Fri, 29 May 2015 22:27:58 +0000 (15:27 -0700)]
gn-build: Get btif to compile as its own module
This CL adds support to build //btif:btif as its own target as a static library
by introducing a new module-level BUILD.gn file, adding missing includes, and
conditionally compiling code that is Android-specific (depends on libcutils).
This removes/breaks some functionality on non-Android builds since the
corresponding features are missing until we have a more unified replacement.
BUG=
21339022
Change-Id: Ibb0372da45f256c55fa894fdda3d70319ea008c9
Pavlin Radoslavov [Mon, 1 Jun 2015 23:08:18 +0000 (16:08 -0700)]
Moved the OSI alarm_shutdown() operations to alarm_cleanup()
Also, removed the OSI module's start_up and shut_down steps,
because now they are no-op.
Bug:
21558791
Change-Id: I24259b327f399af57c37937111158baa9704f644
Arman Uguray [Mon, 1 Jun 2015 23:09:51 +0000 (23:09 +0000)]
am
17cd1274: gn-build: Get //udrv:udrv to compile
* commit '
17cd127445af1bd8a89bb1ea419e415392f1eee3':
gn-build: Get //udrv:udrv to compile
Arman Uguray [Mon, 1 Jun 2015 23:09:51 +0000 (23:09 +0000)]
am
6b5811e2: gn-build: Get //embrdv/sbc to compile
* commit '
6b5811e2b4c6369738ad2d58a7d4cf4740d9a298':
gn-build: Get //embrdv/sbc to compile
Arman Uguray [Mon, 1 Jun 2015 23:09:50 +0000 (23:09 +0000)]
am
24253fd1: gn-build: Compile audio.a2dp.default.so
* commit '
24253fd1f10e34e820d2b8bd6c0c78d342dd1591':
gn-build: Compile audio.a2dp.default.so
Arman Uguray [Mon, 1 Jun 2015 23:09:50 +0000 (23:09 +0000)]
am
499282bc: gn-build: Get //utils:utils to compile
* commit '
499282bc6a165ef3aa76bbef4722a833a2aea675':
gn-build: Get //utils:utils to compile
Arman Uguray [Mon, 1 Jun 2015 22:53:50 +0000 (22:53 +0000)]
am
6850e336: gn-build: Get //stack:stack to compile
* commit '
6850e3364800487eb4c7b5f9ab5a6e366a9a11eb':
gn-build: Get //stack:stack to compile
Arman Uguray [Mon, 1 Jun 2015 22:53:49 +0000 (22:53 +0000)]
am
a2647d0f: gn-build: Get HCI and net_test_hci to compile
* commit '
a2647d0f5b0078d95d547a96548462b910bd453c':
gn-build: Get HCI and net_test_hci to compile
Arman Uguray [Mon, 1 Jun 2015 22:48:55 +0000 (22:48 +0000)]
am
2c494e15: gn-build: Clean up GN files
* commit '
2c494e15583364de89ab12f417c19dc2d61efea6':
gn-build: Clean up GN files
Arman Uguray [Mon, 1 Jun 2015 22:48:54 +0000 (22:48 +0000)]
am
bbb12526: gn-build: Add tinyxml2 as a secondary source
* commit '
bbb12526d4810511cb7c79e17fdf75b0884d8c3d':
gn-build: Add tinyxml2 as a secondary source
Arman Uguray [Fri, 29 May 2015 22:24:14 +0000 (15:24 -0700)]
gn-build: Get //udrv:udrv to compile
This patch gets the //udrv:udrv target to compile using GN + ninja as its own
build target. Since this module only contains a single file, keeping it as a
"source_set".
Change-Id: I98c3b78b374f4102b2e6e565841eaa474bef9056
Arman Uguray [Fri, 29 May 2015 22:21:43 +0000 (15:21 -0700)]
gn-build: Get //embrdv/sbc to compile
This CL builds the SBC codec that lives in embdrv/sbc to compile as a static
library. Unlike the Android build that creates two separate libraries for the
encoder and the decoder, the GN build creates a single static library.
BUG=
21339022
Change-Id: I9f12e63339c850d26f49a3756526a185ca7fec8d
Arman Uguray [Fri, 29 May 2015 22:18:11 +0000 (15:18 -0700)]
gn-build: Compile audio.a2dp.default.so
This patch adds the build file to get the audio.a2dp.default shared module to
compile using GN + ninja.
BUG=
21339022
Change-Id: I2c39ee49ca01f023c73b3fa675f6d9d2dc80e133
Arman Uguray [Fri, 29 May 2015 22:10:45 +0000 (15:10 -0700)]
gn-build: Get //utils:utils to compile
This CL conditionally removes the dependency on libcutils to get the
//utils:utils static library target to compile in GN. This technically breaks
the functionality on non-Android platforms until we come up with a common way to
make the logic work.
BUG=
21339022
Change-Id: I47cd8f7991942dbe43a577cef1f95626560f7f72
Pavlin Radoslavov [Mon, 1 Jun 2015 18:42:39 +0000 (11:42 -0700)]
Disable the OSI allocation tracker.
Temporary disable the allocation tracker initialization
(even for BLUEDROID_DEBUG) when initializing Bluetooth.
This is a short-term workaround solution for several issues related to
the usage of the allocation tracker.
* Inconsistent usage of osi_malloc()/osi_calloc() and osi_free()
- Within some of the Bluetooth-related unit tests we have two copies
of the same libosi library: one copy statically linked against the
unit test, and another dlopen() at runtime as part of bluetooth.default.so
Each of those copy has its own static variables.
- For the dlopen() copy we do call allocation_tracker_init(), while for the
static copy within the unit test we don't call allocation_tracker_init()
- Occasionally, there is a memory allocation via osi_calloc()
within the dlopen()-ed library, and then it is osi_free()-ed
within the statically linked library.
Such (mis)usage creates issues in two ways: (1) free()-ing incorrect
pointer, and (2) the osi hash_map() in the dlopen()-ed library still considers
the osi-tracked memory as allocated.
NOTE: (1) could trigger random crashes, while (2) is the reason the unit
test triggers an assert
* Avoid potential issues that could result from the fact that calling
allocation_tracker_init() is not mandatory; i.e., the same
issue described above could be triggered if osi_malloc()/osi_callod()
was called before the call to allocation_tracker_init()
* There is still code that uses malloc(3)/calloc(3) and free(3) instead
of osi_malloc()/osi_calloc() and osi_free()
Also, add missing pthread_mutex_lock()/pthread_mutex_unlock() guards,
and fix the allocation_tracker_uninit() implementation so it works
properly even if void allocation_tracker_init() wasn't called.
Bug:
21561735
Change-Id: Ic83d6cd40af1189c4ee9c1dbfd0ad8e4666e1502
Arman Uguray [Fri, 29 May 2015 22:07:51 +0000 (15:07 -0700)]
gn-build: Get //stack:stack to compile
This CL adds a missing include to get the //stack:stack target to compile.
BUG=
21339022
Change-Id: Ie41816514c97ddcb1e4f1f0b9481364a563d8b9b
Arman Uguray [Fri, 29 May 2015 22:01:38 +0000 (15:01 -0700)]
gn-build: Get HCI and net_test_hci to compile
This CL fixes the HCI module so that the HCI static library and the net_test_hci
unit test can be compiled using GN + ninja.
BUG=
21339022,
21444689
Change-Id: If3d8649b25297880e5e674a2026badb1b0e01fee
Arman Uguray [Fri, 29 May 2015 21:43:20 +0000 (14:43 -0700)]
gn-build: Clean up GN files
Removed unnecessary library and include flags from build files. To make the
initial build outputs more similar to Android, this CL changes the usage of the
GN "source_set" idiom to "static_library". This comes at a performance loss
while keeping the builds similar until we get the whole stack to compile.
BUG=
21339022
Change-Id: I46f70b3b64b2537634a1dbb517a5168566230efb
Marie Janssen [Fri, 29 May 2015 22:23:21 +0000 (22:23 +0000)]
am
b8a38cc4: build: Build net_test_btcore using GN + ninja
* commit '
b8a38cc4be1bc41135cf20b5ad344343fa9ed38c':
build: Build net_test_btcore using GN + ninja
Arman Uguray [Fri, 29 May 2015 22:23:20 +0000 (22:23 +0000)]
am
e4477781: gn-build: Add missing global compiler flags
* commit '
e4477781e54bd54ff8628f5ec1ce4594324c9e9e':
gn-build: Add missing global compiler flags
Arman Uguray [Fri, 29 May 2015 21:30:42 +0000 (14:30 -0700)]
gn-build: Add tinyxml2 as a secondary source
Added tinyxml2 as a secondary source. Moved //build/secondary/testing to
//build/secondary/third_party in the process. This means that all third_party
sources (gtest, tinyxml2) should be placed in a top-level third_party directory.
BUG=
21339022
Change-Id: If324ef1eb0d5061e005f62a80d23fef25e7e78a4
Marie Janssen [Wed, 27 May 2015 19:36:23 +0000 (12:36 -0700)]
build: Build net_test_btcore using GN + ninja
Changes needed:
- add gtest dependency
- add includes to allow build on Goobuntu Trusty
Bug:
21444625
Change-Id: Ic2495258681c6b93de8d4ddb5dfff2c24248b979