OSDN Git Service
Zhihai Xu [Wed, 16 Apr 2014 18:22:08 +0000 (18:22 +0000)]
Merge "increase the bluetooth task priority when start a2dp." into klp-wireless-dev
Zhihai Xu [Wed, 8 Jan 2014 19:45:17 +0000 (11:45 -0800)]
increase the bluetooth task priority when start a2dp.
change the BT task priority based on audio play state.
increase the BT task priority to ANDROID_PRIORITY_URGENT_AUDIO
,when start ad2p audio playing.
to better prevent CPU premption by other process/task(UI).
restore the BT task priority when stop a2dp audio playing.
bug:
12082841
Change-Id: I34e8344cffea87f68987149c820cd3e84a4196d1
Conflicts:
utils/include/bt_utils.h
Sharvil Nanavati [Sat, 5 Apr 2014 07:44:19 +0000 (00:44 -0700)]
Compile using C99.
Change-Id: Ifda03e0b3ee3a915bf7ce5a5dce27e5e215dcce2
Conflicts:
bta/Android.mk
gki/Android.mk
main/Android.mk
stack/Android.mk
test/bluedroidtest/Android.mk
Sharvil Nanavati [Sun, 13 Apr 2014 06:01:10 +0000 (23:01 -0700)]
Remove executable bit on source files.
Change-Id: Id456478aea626f57fed3479346e8fb4dbd0fafa6
Andre Eisenbach [Wed, 5 Mar 2014 23:41:53 +0000 (15:41 -0800)]
DO NOT MERGE: LE: Add status callback function for LE broadcasts
Cherry pick from master
Change-Id: If4342050ce1141a9c2111286e7b3cccdc012a91e
Matthew Xie [Wed, 19 Mar 2014 20:47:12 +0000 (13:47 -0700)]
DO NOT MERGE Revert "external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
This reverts commit
273789bb86ef99f5ce022bb64c601ea4ea6f8bb3.
Change-Id: I29e511a8176979a6bf311206427b94a19f06f284
Matthew Xie [Mon, 24 Feb 2014 14:32:10 +0000 (14:32 +0000)]
am
7d006e6b: am
a69e0ae1: am
47128cf9: Merge "Bluetooth: fix sniff issue with multiple rfcomm connection in same ACL"
* commit '
7d006e6b176172cb370cc183b4f2eab501e85c7c':
Bluetooth: fix sniff issue with multiple rfcomm connection in same ACL
Matthew Xie [Mon, 24 Feb 2014 14:32:10 +0000 (14:32 +0000)]
am
9d368b68: am
1292dd82: am
6bc62a36: Merge "Bluetooth: GAP: Update bonded device info immediately on NVRAM"
* commit '
9d368b68841dee6e6f581a3890433dcdc022fbb8':
Bluetooth: GAP: Update bonded device info immediately on NVRAM
Matthew Xie [Mon, 24 Feb 2014 14:29:02 +0000 (14:29 +0000)]
am
a69e0ae1: am
47128cf9: Merge "Bluetooth: fix sniff issue with multiple rfcomm connection in same ACL"
* commit '
a69e0ae1107e3148542a76ac840f3bcaa8ee2661':
Bluetooth: fix sniff issue with multiple rfcomm connection in same ACL
Matthew Xie [Mon, 24 Feb 2014 14:29:02 +0000 (14:29 +0000)]
am
1292dd82: am
6bc62a36: Merge "Bluetooth: GAP: Update bonded device info immediately on NVRAM"
* commit '
1292dd82812d76c54568796fbdafd1fdadc816eb':
Bluetooth: GAP: Update bonded device info immediately on NVRAM
Matthew Xie [Mon, 24 Feb 2014 14:25:25 +0000 (14:25 +0000)]
am
47128cf9: Merge "Bluetooth: fix sniff issue with multiple rfcomm connection in same ACL"
* commit '
47128cf95b72eedb7a6da29687b1ff6b668b59d6':
Bluetooth: fix sniff issue with multiple rfcomm connection in same ACL
Matthew Xie [Mon, 24 Feb 2014 14:25:25 +0000 (14:25 +0000)]
am
6bc62a36: Merge "Bluetooth: GAP: Update bonded device info immediately on NVRAM"
* commit '
6bc62a368da0a434a4e01f7bcb3273bd52a07568':
Bluetooth: GAP: Update bonded device info immediately on NVRAM
Matthew Xie [Mon, 24 Feb 2014 01:29:59 +0000 (01:29 +0000)]
Merge "Bluetooth: fix sniff issue with multiple rfcomm connection in same ACL"
Matthew Xie [Sun, 23 Feb 2014 22:34:33 +0000 (22:34 +0000)]
Merge "Bluetooth: GAP: Update bonded device info immediately on NVRAM"
Matthew Xie [Sat, 22 Feb 2014 01:22:04 +0000 (01:22 +0000)]
Merge "Bluetooth: Cleanup bt_config.xml during BLE Scan"
Sunny Kapdi [Wed, 20 Nov 2013 22:41:41 +0000 (14:41 -0800)]
Bluetooth: Cleanup bt_config.xml during BLE Scan
BLE Scan needs to clean up the bt_config.xml periodically so that
new entries could be added to bt_config.xml. Also, there is no
need to add BLE Random bd_addr to the bt_config.xml
Change-Id: I00ba2e50dd39a021099052cb569786f6cb2cc8b9
b/
12912008
Pradeep Panigrahi [Wed, 18 Sep 2013 06:55:37 +0000 (12:25 +0530)]
Bluetooth: fix sniff issue with multiple rfcomm connection in same ACL
When there are multiple rfcomm connection with same appid and peer bd
address, we were clearing jv pm control block in addition to closing
connection to service with registered app id. Since appid is common
across all the client and server app registed to jv. we were clearing
entire connection to service for this appid and peer bdadres which was
corrupting sniff logic, when another rfcomm connection exists with same
peer bdaddress. So avoiding closing of connection to the service when
multiple rfcomm connection exists in same ACL.
Change-Id: Id71ef5f7f0e00f1bda3b70a4826c31bef46caafc
Srinu Jella [Thu, 21 Nov 2013 11:40:02 +0000 (17:10 +0530)]
Bluetooth: GAP: Update bonded device info immediately on NVRAM
As the new bt-if config updation have delay in writing items
to the NVRAM, some times there is a chance of not updating
incase of battery removal happens before the actual write onto
NVRAM.
As the bonded device info is important data to store, it will
update bonded info immediately onto NVRAM.
Change-Id: I9699c8225a77d9272420334b4c76b3c1df87e459
Mike J. Chen [Fri, 14 Feb 2014 23:41:11 +0000 (23:41 +0000)]
am
0c880603: am
6a342588: am
136e4b1c: Merge "Don\'t send a dummy 0 HID event when connection is closed" into klp-modular-dev
* commit '
0c880603dba9f9f09523509f19c6808ba8f52e12':
Don't send a dummy 0 HID event when connection is closed
Mike J. Chen [Fri, 14 Feb 2014 23:13:26 +0000 (23:13 +0000)]
am
6a342588: am
136e4b1c: Merge "Don\'t send a dummy 0 HID event when connection is closed" into klp-modular-dev
* commit '
6a342588e9a161ec5347035df7472f1f4a8e86ea':
Don't send a dummy 0 HID event when connection is closed
Mike J. Chen [Fri, 14 Feb 2014 22:54:44 +0000 (22:54 +0000)]
am
136e4b1c: Merge "Don\'t send a dummy 0 HID event when connection is closed" into klp-modular-dev
* commit '
136e4b1c73af97b3f743395da47f137356776090':
Don't send a dummy 0 HID event when connection is closed
Mike J. Chen [Fri, 14 Feb 2014 19:18:11 +0000 (19:18 +0000)]
Merge "Don't send a dummy 0 HID event when connection is closed" into klp-modular-dev
Mike J. Chen [Fri, 14 Feb 2014 02:17:56 +0000 (18:17 -0800)]
Don't send a dummy 0 HID event when connection is closed
This was put there by Broadcom to try to handle held keys
on disconnect, but the best place to do that is in InputManager.
There's no guarantee that a report_id 1 is keyboard, and
in particular it causes game controllers to get a false
joystick move event to 0,0.
Bug
12785130
Change-Id: I85fbafa44d927082def3848132344550e8b94bb0
Signed-off-by: Mike J. Chen <mjchen@google.com>
Matthew Xie [Wed, 12 Feb 2014 23:03:13 +0000 (23:03 +0000)]
am
081ff423: am
aa58a6cf: am
13a01401: Merge "Don\'t leak process-private data on Change Local Name command."
* commit '
081ff423d4b55098adcdb4d1e7786fb719b410bd':
Don't leak process-private data on Change Local Name command.
Matthew Xie [Wed, 12 Feb 2014 22:21:38 +0000 (22:21 +0000)]
am
aa58a6cf: am
13a01401: Merge "Don\'t leak process-private data on Change Local Name command."
* commit '
aa58a6cffbdeed8381d309a4dcb093c42b29fd84':
Don't leak process-private data on Change Local Name command.
Matthew Xie [Wed, 12 Feb 2014 19:22:38 +0000 (19:22 +0000)]
am
13a01401: Merge "Don\'t leak process-private data on Change Local Name command."
* commit '
13a01401b8caaa28c407fe21726adc020cfb6169':
Don't leak process-private data on Change Local Name command.
Mike J. Chen [Wed, 12 Feb 2014 01:25:28 +0000 (01:25 +0000)]
am
dd7e09cf: am
17e40430: am
fab294ca: Merge "Fix bug introduced in last change. GATT define was after BLE_INCLUDED define." into klp-modular-dev
* commit '
dd7e09cf861b0da60a09dfabb665d4001d540bdf':
Fix bug introduced in last change. GATT define was after BLE_INCLUDED define.
Mike J. Chen [Wed, 12 Feb 2014 01:23:02 +0000 (01:23 +0000)]
am
17e40430: am
fab294ca: Merge "Fix bug introduced in last change. GATT define was after BLE_INCLUDED define." into klp-modular-dev
* commit '
17e4043072c6860a58c8da57a6e93685bd6bd14a':
Fix bug introduced in last change. GATT define was after BLE_INCLUDED define.
Mike J. Chen [Wed, 12 Feb 2014 01:20:03 +0000 (01:20 +0000)]
am
fab294ca: Merge "Fix bug introduced in last change. GATT define was after BLE_INCLUDED define." into klp-modular-dev
* commit '
fab294ca83b62c8e258f2bcd91018c31daf377bf':
Fix bug introduced in last change. GATT define was after BLE_INCLUDED define.
Mike J. Chen [Wed, 12 Feb 2014 01:16:10 +0000 (01:16 +0000)]
Merge "Fix bug introduced in last change. GATT define was after BLE_INCLUDED define." into klp-modular-dev
Mike J. Chen [Wed, 12 Feb 2014 01:15:21 +0000 (01:15 +0000)]
am
a89616ab: Fix bug introduced in last change. GATT define was after BLE_INCLUDED define.
* commit '
a89616ab221841dc6f053672e5e1226201dcf209':
Fix bug introduced in last change. GATT define was after BLE_INCLUDED define.
Mike J. Chen [Wed, 12 Feb 2014 00:23:31 +0000 (16:23 -0800)]
Fix bug introduced in last change. GATT define was after BLE_INCLUDED define.
The bug caused GATT_INCLUDED to be FALSE if not already defined.
Looks like the bluedroid codebase really can't support no GATT or SMP
if BLE_INCLUDED is true. Lots of compiler failures (not just warnings but
real failures) if GATT or SMP are not set to TRUE when BLE_INCLUDED is true.
Not cleaning that up at this time but just fixing basic build breakage.
Change-Id: I561cd4dcb2b39e90158ce74e55dca294f55cb540
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Wed, 12 Feb 2014 00:23:31 +0000 (16:23 -0800)]
Fix bug introduced in last change. GATT define was after BLE_INCLUDED define.
The bug caused GATT_INCLUDED to be FALSE if not already defined.
Looks like the bluedroid codebase really can't support no GATT or SMP
if BLE_INCLUDED is true. Lots of compiler failures (not just warnings but
real failures) if GATT or SMP are not set to TRUE when BLE_INCLUDED is true.
Not cleaning that up at this time but just fixing basic build breakage.
Change-Id: I561cd4dcb2b39e90158ce74e55dca294f55cb540
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Tue, 11 Feb 2014 23:32:35 +0000 (23:32 +0000)]
am
e80e4df1: am
b45e54f0: Merge "Fix warnings when BLE_INCLUDED is FALSE" into klp-modular-dev
* commit '
e80e4df1f9b9b60be37ef8ad854d7b46b9dbfb83':
Fix warnings when BLE_INCLUDED is FALSE
Mike J. Chen [Tue, 11 Feb 2014 23:32:35 +0000 (23:32 +0000)]
am
d382270c: am
ef04b8a2: Merge "Set some SMP and GATT to FALSE if BLE is FALSE" into klp-modular-dev
* commit '
d382270cede9188b3cd493cfd9fac093a5efdc9a':
Set some SMP and GATT to FALSE if BLE is FALSE
Mike J. Chen [Tue, 11 Feb 2014 23:29:03 +0000 (23:29 +0000)]
am
b45e54f0: Merge "Fix warnings when BLE_INCLUDED is FALSE" into klp-modular-dev
* commit '
b45e54f09e5496f298bb5c36354dff8ae27925f2':
Fix warnings when BLE_INCLUDED is FALSE
Mike J. Chen [Tue, 11 Feb 2014 23:29:02 +0000 (23:29 +0000)]
am
ef04b8a2: Merge "Set some SMP and GATT to FALSE if BLE is FALSE" into klp-modular-dev
* commit '
ef04b8a221df70ac205184c1f5098c409306556d':
Set some SMP and GATT to FALSE if BLE is FALSE
Mike J. Chen [Tue, 11 Feb 2014 23:24:33 +0000 (23:24 +0000)]
Merge "Fix warnings when BLE_INCLUDED is FALSE" into klp-modular-dev
Mike J. Chen [Tue, 11 Feb 2014 23:24:22 +0000 (23:24 +0000)]
Merge "Set some SMP and GATT to FALSE if BLE is FALSE" into klp-modular-dev
Matthew Xie [Tue, 11 Feb 2014 22:54:03 +0000 (22:54 +0000)]
Merge "Don't leak process-private data on Change Local Name command."
Sharvil Nanavati [Mon, 10 Feb 2014 06:21:48 +0000 (22:21 -0800)]
Don't leak process-private data on Change Local Name command.
The Change Local Name command to the controller doesn't zero out
the contents of the command buffer before setting the contents. As
a result, the controller sees both the new device name and then
random data left over on the heap from previous operations. This
random data may contain sensitive information. Although the device
name is null-terminated, a controller may inadvertently leak the
additional information over the network.
This change fixes the behaviour by zeroing out the entire command
buffer before copying the device name into it. If the device name
doesn't occupy the entire buffer, the rest of it will be zero.
http://b/
12949068
Change-Id: I4dd6ce6dd6709589fcd1e23f974db820820bc8e1
Mike J. Chen [Tue, 11 Feb 2014 21:51:29 +0000 (13:51 -0800)]
Fix warnings when BLE_INCLUDED is FALSE
Change-Id: I27c8ac6d5410159ed6bbef6aca5bf3b9692b0467
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Tue, 11 Feb 2014 21:50:32 +0000 (13:50 -0800)]
Set some SMP and GATT to FALSE if BLE is FALSE
Also add asserts that SMP and GATT are never TRUE
if BLE is FALSE since that would make no sense.
Change-Id: I6530fe0255da0b237daa82b1b0dff286f2c5225d
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Tue, 11 Feb 2014 21:17:06 +0000 (21:17 +0000)]
am
04276619: am
384d6211: Merge "Revert "Make all warnings fatal compilation errors"" into klp-modular-dev
* commit '
04276619fc4286c2b2926adfa5a5f87ab5065ee5':
Revert "Make all warnings fatal compilation errors"
Mike J. Chen [Tue, 11 Feb 2014 21:10:49 +0000 (21:10 +0000)]
am
384d6211: Merge "Revert "Make all warnings fatal compilation errors"" into klp-modular-dev
* commit '
384d62118595b81d081af83d68c7c1de53229768':
Revert "Make all warnings fatal compilation errors"
Mike J. Chen [Tue, 11 Feb 2014 21:05:56 +0000 (21:05 +0000)]
Merge "Revert "Make all warnings fatal compilation errors"" into klp-modular-dev
Mike J. Chen [Tue, 11 Feb 2014 21:01:26 +0000 (13:01 -0800)]
Revert "Make all warnings fatal compilation errors"
This reverts commit
ba1ee422cee82449e675a52a785dac1a9200a3df.
When BLE_INCLUDED is FALSE, we still have a bunch of warnings so
revert until that path is cleaned up.
Mike J. Chen [Tue, 11 Feb 2014 20:19:24 +0000 (20:19 +0000)]
am
3d4f5c71: am
b83a8234: Merge changes Ifc373f95,I95eb887a,I1e6be2ab,Ia6ea939a,I147d0138, ... into klp-modular-dev
* commit '
3d4f5c715204c3c5eeb21e351aff73072000f61e': (24 commits)
Make all warnings fatal compilation errors
Major warnings cleanup
Add macro UNUSED() to bt_utils.h
Fix unused parameter warning in static function
Add "static" to a static function
Fix a number of unused parameter warnings in static functions
Fix bug with wrong parameter passed to logu
Default send_ind_evt should be FALSE
Fix warning "implicit declaration of function 'GAP_BleReadPeerPrefConnParams'"
Fix unused parameter warnings in static functions by changing prototype
Fix some unused parameter warnings in static functions
Fix warnings about implicit declaration of bdcmp and bdcpy
Fix warning "comparison is always true due to limited range of data type"
Fix warning "suggest braces around empty body in an 'if' statement"
Fix warning "comparison is always true due to limited range of data type"
Add a function prototype for btm_ble_test_command_complete
Change argument to return ptr rather than assign to unused local
Fix warning "comparison is always true due to limited range of data type"
Fix warnings about implicit declarations
Fix warning "implicit declaration of function 'bdcmp'"
...
Mike J. Chen [Tue, 11 Feb 2014 20:14:12 +0000 (20:14 +0000)]
am
b83a8234: Merge changes Ifc373f95,I95eb887a,I1e6be2ab,Ia6ea939a,I147d0138, ... into klp-modular-dev
* commit '
b83a823466bf93f7d484f7c8d23513e0e7c1a5a8': (24 commits)
Make all warnings fatal compilation errors
Major warnings cleanup
Add macro UNUSED() to bt_utils.h
Fix unused parameter warning in static function
Add "static" to a static function
Fix a number of unused parameter warnings in static functions
Fix bug with wrong parameter passed to logu
Default send_ind_evt should be FALSE
Fix warning "implicit declaration of function 'GAP_BleReadPeerPrefConnParams'"
Fix unused parameter warnings in static functions by changing prototype
Fix some unused parameter warnings in static functions
Fix warnings about implicit declaration of bdcmp and bdcpy
Fix warning "comparison is always true due to limited range of data type"
Fix warning "suggest braces around empty body in an 'if' statement"
Fix warning "comparison is always true due to limited range of data type"
Add a function prototype for btm_ble_test_command_complete
Change argument to return ptr rather than assign to unused local
Fix warning "comparison is always true due to limited range of data type"
Fix warnings about implicit declarations
Fix warning "implicit declaration of function 'bdcmp'"
...
Mike J. Chen [Tue, 11 Feb 2014 20:10:59 +0000 (20:10 +0000)]
Merge changes Ifc373f95,I95eb887a,I1e6be2ab,Ia6ea939a,I147d0138, ... into klp-modular-dev
* changes:
Make all warnings fatal compilation errors
Major warnings cleanup
Add macro UNUSED() to bt_utils.h
Fix unused parameter warning in static function
Add "static" to a static function
Fix a number of unused parameter warnings in static functions
Fix bug with wrong parameter passed to logu
Default send_ind_evt should be FALSE
Fix warning "implicit declaration of function 'GAP_BleReadPeerPrefConnParams'"
Fix unused parameter warnings in static functions by changing prototype
Fix some unused parameter warnings in static functions
Fix warnings about implicit declaration of bdcmp and bdcpy
Fix warning "comparison is always true due to limited range of data type"
Fix warning "suggest braces around empty body in an 'if' statement"
Fix warning "comparison is always true due to limited range of data type"
Add a function prototype for btm_ble_test_command_complete
Change argument to return ptr rather than assign to unused local
Fix warning "comparison is always true due to limited range of data type"
Fix warnings about implicit declarations
Fix warning "implicit declaration of function 'bdcmp'"
Fix warning "case label value exceeds maximum value for type"
Fix missing initializer warning
Fix missing initializer warning
Fix warning about missing initializer
Mike J. Chen [Sat, 1 Feb 2014 02:16:33 +0000 (18:16 -0800)]
Make all warnings fatal compilation errors
Change-Id: Ifc373f954c8019b1c52d0b1b3636362afb99fff4
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 02:16:59 +0000 (18:16 -0800)]
Major warnings cleanup
Mostly fixing unused parameter warnings.
A few other warnings also fixed like possible use of
unitialized variables (no real issue found, just compiler couldn't
follow the path), signed vs unsigned warning.
Also fixed some typos, indent issues, removal of dead code, etc.
Change-Id: I95eb887aefc4d559d7921f71a0af5f3bfb01ac01
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 02:13:09 +0000 (18:13 -0800)]
Add macro UNUSED() to bt_utils.h
Also include bt_utils.h in some other header files commonly
included by some subsystems.
Change-Id: I1e6be2abae503c4303c92d97eeeb29981beacd10
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 02:09:53 +0000 (18:09 -0800)]
Fix unused parameter warning in static function
Just changed the function to not take the unused parameter
Change-Id: Ia6ea939a45583ad9b8ae83125a0294086fde8909
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 02:08:58 +0000 (18:08 -0800)]
Add "static" to a static function
Change-Id: I147d0138f2871d1fa873184b1e6e8075328a8501
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 02:07:48 +0000 (18:07 -0800)]
Fix a number of unused parameter warnings in static functions
Since functions were static, just changed them to not take
the unused parameters.
Change-Id: I2f39684d84b1785d60167e617bc5fa79aeac4dda
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 02:02:14 +0000 (18:02 -0800)]
Fix bug with wrong parameter passed to logu
Caught by compiler warning "passing argument 2 of 'logu' from incompatible pointer type".
Change-Id: If6047654c9862209d3426f832a366ac884b2c9e9
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 01:58:14 +0000 (17:58 -0800)]
Default send_ind_evt should be FALSE
Bug found when looking at compiler warning about p_mcb might
be used before being initialized.
Change-Id: I6f74a3c9bb46e757d2420cc871bfe78e51256c3b
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 01:49:43 +0000 (17:49 -0800)]
Fix warning "implicit declaration of function 'GAP_BleReadPeerPrefConnParams'"
Change-Id: I0e4e45d6f0ade8deb070e610baac2d1945ebc1a5
Signed-off-by: Mike J. Chen <mjchen@google.com>
Elliott Hughes [Mon, 10 Feb 2014 12:51:30 +0000 (12:51 +0000)]
am
7d785aaf: am
a5df8e12: Merge "Accept takes a socklen_t, not an int."
* commit '
7d785aafc130a43cabb0f960166b6a6260e59669':
Accept takes a socklen_t, not an int.
Elliott Hughes [Fri, 7 Feb 2014 22:35:09 +0000 (22:35 +0000)]
am
a5df8e12: Merge "Accept takes a socklen_t, not an int."
* commit '
a5df8e122f4f322d9d1d4e9c14bf998ff2e3406a':
Accept takes a socklen_t, not an int.
Elliott Hughes [Fri, 7 Feb 2014 22:29:57 +0000 (22:29 +0000)]
Merge "Accept takes a socklen_t, not an int."
Elliott Hughes [Fri, 7 Feb 2014 20:23:05 +0000 (12:23 -0800)]
Accept takes a socklen_t, not an int.
Change-Id: I0e89aae4a560c3ed9821cbb4432f56e25f3d1c94
Zhihai Xu [Thu, 6 Feb 2014 23:03:15 +0000 (23:03 +0000)]
am
5fba60a8: resend discovery primary service ATT request with timeout
* commit '
5fba60a8761b28adec2704dcbf69376ebde4f19b':
resend discovery primary service ATT request with timeout
Zhihai Xu [Thu, 6 Feb 2014 04:04:48 +0000 (20:04 -0800)]
resend discovery primary service ATT request with timeout
This is to work around the problem with iphone.
The iphone didn't respond with our first ATT request
(read By group type Request for for primary service).
the clockwork/phone host keep waiting for ATT response until disconnection
from iphone due to timeout.
The workaround is to
resend discovery primary service before disconnection from remote device
when response timeout happen.
This workaround will be better for us to interop with remote BLE device.
bug:
12895830
Change-Id: I236af8eca9790f2dae7098061c74cec55348ca6d
Mike J. Chen [Sat, 1 Feb 2014 01:13:29 +0000 (17:13 -0800)]
Fix unused parameter warnings in static functions by changing prototype
Change-Id: I9cc4646610fd3d25732caac01e8d833724238749
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Sat, 1 Feb 2014 00:37:03 +0000 (16:37 -0800)]
Fix some unused parameter warnings in static functions
Fixed by changing the prototypes of the functions and the
calling location.
Change-Id: Ic27ce9e61f5b66699b59bb14258709cb7ca733a8
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:27:49 +0000 (15:27 -0800)]
Fix warnings about implicit declaration of bdcmp and bdcpy
Change-Id: Ib6ad46f566900d514d63a9538a6a8b1c53f04806
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:27:02 +0000 (15:27 -0800)]
Fix warning "comparison is always true due to limited range of data type"
Change-Id: I4b195607d0cd8ee135b26065eed0eef5407061b6
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:25:12 +0000 (15:25 -0800)]
Fix warning "suggest braces around empty body in an 'if' statement"
The body of an if statement could become empty if the macro body
is NULL and cause the if to apply to the next line instead.
Change-Id: I0bea6a46f29bc2c4dfc6e1fa13dd35b094310294
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:14:08 +0000 (15:14 -0800)]
Fix warning "comparison is always true due to limited range of data type"
Change-Id: I1d59e67f507e676513aa006f265cca9179b7c2fe
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:13:24 +0000 (15:13 -0800)]
Add a function prototype for btm_ble_test_command_complete
To fix warning about implicit declaration when compiling btu_hcif.c
Change-Id: Ia07ae3036c65928b6981becb12e18115f0af7769
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:06:49 +0000 (15:06 -0800)]
Change argument to return ptr rather than assign to unused local
There was a warning about local variable assigned but not used.
I believe this was actually an implementation and API problem.
The function is called "btm_sec_find_bonded_dev" and returns
a BOOLEAN about whether the search succeeded or not. I believe
it should also return a pointer to the dev rec if the search
succeeded, but due to an API definition error, it was just
assigning a local rather than returning the pointer ot the rec.
Also add to btm_int.h a function prototype that was missing
and causing a warning about implicit declaration.
Change-Id: Ifcef3afe3acbe12f4c69472fcedd01b268f644dd
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:06:22 +0000 (15:06 -0800)]
Fix warning "comparison is always true due to limited range of data type"
Change-Id: I191b4c12ea6d4ed7a898b158d2ae26fffdeb471f
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:04:41 +0000 (15:04 -0800)]
Fix warnings about implicit declarations
Two functions were used without including header file
and generating following warnings:
implicit declaration of function 'bta_sys_add_uuid'
implicit declaration of function 'bta_sys_remove_uuid'
Change-Id: I1c36fda7af9e838259b93bd2a29e3547d9df0eb5
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:03:44 +0000 (15:03 -0800)]
Fix warning "implicit declaration of function 'bdcmp'"
Change-Id: Ifc13cfa4b88d8483c58dd955ea69f482b06ec79a
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 23:02:31 +0000 (15:02 -0800)]
Fix warning "case label value exceeds maximum value for type"
Change-Id: I1f8ef599b0d64aafe37d3422a8b43cc66ef0e6fe
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 21:28:58 +0000 (13:28 -0800)]
Fix missing initializer warning
Change-Id: I13e96a25b66a0a789d1adab9e41f2315d294943d
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 21:26:56 +0000 (13:26 -0800)]
Fix missing initializer warning
Change-Id: Id578a65e05a4ec0416940efdb4de2c758ca90206
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Fri, 31 Jan 2014 21:24:49 +0000 (13:24 -0800)]
Fix warning about missing initializer
Change-Id: Ifbee10f3de140d51b42a915cb532b58ea67c66cc
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Tue, 28 Jan 2014 20:44:20 +0000 (20:44 +0000)]
am
e372d9b5: Merge "Fix HID get_report callback support" into klp-modular-dev
* commit '
e372d9b58a288348782d01f534cf6dc81a7934c7':
Fix HID get_report callback support
Mike J. Chen [Tue, 28 Jan 2014 20:40:47 +0000 (20:40 +0000)]
Merge "Fix HID get_report callback support" into klp-modular-dev
Matthew Xie [Tue, 28 Jan 2014 20:39:48 +0000 (20:39 +0000)]
am
7edcc061: am
a94ee494: Merge "Fix calls to pthread_setschedparam."
* commit '
7edcc0619bde20dbafa9487ff74c056ce1e6e507':
Fix calls to pthread_setschedparam.
Matthew Xie [Tue, 28 Jan 2014 20:37:33 +0000 (20:37 +0000)]
am
a94ee494: Merge "Fix calls to pthread_setschedparam."
* commit '
a94ee49440718e45147b6b6c26b44dd81d11e1c9':
Fix calls to pthread_setschedparam.
Matthew Xie [Tue, 28 Jan 2014 20:27:06 +0000 (20:27 +0000)]
Merge "Fix calls to pthread_setschedparam."
Mike J. Chen [Fri, 24 Jan 2014 01:56:18 +0000 (17:56 -0800)]
Fix HID get_report callback support
There were multiple bugs in the code for get_report event
callback handling:
1) the p_dev lookup was using the wrong argument so was coming
up with NULL ptr and passing it through to the callback
2) the BT_HDR * was being passed to the callback instead of a
ptr to the payload
3) the size was being passed as a constant BT_HDR_SIZE.
It looked like this code was expecting the callback to parse
the BT_HDR, but that's an internal bluedroid structure.
The callback is defined as receiving the report data and the
report data size, which this change now provides.
Note that the payload might be NULL if the device returns
a HANDSHAKE error msg instead, and so it is valid to pass
the callback a NULL payload ptr and a 0 size.
Change-Id: I462b5cb5d4c460af085dc6e15f59c778a020a80e
Signed-off-by: Mike J. Chen <mjchen@google.com>
Colin Cross [Tue, 28 Jan 2014 01:08:43 +0000 (01:08 +0000)]
am
e0c5396c: am
32d2c034: Merge "external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
* commit '
e0c5396c12e3a42f024b6f7986ffc78a8ac942c3':
external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
Colin Cross [Tue, 28 Jan 2014 01:03:03 +0000 (01:03 +0000)]
am
32d2c034: Merge "external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
* commit '
32d2c03471edb78df635a05bb5bbdc27e9f0e4e1':
external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
Colin Cross [Tue, 28 Jan 2014 00:47:42 +0000 (00:47 +0000)]
Merge "external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
Colin Cross [Sat, 25 Jan 2014 05:00:32 +0000 (21:00 -0800)]
external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
LOCAL_MODULE_PATH doesn't work for multiarch builds, replace it
with LOCAL_MODULE_RELATIVE_PATH.
Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
Sharvil Nanavati [Wed, 22 Jan 2014 08:04:45 +0000 (00:04 -0800)]
Fix calls to pthread_setschedparam.
When the scheduling priority is set to SCHED_NORMAL, you may not
specify a non-zero priority. The current implementation does
exactly that resulting in the call failing and returning EINVAL.
This change ensures that a priority of 0 is set when the desired
scheduler policy is set to SCHED_NORMAL.
http://b/
12304174
Change-Id: I945cae175b7bdd29dd8fc130ff6396b88ec33fcb
Zhihai Xu [Thu, 16 Jan 2014 18:17:08 +0000 (18:17 +0000)]
Merge "the status in the BLE disconnected callback is always success instead of the reason."
Zhihai Xu [Thu, 16 Jan 2014 01:39:29 +0000 (17:39 -0800)]
the status in the BLE disconnected callback is always success instead of the reason.
bug:
12571469
Change-Id: I7b73aae672161cd50d5110daa51a8e04d6f6e841
Zhihai Xu [Thu, 16 Jan 2014 01:38:35 +0000 (01:38 +0000)]
Merge "memory corruption on bluetooth stack."
Zhihai Xu [Wed, 15 Jan 2014 23:49:21 +0000 (15:49 -0800)]
memory corruption on bluetooth stack.
This memory corruption will happen if the remote BLE device name
is more than 249 bytes (the maximum attribute length our BLE support is 600.).
after we send/receive GATT remote device name service attribute.
We will copy upto 600 bytes data to a local name buffer with size of 249.
This will cause serious memory corruption on the stack memory.
bug:
12570982
Change-Id: I5b2ffd5f5a16f4d80d5491e86bf18bf47e30629e
Zhihai Xu [Wed, 15 Jan 2014 23:45:25 +0000 (23:45 +0000)]
Merge "increase the bluetooth task priority when start a2dp."
Zhihai Xu [Wed, 15 Jan 2014 22:04:49 +0000 (22:04 +0000)]
Merge "trouble syncing with fitbit and can't turn off bluetooth."
Zhihai Xu [Wed, 15 Jan 2014 18:28:55 +0000 (10:28 -0800)]
a race condition which can cause potential BT preload timeout.
a race condition which can cause potential BT preload timeout,
When BT startup, bt_hc_worker thread will send BT_EVT_PRELOAD_CMPL
to btu_task. However in bte_main_enable, it first calls
bte_hci_enable(), then creates btu_task. So it may send BT_EVT_PRELOAD_CMPL
before btu_task created. Change creating btu_task before call bte_hci_enable
to make sure btu_task already created successfully before send
BT_EVT_PRELOAD_CMPL.
If this race condition happen, the bluetooth will not be turned on.
bug:
12566357
Change-Id: I245d2df90da0f9da324fc31e371dde8539c0926c
Zhihai Xu [Wed, 15 Jan 2014 01:46:26 +0000 (17:46 -0800)]
trouble syncing with fitbit and can't turn off bluetooth.
this is to work around broadcom firmware problem to handle
unsolicited command complete event for HCI_LE_Create_Connection_Cancel
and LE connection complete event with status error code (0x2)
unknown connection identifier from bluetooth controller
the workaround is to release the HCI connection to avoid out of sync
with bluetooth controller, which cause BT can't be turned off.
bug:
11614046
Change-Id: Ia5c5ad0c6c9b1a4f03253cac8a7caaf21341c88c
Zhihai Xu [Wed, 8 Jan 2014 19:45:17 +0000 (11:45 -0800)]
increase the bluetooth task priority when start a2dp.
change the BT task priority based on audio play state.
increase the BT task priority to ANDROID_PRIORITY_URGENT_AUDIO
,when start ad2p audio playing.
to better prevent CPU premption by other process/task(UI).
restore the BT task priority when stop a2dp audio playing.
bug:
12082841
Change-Id: I34e8344cffea87f68987149c820cd3e84a4196d1