OSDN Git Service
Nitin Arora [Tue, 10 May 2016 15:16:45 +0000 (15:16 +0000)]
Changes to allow LE key upgrade
am:
6ea4d23280
* commit '
6ea4d232808d04f476b60aa2dcfc935ad4f8398e':
Changes to allow LE key upgrade
Change-Id: Id3e99c6a5fea64432917da824fc8282565de9384
Nitin Arora [Tue, 30 Jun 2015 22:04:23 +0000 (15:04 -0700)]
Changes to allow LE key upgrade
Use Case: Certifiation test cases require the LE key upgrade
to happen when the current MITM level of the device has
been upgraded. In that case, a repairing is performed,
leading to more authenticated LTK.
Test Case: TP/SEC/AUT/BV-17-C
Steps:
1. Perform LE pairing between two devices using no MITM.
2. Change the IO capability of the devices, so that a
repair would involve authentication.
3. Reconnect the devices and expect key upgrade.
Failure:
No key upgrade is seen at reconnection and the devices
continue to use the old key.
Fix:
Added changes to re-calulate the requirement of key
upgrade when the LE channel is already encrypted.
Bug:
27852645
Change-Id: If62f334dcf298b2ce9840e95035b4398cb951c84
Ajay Panicker [Mon, 9 May 2016 18:26:59 +0000 (18:26 +0000)]
Fix undefined usage of snprintf
am:
def4219f08
* commit '
def4219f08f34fd5d930b1b98cfd8e3f29b3fc86':
Fix undefined usage of snprintf
Change-Id: I66b0939e09d2d32f4fbae8cdea6c8a8847d547cc
Ajay Panicker [Mon, 9 May 2016 17:34:30 +0000 (17:34 +0000)]
Remove redefine of ARRAY_SIZE
am:
778d57b7e8
* commit '
778d57b7e8222fff731d7deabed25983d508dc14':
Remove redefine of ARRAY_SIZE
Change-Id: I1ab8580f2cc7d8cf51cf1b7a93733e3b8ec079ef
Ajay Panicker [Thu, 5 May 2016 21:51:34 +0000 (14:51 -0700)]
Fix undefined usage of snprintf
Using a buffer as both the format and output for snprintf could
cause undefinied behaviour on certain platforms. Instead just
use a temporary variable.
Bug:
27882028
Change-Id: If9f96fba4b3447b3248917ab9fb994bd80cbca0f
Pavlin Radoslavov [Mon, 9 May 2016 17:30:19 +0000 (17:30 +0000)]
Update l2c_fcr_clone_buf() to allocate large enough buffer
am:
871e9ba306
* commit '
871e9ba3063530a81ca7ff03e8433c25e1e8c096':
Update l2c_fcr_clone_buf() to allocate large enough buffer
Change-Id: Id80eba1a1bd5fba4b9fa525b05fe59ec0e4be61e
Ajay Panicker [Fri, 6 May 2016 21:01:24 +0000 (14:01 -0700)]
Remove redefine of ARRAY_SIZE
Bug:
28621069
Change-Id: Ie3db0ff733052113493d0e53bb35e2d617c31bff
Pavlin Radoslavov [Mon, 9 May 2016 02:12:53 +0000 (19:12 -0700)]
Update l2c_fcr_clone_buf() to allocate large enough buffer
Apparently, in some parts of the code we assumed the original
buffer size is large enough and we can extend it and write
few more octets at the end.
Bug:
28351270
Change-Id: Idc53d8f68e55808c9f6bf7f18568288304a9bfb9
Jakub Pawlowski [Mon, 9 May 2016 16:05:50 +0000 (16:05 +0000)]
Lower unnecesary high log level
am:
292a62d370
* commit '
292a62d3708900ba83c1789dc2c06d6dfdb0cfac':
Lower unnecesary high log level
Change-Id: I83f1bb9d6797c5cc67bd37746498f221d7933bfb
Jakub Pawlowski [Fri, 6 May 2016 20:26:45 +0000 (13:26 -0700)]
Lower unnecesary high log level
Change-Id: Id4d255d79c844cd8dbf044e5bda073b8f5d784e7
Pavlin Radoslavov [Fri, 6 May 2016 01:24:02 +0000 (01:24 +0000)]
Call BTA_VendorCleanup() during actual cleanup of the stack
am:
58318f48fc
* commit '
58318f48fc93afe606c77f3ef83c7bff83b65bf8':
Call BTA_VendorCleanup() during actual cleanup of the stack
Change-Id: Ib3ba5aea125cc08676cbe3bbea8eac7e0ca90085
Pavlin Radoslavov [Thu, 5 May 2016 23:20:15 +0000 (16:20 -0700)]
Call BTA_VendorCleanup() during actual cleanup of the stack
Previously, BTA_VendorCleanup() was called during the shutdown
process, and this created race condition crashing the stack.
Bug:
28450506
Change-Id: Ibee90d406036862b95d18e2ef00b08b820c70f68
Andre Eisenbach [Thu, 5 May 2016 23:44:37 +0000 (23:44 +0000)]
Merge "Return handle if an RFCOMM port is already open"
am:
6787eb8288
* commit '
6787eb828800e0a0999db3c947e54818bbc1c101':
Return handle if an RFCOMM port is already open
Change-Id: I41aedda07880ee8f25356b39dd1d818d7420498b
Treehugger Robot [Thu, 5 May 2016 23:29:24 +0000 (23:29 +0000)]
Merge "Return handle if an RFCOMM port is already open"
Ajay Panicker [Thu, 5 May 2016 22:41:03 +0000 (22:41 +0000)]
Merge "Fix size of SDP black list array"
am:
f7432dc822
* commit '
f7432dc8225e7085dd194e7a5f99243c019e195b':
Fix size of SDP black list array
Change-Id: I34c18f6c51c2ac189ba456e603c4695f54644236
Treehugger Robot [Thu, 5 May 2016 22:31:40 +0000 (22:31 +0000)]
Merge "Fix size of SDP black list array"
Andre Eisenbach [Thu, 5 May 2016 17:57:44 +0000 (10:57 -0700)]
Return handle if an RFCOMM port is already open
By returning the handle, the upper layer (BTA) will attempt to
disconnect on failure to connect. Thus the attempt to open the port will
still fail, but any subsequent attempts will be able to recover.
Bug:
27204458
Change-Id: I0f8489b98adeb7f5e217201ffbbb35132a66f210
Myles Watson [Thu, 5 May 2016 21:04:57 +0000 (21:04 +0000)]
Allow C++ code to check bt_stack_config options
am:
e8a76f58bc
* commit '
e8a76f58bc176828f1824044eebe33bb0d55b0ce':
Allow C++ code to check bt_stack_config options
Change-Id: I50e07a19968183c523b0d2b5f09d2e11bde08a20
Ajay Panicker [Thu, 5 May 2016 19:51:49 +0000 (12:51 -0700)]
Fix size of SDP black list array
Bug:
28617843
Change-Id: Iff5690e3aae42d9907ed9351f1059461985c8a20
Myles Watson [Thu, 5 May 2016 18:57:54 +0000 (11:57 -0700)]
Allow C++ code to check bt_stack_config options
Stack configuration options are parsed in C.
Bug:
28485365
Change-Id: I046ef5c676256a8da23bf8c0a7d1eeb1e9603c05
Pavlin Radoslavov [Wed, 4 May 2016 23:44:17 +0000 (23:44 +0000)]
Fixed test_periodic_unregister_processing_queue unit test
am:
f5d575c418
* commit '
f5d575c4183dae210876ff0f27a54747367b6a19':
Fixed test_periodic_unregister_processing_queue unit test
Change-Id: I9add4ca7c14f0c03f22e33ad057fe47eb587d849
Pavlin Radoslavov [Wed, 4 May 2016 23:44:16 +0000 (23:44 +0000)]
Avoid NULL pointer usage of startup_future in case of HCI startup timeout
am:
3d1aa9d385
* commit '
3d1aa9d3856342764db13503a07452a79edbaeda':
Avoid NULL pointer usage of startup_future in case of HCI startup timeout
Change-Id: Id2c6442e547ed77ef685f9d0c37137d4d45c0e6c
Pavlin Radoslavov [Wed, 4 May 2016 06:00:15 +0000 (23:00 -0700)]
Fixed test_periodic_unregister_processing_queue unit test
Removed a copy-and-paste check in the
test_periodic_unregister_processing_queue unit test.
The removed check adds little value - it has time-dependency,
and is not robust.
Bug:
26982349
Change-Id: I4adb948713b9946b5eb821d6fe52b7ada1400182
Pavlin Radoslavov [Wed, 4 May 2016 03:20:06 +0000 (20:20 -0700)]
Avoid NULL pointer usage of startup_future in case of HCI startup timeout
Previously, the startup_timer was created within the HCI layer start_up()
function, and after several vendor calls, we created the startup_future
that is used elsewhere. However, if any of the vendor calls blocks for
very long time, the startup_timer will timeout.
The startup_timer_expired() callback will try to use startup_future
that is still NULL, and that will trigger an assert.
The issue is avoided by creating the startup_future right before
the startup_timer is scheduled.
Bug:
28528815
Change-Id: Ib9f2c6581a86d3df0fd4d02d0b4c290663b5cfa1
Pavlin Radoslavov [Wed, 4 May 2016 00:05:52 +0000 (00:05 +0000)]
Merge "Update alarm_unregister_processing_queue() to cancel scheduled alarms"
am:
757b1b48d7
* commit '
757b1b48d72a917443a6eb48dba45075d0e546c9':
Update alarm_unregister_processing_queue() to cancel scheduled alarms
Change-Id: Ifb404ace4b6b24d673f3f67e0270f37f40eddf49
Treehugger Robot [Tue, 3 May 2016 23:57:18 +0000 (23:57 +0000)]
Merge "Update alarm_unregister_processing_queue() to cancel scheduled alarms"
Pavlin Radoslavov [Mon, 2 May 2016 17:52:07 +0000 (10:52 -0700)]
Update alarm_unregister_processing_queue() to cancel scheduled alarms
Update the alarm_unregister_processing_queue() implementation
so it cancels all alarms that are scheduled on the corresponding
queue.
This fixes a race condition during Bluetooth shutdown: if an alarm
expires right after an alarm processing queue is invalidated,
the alarm processing would try to use the invalidated queue.
Added the corresponding unit tests.
Also, added a missing call to alarm_unregister_processing_queue().
Bug:
26982349
Change-Id: I09a111e8080b6dbc354dffa03a487f7a8c578ce6
Jakub Pawlowski [Tue, 3 May 2016 19:57:44 +0000 (19:57 +0000)]
Simplify btif multi adv data handling
am:
1668d204a0
* commit '
1668d204a0da63609fa1affcc86de9b76d0a0f48':
Simplify btif multi adv data handling
Change-Id: I038037fcb58e82aa5fa59359bc905cdc5f3ce55b
Jakub Pawlowski [Tue, 3 May 2016 16:42:34 +0000 (09:42 -0700)]
Simplify btif multi adv data handling
Use static fixed size arrays to transport advertisement data instead of
dynamically allocated ones. This simplifies memory allocation and
cleanup handling.
Bug:
28485365
Change-Id: I3a2642e3b11a272eeec50fd959e10820ea3de74f
Chih-Hung Hsieh [Tue, 3 May 2016 18:48:34 +0000 (18:48 +0000)]
Fix google-explicit-constructor warnings.
am:
0194affe0f
* commit '
0194affe0fb5e0d850206007bd56c6c15d91afae':
Fix google-explicit-constructor warnings.
Change-Id: I40c225f5326a357d5d4887eb779d559f824e13f7
Chih-Hung Hsieh [Tue, 3 May 2016 17:23:34 +0000 (10:23 -0700)]
Fix google-explicit-constructor warnings.
Bug:
28341362
Change-Id: I7ed9eb20b9b378a25a5454ce2ebfa113428baaf4
Jakub Pawlowski [Tue, 3 May 2016 04:26:35 +0000 (04:26 +0000)]
Build fix
am:
f9a8352fd2
* commit '
f9a8352fd2388b582b09fe01c9a4d4094b3c287c':
Build fix
Change-Id: I99e209bcfcc4889b8e0208710245f0746f74929c
Jakub Pawlowski [Tue, 3 May 2016 04:06:16 +0000 (21:06 -0700)]
Build fix
Change-Id: I6fd0ebe5e1d650ef307b22f96869c0004f6c956f
Pavlin Radoslavov [Tue, 3 May 2016 00:08:59 +0000 (00:08 +0000)]
Add read/write timeout to the audio sockets
am:
9fc08748b7
* commit '
9fc08748b716e29d25d9cf1dc2ac918edda14d98':
Add read/write timeout to the audio sockets
Change-Id: I6f38b5230d1ffc1ec43ba722d0584dc51dbc0324
Pavlin Radoslavov [Tue, 3 May 2016 00:08:57 +0000 (00:08 +0000)]
Fix test_set_zero_periodic unit test failure
am:
b290604bd8
* commit '
b290604bd88742c468a52ea4c261e1c74d7380fc':
Fix test_set_zero_periodic unit test failure
Change-Id: I3a92fce4a46d53d615abf54389aac80a5db7144e
Pavlin Radoslavov [Mon, 2 May 2016 20:40:26 +0000 (13:40 -0700)]
Add read/write timeout to the audio sockets
Add read/write timeout of 2 seconds when reading/writing
from/to the audio-related control and data sockets.
Also, removed unnecessary poll(POLLOUT), because it is not needed anymore.
Bug:
27996931
Change-Id: Ib214a85f4837760b17cded155464957f56806bd3
Pavlin Radoslavov [Mon, 2 May 2016 22:53:22 +0000 (15:53 -0700)]
Fix test_set_zero_periodic unit test failure
Removed an "EXPECT_EQ(cb_counter, 0)" statement
right after a timer of value 0 is scheduled.
The EXPECT_EQ statement shouldn't be there,
because by the time it is reached, the callback might
have been called already.
Change-Id: I61fbec96c436787321c6b36006a2bc1c0e627667
Jakub Pawlowski [Mon, 2 May 2016 21:05:14 +0000 (21:05 +0000)]
Convert BTIF code from C to C++
am:
713993d178
* commit '
713993d1784ab7c23aee1fa3cf1ab8676cc0aa69':
Convert BTIF code from C to C++
Change-Id: I5ff141fbb5614e0eee7d0b14af39ba103c008ffa
Jakub Pawlowski [Thu, 21 Apr 2016 20:16:45 +0000 (13:16 -0700)]
Convert BTIF code from C to C++
Modifications required:
* added proper casting
* moved variable definitions before goto statements
* added 'extern "C"' markers where needed
* renamed 'operator' to 'operator_name'
Bug:
28485365
Change-Id: I903357967387207e678866c02e008f047f8263f6
Pavlin Radoslavov [Tue, 26 Apr 2016 22:27:46 +0000 (22:27 +0000)]
Fix issues during cleanup stage of the Bluetooth stack
am:
1bd691c
* commit '
1bd691cb8ae3c23ffe25b5ca1fcfd11b82a9fbda':
Fix issues during cleanup stage of the Bluetooth stack
Change-Id: I454cdfee1d7d618a018652b2dd08d3855d0bb42e
Hemant Gupta [Tue, 26 Apr 2016 21:29:53 +0000 (21:29 +0000)]
HID: Fix compilation error when HID_HOST_REPAGE_WIN is set to 0
am:
6bf5069
* commit '
6bf50692ee2ff80cabb0649142d6627fdc2e9cc5':
HID: Fix compilation error when HID_HOST_REPAGE_WIN is set to 0
Change-Id: I918abff787a202ece8b1aaf627c6f5ec670fe1c7
Pavlin Radoslavov [Tue, 26 Apr 2016 19:18:36 +0000 (12:18 -0700)]
Fix issues during cleanup stage of the Bluetooth stack
* Moved free-ing of bta_av_cb timers from the init function
to the cleanup stage.
* Changed the usage of btif_jni_disassociate() so it is called
synchronously. Its previous usage was complicated -
the function was called asynchronously on a different thread,
and we had to wait on a future for its completion.
* Renamed function btif_shutdown_bluetooth() to
btif_cleanup_bluetooth() to represent better its purpose.
Similarly, bte_main_shutdown() is renamed to bte_main_cleanup()
Also:
* Removed function btif_init_fail(), because it is not used.
* Updated an error log message inside function
btif_in_execute_service_request() so the log information
is accurate and more useful.
* Updated the log messages related to the lifecycle of a module
in btcore/src/module.c
Bug:
26982349
Change-Id: Icd6f159d993bdb9c8ef09bfb5b1386b3d6ea4ff2
Hemant Gupta [Fri, 22 Apr 2016 07:11:39 +0000 (12:41 +0530)]
HID: Fix compilation error when HID_HOST_REPAGE_WIN is set to 0
Update invalid function call to hidh_process_repage_process with
valid function call hidh_try_repage as this was leading to compilation
error when HID_HOST_REPAGE_WIN is set to 0
Change-Id: Ib94233ec83ac30dcae701a16c588a2e2a63cac99
Andre Eisenbach [Tue, 26 Apr 2016 17:51:24 +0000 (17:51 +0000)]
Do not log unsolicited NOOP command complete events
am:
2641ef4
* commit '
2641ef4998c3843c96ebc5e0edd58d1ff5d65df2':
Do not log unsolicited NOOP command complete events
Change-Id: Ia8693958b5a677fe33dae875d08d3af2e1f25d7a
Andre Eisenbach [Tue, 26 Apr 2016 16:51:06 +0000 (09:51 -0700)]
Do not log unsolicited NOOP command complete events
Bug:
27744135
Change-Id: I683e3a9f0a116f83763ebcf4d0583ea1c89ef5b2
Pavlin Radoslavov [Tue, 26 Apr 2016 15:36:44 +0000 (15:36 +0000)]
Fix a race condition during alarm_cleanup()
am:
9334247
* commit '
93342476cae97c085e3f274a8bf1339b523f7132':
Fix a race condition during alarm_cleanup()
Change-Id: I179478479d17f800aa5fcf989b82427fc6e53e2b
Pavlin Radoslavov [Mon, 25 Apr 2016 19:29:29 +0000 (12:29 -0700)]
Fix a race condition during alarm_cleanup()
Fix a race condition inside function alarm_cleanup() that
could be triggered during shutdown.
Also, fix few other issues:
* Add missing "timer_delete(akeup_timer)" statement inside
alarm_cleanup()
* Fix the argument when calling "timer_delete(timer)"
* Call "semaphore_free(alarm_expired)" inside alarm_cleanup()
after the corresponding "timer" and "wakeup_timer" have
been deleted.
* Fix the argument type when calling eventfd_read() inside
semaphore_wait()
Bug:
26982349
Change-Id: I2b00cd7ee7f56f755775f8e7b370006e31c6eb08
Glenn Kasten [Mon, 25 Apr 2016 22:26:40 +0000 (22:26 +0000)]
Use audio_session_t consistently
am:
f1c12e5
* commit '
f1c12e5e648bd1dcb2d0ecb935012ca063249e73':
Use audio_session_t consistently
Change-Id: Ie3fc95140339bafa44b22588a25b01258180858b
Glenn Kasten [Tue, 8 Mar 2016 20:12:33 +0000 (12:12 -0800)]
Use audio_session_t consistently
Bug:
27562099
Change-Id: I10780c8bfc84af568795a2c15557020fbe89a1c4
Jakub Pawlowski [Mon, 25 Apr 2016 19:23:36 +0000 (19:23 +0000)]
Add const guarantees
am:
063ca02
* commit '
063ca0230d902b1397bb8c19366e807980d876f3':
Add const guarantees
Change-Id: I5a1700be20f12bb687f79a1433c78c158bf060b2
Jakub Pawlowski [Mon, 25 Apr 2016 17:43:02 +0000 (10:43 -0700)]
Add const guarantees
This patch adds const qualifiers to parameter of some methods.
It adds no value right now, but will make conversion of btif to C++
much easier.
Change-Id: I380a63484230f92aedfd4ff5e1ee72f30307d9d9
Pavlin Radoslavov [Fri, 22 Apr 2016 23:35:53 +0000 (23:35 +0000)]
Fix a Floating point exception for periodic timers
am:
399f217
* commit '
399f217fddd4ce195ada3b69575caeca74ca1314':
Fix a Floating point exception for periodic timers
Change-Id: Ia6d18b9950760aef1759c7e3ea2a1417432ea69b
Pavlin Radoslavov [Fri, 22 Apr 2016 23:35:53 +0000 (23:35 +0000)]
Improve debug-ability of the stack manager
am:
8e77215
* commit '
8e7721573557c4ccb7918810349f8a80c2e49803':
Improve debug-ability of the stack manager
Change-Id: I9857157c637342a70c02f7f237b18f4b1ce52bf4
Pavlin Radoslavov [Fri, 22 Apr 2016 23:35:53 +0000 (23:35 +0000)]
Add missing mutex lock/unlock inside alarm_cleanup()
am:
06d3f47
* commit '
06d3f477818b66ff1a113c8bf33f9f07f3950d32':
Add missing mutex lock/unlock inside alarm_cleanup()
Change-Id: I5b152512e0a0ddfeda9ce0fb265f92cc08567382
Pavlin Radoslavov [Wed, 20 Apr 2016 00:30:19 +0000 (17:30 -0700)]
Fix a Floating point exception for periodic timers
Fix a Floating point exception for periodic timers that are
scheduled with interval of 0ms, and add a corresponding unit test.
Also, fix a typo when printing "Action counts" statistics.
Bug:
28278593
Change-Id: Ic381efc573ed9954c36980c26a89318d2de40b29
Pavlin Radoslavov [Wed, 20 Apr 2016 02:20:01 +0000 (19:20 -0700)]
Improve debug-ability of the stack manager
Add or update existing log messages in the stack manager,
so it is clear when each of the init/startup/shutdown/cleanup
steps is executed and completed.
The added/updated log messages are at INFO level.
Bug:
26982349
Change-Id: Ie84aa8e96133999eb76c5b351ddd4fea56404ef0
Pavlin Radoslavov [Wed, 20 Apr 2016 02:16:26 +0000 (19:16 -0700)]
Add missing mutex lock/unlock inside alarm_cleanup()
Bug:
26982349
Change-Id: I32f4e6450491adcc1e12e71fb8bb582d6397a91a
Manu Viswanadhan [Fri, 22 Apr 2016 22:07:58 +0000 (22:07 +0000)]
Fix FD leak caused by module wrapper thread
am:
a6f0395
* commit '
a6f0395de4f636dd1b7cd2e237fe7f5321f114a6':
Fix FD leak caused by module wrapper thread
Change-Id: I1ec2b181bff666c056dc4b62a8ca47c28e97ac94
Manu Viswanadhan [Tue, 19 Apr 2016 09:28:40 +0000 (14:58 +0530)]
Fix FD leak caused by module wrapper thread
Use Case: Repeated BT ON/OFF
Failure: FD leak is observed with ON/OFF stress test
which eventually leads to crash due to unavailability
of FDs.
Steps:
BT ON/OFF.
Root Cause: During cleanup the module wrapper thread is
stopped but the resources are not freed, leading to FD leak.
Fix: Cleanup the module wrapper thread properly so that there
are no resource leaks.
Bug:
28312228
Change-Id: I4de2fba9c98a0e4ae73315759ec6bc8bf273948e
Dan Albert [Fri, 22 Apr 2016 19:59:08 +0000 (19:59 +0000)]
Fix 64-bit build break.
am:
c376302
* commit '
c3763020edb86027a5627154e9fec5d85e26e33e':
Fix 64-bit build break.
Change-Id: I37012931ef7df78db4147cdbd9b5cce3b63eee33
Dan Albert [Fri, 22 Apr 2016 18:24:14 +0000 (11:24 -0700)]
Fix 64-bit build break.
Master (aosp and internal) has been broken for nearly two days now.
Was broken by https://android-review.googlesource.com/#/c/212244/
because no one checked 64-bit before merging.
No one noticed post-submit because the build servers aren't
checkbuilding any 64-bit targets (aside from mips64, which is broken
for other reasons).
I've uploaded a build change to get treehugger building a 64-bit
target (http://cr/
120564724), and also to make all the targets
checkbuilds again (http://cr/
120568746).
Change-Id: I195000284de5b52a539a47ad8b308990e72eea96
Ajay Panicker [Thu, 21 Apr 2016 23:34:37 +0000 (23:34 +0000)]
Protect config module init and add date to config file
am:
646134e0a0
* commit '
646134e0a04459f649cb50aa9f3272054630c345':
Protect config module init and add date to config file
Change-Id: Ie226b162fd335fb3a31741e33ba987271d39e9d9
Ajay Panicker [Mon, 18 Apr 2016 18:31:48 +0000 (11:31 -0700)]
Protect config module init and add date to config file
Bug:
27354612
Change-Id: I45c3c46cf9be81b9d235cfef68343413c98b6d4a
Sharvil Nanavati [Thu, 21 Apr 2016 21:59:06 +0000 (21:59 +0000)]
Merge "Fix assertion failure in btif_sock_rfc"
am:
1423f8c4ba
* commit '
1423f8c4babd9ecb2b4faf702601e734eecd9a08':
Fix assertion failure in btif_sock_rfc
Change-Id: Ib5e970bb1e2f5e37cd778abeb415ea253e52013c
Sharvil Nanavati [Thu, 21 Apr 2016 21:54:55 +0000 (21:54 +0000)]
Merge "Fix assertion failure in btif_sock_rfc"
Pavlin Radoslavov [Thu, 21 Apr 2016 17:54:19 +0000 (17:54 +0000)]
Add missing init/destroy of state_lock mutex
am:
4aa6d30d1c
* commit '
4aa6d30d1cde7e261e240e0eb2afc0d5a1803757':
Add missing init/destroy of state_lock mutex
Change-Id: If067e17a1fb5885acbbde0768851666c29bb75f4
Pavlin Radoslavov [Wed, 20 Apr 2016 19:06:08 +0000 (12:06 -0700)]
Add missing init/destroy of state_lock mutex
Add missing init/destroy of state_lock mutex inside file
btif_sock_l2cap.c.
Also, add a missing unlock for the same mutex.
Bug:
28296454
Change-Id: I48b8deb911d29e8dcc6b7243fd61fc3ba69046dd
Sharvil Nanavati [Wed, 20 Apr 2016 17:49:10 +0000 (10:49 -0700)]
Fix assertion failure in btif_sock_rfc
The BTIF RFCOMM code was ignoring the status code on RFCOMM writes. In
the failure case, the slot id is 0 which is invalid. But the slot id
shouldn't even be referenced since the result was failure.
Stack trace:
__assert2+20 bionic/libc/bionic/assert.cpp:40
find_rfc_slot_by_id+18 system/bt/main/../btif/src/btif_sock_rfc.c:144
on_rfc_write_done system/bt/main/../btif/src/btif_sock_rfc.c:537
rfcomm_cback+632 system/bt/main/../btif/src/btif_sock_rfc.c:585
bta_jv_rfcomm_write+74 system/bt/bta/./jv/bta_jv_act.c:2121
bta_jv_sm_execute+18 system/bt/bta/./jv/bta_jv_main.c:93
bta_sys_event+56 system/bt/bta/./sys/bta_sys_main.c:523
run_reactor+254 system/bt/osi/./src/reactor.c:278
run_thread+142 system/bt/osi/./src/thread.c:209
__pthread_start(void*)+30 bionic/libc/bionic/pthread_create.cpp:199
__start_thread+6 bionic/libc/bionic/clone.cpp:41
Bug:
27819511
Change-Id: Ifcd19fdfb214559f345567f04db8146b30037363
Bluetooth Build Test [Thu, 21 Apr 2016 15:49:15 +0000 (15:49 +0000)]
Fix sluggish HID devices
am:
46b8d12b92
* commit '
46b8d12b92e74dc03cd17a77a3365cd4d96902f4':
Fix sluggish HID devices
Change-Id: I8e50c5a89094b31fd0e2400d2e060c9b06f4e356
Bluetooth Build Test [Wed, 13 Apr 2016 14:39:53 +0000 (16:39 +0200)]
Fix sluggish HID devices
Right now, when connecting to HID devices, preferred connection
parameters are not being used. This is because of bug in GAP profile.
This make all HID devices use default connection parameters, which
mean that they behave sluggish. This patch fixes that by forcing
HID devices to re-read connection parameters on each reconnection.
This is a temporary workaround until GAP is rewritten.
Change-Id: I74b70ad8e96c29517cace808632fe4d8e0251994
Bluetooth Build Test [Wed, 20 Apr 2016 23:58:50 +0000 (23:58 +0000)]
Enable test_vendor_lib compilation on Linux
am:
aabb300
* commit '
aabb3008aa03ad95339cf1a818c025301cbc14d3':
Enable test_vendor_lib compilation on Linux
Change-Id: Ic75011df40615323592343247794769d66b99ba1
Bluetooth Build Test [Wed, 20 Apr 2016 19:35:28 +0000 (12:35 -0700)]
Enable test_vendor_lib compilation on Linux
Cristian Iorga [Wed, 20 Apr 2016 20:52:55 +0000 (20:52 +0000)]
vendor_libs: create Android.mk
am:
6f2ae30
* commit '
6f2ae3021d3487ef00dd76f9bfb8ace8b7069b7d':
vendor_libs: create Android.mk
Change-Id: I4e07e95b8b609cbd5625968c9daa5618edf2ddd7
Cristian Iorga [Tue, 15 Mar 2016 14:33:08 +0000 (16:33 +0200)]
vendor_libs: create Android.mk
all-subdir-makefiles call works for only one
nested sublevels, so we need to add a default
Android.mk in order to be able to build libbt-vendor module.
BUG=
28014054
Change-Id: I7cc004d2a4dd6216a80d13c6384d9dcde328323e
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Cristian Iorga [Wed, 20 Apr 2016 16:00:24 +0000 (16:00 +0000)]
Merge "vendor_libs: test_vendor_lib: fix build"
am:
67a29d6
* commit '
67a29d6259335cd12f6eb7f6daaec1785ed68d03':
vendor_libs: test_vendor_lib: fix build
Change-Id: I21eef55cf5f3af64de9b0eb44df67b9ba300a683
Jakub Pawlowski [Wed, 20 Apr 2016 15:51:39 +0000 (15:51 +0000)]
Merge "vendor_libs: test_vendor_lib: fix build"
Ajay Panicker [Tue, 19 Apr 2016 21:45:56 +0000 (21:45 +0000)]
Add guest mode functionality (2/4)
am:
7b266be
* commit '
7b266be449e4f915c419199c2312eb31f70e63bc':
Add guest mode functionality (2/4)
Change-Id: I68b38a608df104203ce9007121d3d085bede81b0
Cristian Iorga [Mon, 18 Apr 2016 13:09:31 +0000 (16:09 +0300)]
vendor_libs: test_vendor_lib: fix build
Change-Id: I1ba531c5289adea3fa5d6f9e0f68cf241a127219
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Ajay Panicker [Fri, 18 Mar 2016 00:09:24 +0000 (17:09 -0700)]
Add guest mode functionality (2/4)
Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active.
Bug:
27410683
Change-Id: I19ff91d1d7fb8c60230fee7a05d32574b5b2aeda
Jakub Pawlowski [Mon, 18 Apr 2016 17:41:41 +0000 (17:41 +0000)]
Use base from libchrome
am:
9f19410
* commit '
9f19410236243d5f631582f4978df27771ff03fb':
Use base from libchrome
Change-Id: I047ce07c58ba805721f6d4895fe795b520dd7fee
Jakub Pawlowski [Mon, 18 Apr 2016 17:00:26 +0000 (10:00 -0700)]
Use base from libchrome
Change-Id: I57230618ef8653a168d69f871f88714ab339408a
Cristian Iorga [Mon, 18 Apr 2016 16:27:10 +0000 (16:27 +0000)]
Fix Linux libbt-vendor build
am:
8d79346
* commit '
8d793462d253ccb9ce619074b37f47a968fa8612':
Fix Linux libbt-vendor build
Change-Id: I501e221f8d25ee038814ccab53ef33dc33dc115d
Cristian Iorga [Wed, 30 Mar 2016 17:14:36 +0000 (20:14 +0300)]
Fix Linux libbt-vendor build
Fix enumeration values not explicitly handled in switch;
Fix the undefined reference to functions from libosi.
Change-Id: I64ab3d57d1c4879ad47ae1a03f8996287877535d
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Sanket Agarwal [Fri, 15 Apr 2016 20:07:27 +0000 (20:07 +0000)]
Allow A2DP SNK audio track focus gain interface.
am:
501d671
* commit '
501d67199bfc5bf9c2d2a32f6eac5600320795fd':
Allow A2DP SNK audio track focus gain interface.
Change-Id: I62bc0064c9756d1bf615d8a795b3b520d333246e
Jakub Pawlowski [Fri, 15 Apr 2016 18:53:10 +0000 (18:53 +0000)]
Fix LE central device not being able to disconnect
am:
6f74d76
* commit '
6f74d76a700e79217b6bba0a40860ba19fe06b3f':
Fix LE central device not being able to disconnect
Change-Id: I2179ef536d3a849f912665abc376b517e886dc67
Sanket Agarwal [Fri, 8 Apr 2016 18:26:04 +0000 (11:26 -0700)]
Allow A2DP SNK audio track focus gain interface.
In order to duck music we need to adjust the gain of the audio track
handled by A2DP SNK. Since SNK is implemented in native we need to add
interface to adjust the gain.
Bug: b/
28065071
Change-Id: I60634cfadb502e276596bcb3aafc62ef81d9023a
Jakub Pawlowski [Thu, 14 Apr 2016 10:06:54 +0000 (03:06 -0700)]
Fix LE central device not being able to disconnect
This fixes issue introduced in
https://android-review.googlesource.com/#/c/202278
Bug:
28211048
Change-Id: I08e62149358f1c1fc1759a4ca9eb375cb0ad8230
AnubhavGupta [Fri, 15 Apr 2016 18:05:29 +0000 (18:05 +0000)]
AVRCP: Update sdp record correctly for CT or TG.
am:
a58d7fe
* commit '
a58d7fe1cd90d48cea8924a4f2dcaa91e65ff629':
AVRCP: Update sdp record correctly for CT or TG.
Change-Id: I02f0ec4c009170bf2f76f750dfc1dcaea6b411c8
AnubhavGupta [Tue, 22 Mar 2016 18:03:33 +0000 (23:33 +0530)]
AVRCP: Update sdp record correctly for CT or TG.
-Issuses: SDP records are faulty
- AVRCP versions are faulty
- Nexus configuration shows browsing supported
- Both Cat-1 and Cat-2 is supported for Nexus CT
-Solution
- pass sdp version as parameter
- update sdp records for avrcp controller in case of client
profiles being enabled
- BTA_AV_FEAT_BROWSE flag was incorrecly set during AV registration
causing AVRCP TG version to upgrade to 1.4 even though browsing
feature is not supported.
- Use AVRC_CTLR_INCLUDED feature flag instead of AVRC_ADV_CTRL_INCLUDED
for guarding Avrcp controller code in build/parse apis for
command/response
- update categories supported for CT properly for mobile phone config
Bug: b/
28149547
Change-Id: I3ff4082453a2624a72d8f152d75af83a8efb4937
Cristian Iorga [Fri, 15 Apr 2016 15:04:22 +0000 (15:04 +0000)]
vendor_libs: linux: Fix build
am:
2c3ce4a
* commit '
2c3ce4ab59a0026e790af078286f82c6975524b9':
vendor_libs: linux: Fix build
Change-Id: I29286f779abbb456e9f4329a7ce71076b99bbe2a
Cristian Iorga [Thu, 14 Apr 2016 08:00:28 +0000 (11:00 +0300)]
vendor_libs: linux: Fix build
LOG_DEBUG, LOG_VERBOSE definition changed in libosi.
This triggers:
"error: use of undeclared identifier 'true'" at
build time. Fixed by the inclusion of stdbool.h.
Change-Id: Ie2ed0d6b07bc28c26669b19a2584ea248e2782a9
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Hemant Gupta [Thu, 14 Apr 2016 20:38:39 +0000 (20:38 +0000)]
Merge "HID: Fix regression caused by commit "
3a2c2d61""
am:
153d3e4
* commit '
153d3e448d9797cc1b9841b9a060bed308d5190f':
HID: Fix regression caused by commit "
3a2c2d61"
Change-Id: I264c7ff85d33e03b0edb68075118657e39e69b86
Treehugger Robot [Thu, 14 Apr 2016 20:27:53 +0000 (20:27 +0000)]
Merge "HID: Fix regression caused by commit "
3a2c2d61""
Christopher Wiley [Thu, 14 Apr 2016 18:41:56 +0000 (18:41 +0000)]
Allow unused private field
am:
bac99a1
* commit '
bac99a18b378364b07c7f82ebf173e2d20fbd900':
Allow unused private field
Change-Id: I823105282a8c8870a14faebb5371e6755c760024
Christopher Wiley [Thu, 14 Apr 2016 17:32:56 +0000 (10:32 -0700)]
Allow unused private field
This field is unused when we build unittests for OSX.
Bug:
28117776
Test: Compiles
Change-Id: I6add6946896a8cc2838309e6188812d4c7c497cb
Andre Eisenbach [Thu, 14 Apr 2016 07:15:46 +0000 (07:15 +0000)]
Ensure PIN code dialog is shown after remote name request
am:
f8e3baa
* commit '
f8e3baa34e2c3fe021605b2a23b902b44eafc115':
Ensure PIN code dialog is shown after remote name request
Change-Id: Ibb26c522600071833e17306339e5a6f607a25892
Andre Eisenbach [Thu, 14 Apr 2016 07:15:46 +0000 (07:15 +0000)]
Move autopair blacklist to interop database
am:
7ee02bd
* commit '
7ee02bdb617c7f2c27d03a21112f485ec36371b4':
Move autopair blacklist to interop database
Change-Id: Ia02c9b9af114be9aad18f1640dd839e4f462ebc6
Andre Eisenbach [Wed, 13 Apr 2016 16:44:00 +0000 (09:44 -0700)]
Ensure PIN code dialog is shown after remote name request
If pairing is locally initiated and results in a remote name request
being performed before the PIN code is requested, then the PIN code
dialog will not be shown correctly.
This patch removes the check for locally initated pairing to ensure the
dialog is shown in all cases.
Bug:
27347017
Change-Id: I607c1c071af502fb2990b14cce676590e577b4c2
Andre Eisenbach [Mon, 11 Apr 2016 21:50:41 +0000 (14:50 -0700)]
Move autopair blacklist to interop database
Blacklist by partial name etc. was not working and had no effect; all
BDAs in the config file start with 00:, which is implausible at best, so
deleted...
Added new mechanism to blacklist by BDA only initially and added Subaru
car kit to blacklist.
Bug:
27347017
Change-Id: Ie2941cb1ab663b5444b02c44f85032f13be4ab46
Marie Janssen [Wed, 13 Apr 2016 22:47:21 +0000 (22:47 +0000)]
btif: add count of devices loaded on startup
am:
bcfdd0a
* commit '
bcfdd0ab24357c5dd842540e6c0e8f34ba7aac11':
btif: add count of devices loaded on startup
Change-Id: If7a6fa7e722886f82069dbaafd0d0e46eba9a963