summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix potential DoS caused by delivering signal to BT processstable/cm-13.0-ZNH2KSharvil Nanavati2016-08-0233-148/+215
| | | | | | Ticket: CYNGNOS-3177 Bug: 28885210 Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360
* bta: check if sdp db buffer exists before freeScott Mertz2016-07-181-8/+2
| | | | | | | | | | | | | | | | | Fixes the following crash: Stack frame #00 pc 00030370 /system/lib/libc.so (dlfree+59) Stack frame #01 pc 0007ecd7 /system/lib/hw/bluetooth.default.so (bta_dm_sdp_result+942): Routine bta_dm_sdp_result at system/bt/bta/./dm/bta_dm_act.c:1859 Stack frame #02 pc 000816fd /system/lib/hw/bluetooth.default.so (bta_dm_search_sm_execute+92): Routine bta_dm_search_sm_execute at system/bt/bta/./dm/bta_dm_main.c:365 Stack frame #03 pc 000a7729 /system/lib/hw/bluetooth.default.so (bta_sys_event+56): Routine bta_sys_event at system/bt/bta/./sys/bta_sys_main.c:524 Stack frame #04 pc 0010f9ff /system/lib/hw/bluetooth.default.so: Routine run_reactor at system/bt/osi/./src/reactor.c:296 Stack frame #05 pc 0011095f /system/lib/hw/bluetooth.default.so: Routine run_thread at system/bt/osi/./src/thread.c:232 Stack frame #06 pc 000417fb /system/lib/libc.so (_ZL15__pthread_startPv+30) Stack frame #07 pc 00019325 /system/lib/libc.so (__start_thread+6) FEIJ-1578 Change-Id: I5706e4e5379168b24682347086c161e138c7f5cb (cherry picked from commit ab5b13b4251c04832c8f6c4ef38ad722866aaaf4)
* Fix call to enable(bool) which changed as part ofJessica Wagantall2016-07-074-4/+4
| | | | | | | | 049eae4ff84fbbdbc4b0068cb2a217f9f0460bf4 Ticket: CYNGNOS-3020 Change-Id: I86fc416dda42bfdf5581ed5f60aef5d00800a59b
* DO NOT MERGE btif: check overflow on create_pbuf sizeMarie Janssen2016-07-071-1/+8
| | | | | | | | Bug: 27930580 Ticket: CYNGNOS-3020 Change-Id: Ieb1f23f9a8a937b21f7c5eca92da3b0b821400e6 (cherry picked from commit ad31ee0f0f03953064cc503314d5e39d687af50a)
* Add guest mode functionality (2/3)Ajay Panicker2016-07-079-13/+100
| | | | | | | | | | | | | 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 Ticket: CYNGNOS-3020 Change-Id: I8f23d28ef0aa3a8df13d469c73005c8e1b894d19 (cherry picked from commit 3676e76f8016fc722121503070745ce7bbf93780)
* btif: Don't persist remote devices to the configMarie Janssen2016-06-075-34/+69
| | | | | | | | | | | | | | | | | We don't need to persist the unpaired devices to NVRAM so skip saving them. This fixes a regression in a previous patch where the most recent instead of the least recent devices would be removed, making some devices unpairable in extremely busy environments. This is a backport of http://r.android.com/210955 and http://r.android.com/212838 together. Bug: 26071376 Ticket: CYNGNOS-2707 Change-Id: If7ee9d960f70c836bf08b78da5f3fc852ba60a85
* Merge remote-tracking branch 'github/cm-13.0' into HEADJessica Wagantall2016-05-169-35/+179
|\ | | | | | | | | | | OPO-618 Change-Id: I0e1aed1ef0622c34fdc14423027bc0f5bb391dd8
| * Merge tag 'android-6.0.1_r43' into HEADJessica Wagantall2016-05-031-1/+1
| |\ | | | | | | | | | | | | | | | | | | Ticket: CYNGNOS-2373 Android 6.0.1 release 43 (MOB30J) Change-Id: Ife24446d9ec52c93426b58b0bf2e353cc201bfb7
| | * DO NOT MERGE Check size of pin before replyingMarie Janssen2016-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If a malicious client set a pin that was too long it would overflow the pin code memory. Bug: 27411268 Change-Id: I9197ac6fdaa92a4799dacb6364e04671a39450cc
| * | BT-HFP: Add HFP 1.7 features only if supported by peerJean-Bernard Damiano2016-04-281-30/+9
| | | | | | | | | | | | | | | | | | | | | * Removes the blacklisted device approach in favor of dynamically adding the capabilities when detected. Change-Id: I787eed0edee858c78a83fa65b70e9aaa9f0c5193
| * | Add Renault MediaNav to HFP 1.7 blacklistjmozmoz2016-04-261-1/+3
| | | | | | | | | | | | | | | | | | Avoids dropping of connection after 5 seconds. Change-Id: I89c531b9343d6b1cc5bb687f3b27ed8908d51ac3
| * | add medianav to unsupported device for hfp 1.7Jean-Bernard Damiano2016-04-241-1/+3
| | | | | | | | | | | | Change-Id: I6d3a91d7d7ee906f4a6ad2ee0559f741cebcaf4a
| * | Merge tag 'android-6.0.1_r30' into HEADJessica Wagantall2016-04-196-9/+157
| |\| | | | | | | | | | | | | | | | | | | Android 6.0.1 release 30 RM-234 Change-Id: Ib49a88726f2df18ca5ecf04fae4e2d2d31ef9a82
| | * DO NOT SUBMIT Revert "DO NOT MERGE Blacklist devices for absolute volume ↵Akshay Thakker2016-03-164-27/+7
| | | | | | | | | | | | | | | | | | | | | | | | control" This reverts commit 8fe9b6c9f7538de91c1a3aded53518ca8c6d2fc0. Change-Id: Ic0aa70bcaec57bf14afa20ac5304e7164174b566
| | * DO NOT MERGE Blacklist devices for absolute volume controlAndre Eisenbach2016-03-014-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices do not play well with absolute volume control. They either play back music at unacceptably loud volume levels or provide insufficiently granular volume control where a single "step" of volume change results in unexpectedly large jumps in volume. Bug: 26070064, 26060431 Change-Id: I5a336fba87119325b47a5ad385e9c48a631f2121
| | * DO NOT MERGE Remove Porsche car-kit pairing workaroundAndre Eisenbach2016-02-263-53/+2
| | | | | | | | | | | | | | | Bug: 26551752 Change-Id: I14c5e3fcda0849874c8a94e48aeb7d09585617e1
| | * DO NOT MERGE Add ability to add interop entries dynamically (2/2)Andre Eisenbach2016-02-246-11/+139
| | | | | | | | | | | | | | | | | | | | | | | | Add ability and interface for adding dynamic entries to the interop workaround database. Bug: 26548845 Change-Id: Id886e4233fc1548727e79f1581cdc0c6f0738d59
| * | bt-vendor: Fix sporadic crashes on shutdownRicardo Cerqueira2016-04-151-1/+5
| | | | | | | | | | | | | | | | | | | | | The core was unconditionally calling a vendor method that few implementations have. Don't do that, it's evil. Change-Id: I96df83760fd07805de37832f7ee315ee1f721948
| * | Merge branch 'LA.BF.1.1.3_rb1.12' of git://codeaurora.org/platform/system/bt ↵Steve Kondik2016-04-071-0/+7
| |\ \ | | | | | | | | | | | | into cm-13.0
| | * \ Merge AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.012 on remote branchLinux Build Service Account2016-04-040-0/+0
| | |\ \ | | | | | | | | | | | | | | | Change-Id: If9b48bac2fb927b3e792a1876d702a5ee9d59515
| | * \ \ Merge "BT: ACL and l2c out if sync after connection collision"Linux Build Service Account2016-03-161-0/+7
| | |\ \ \
| | | * | | BT: ACL and l2c out if sync after connection collisionGurpreet Ghai2016-03-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Remote device can't be removed from paired list. Cause: After connection collision, lcb is removed after connection request is rejected by soc but acl entry is not removed. So, for upper layer, acl connection always remains up. Fix: Removed acl connection and acl entry when connection complete is received and lcb is not present. CRs-Fixed: 987968 Change-Id: Ie2049217e436704262f06d0c0dc51611697cc29a
| * | | | | Merge tag 'android-6.0.1_r24' into HEADJessica Wagantall2016-04-053-53/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket: CYNGNOS-2213 Android 6.0.1 release 24
| * | | | | | Bluetooth: Allow REMOVE_EAGER_THREADS to be unsetIvan Grinko2016-04-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REMOVE_EAGER_THREADS is set to true by default, so let device maintainers disable it locally in bdroid_buildcfg.h if needed. Change-Id: I199c509de6c2f1506eda9bda732aa2ce4176d186
* | | | | | | DO NOT MERGE Check size of pin before replyingMarie Janssen2016-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a malicious client set a pin that was too long it would overflow the pin code memory. Ticket: CYNGNOS-2373 Bug: 27411268 Change-Id: I9197ac6fdaa92a4799dacb6364e04671a39450cc (cherry picked from commit f0a69c392117c69c5f66dd239f5a5cfd89a7331e)
* | | | | | | bt-vendor: Fix sporadic crashes on shutdownRicardo Cerqueira2016-04-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core was unconditionally calling a vendor method that few implementations have. Don't do that, it's evil. Change-Id: I96df83760fd07805de37832f7ee315ee1f721948
* | | | | | | Merge tag 'android-6.0.1_r24' into HEADJessica Wagantall2016-04-053-53/+2
|\ \ \ \ \ \ \ | |/ / / / / / |/| / / / / / | |/ / / / / | | | | | | Ticket: CYNGNOS-2213 Android 6.0.1 release 24
| * | | | | merge in mnc-dr1.5-release history after reset to mnc-dr1.5-devThe Android Automerger2016-03-220-0/+0
| |\ \ \ \ \
| | * \ \ \ \ merge in mnc-dr1.5-release history after reset to mnc-dr1.5-devThe Android Automerger2016-03-170-0/+0
| | |\ \ \ \ \ | | |/ / / / / | |/| | | | |
| * | | | | | DO NOT MERGE Remove Porsche car-kit pairing workaroundAndre Eisenbach2016-03-013-53/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | Bug: 26551752 Change-Id: I14c5e3fcda0849874c8a94e48aeb7d09585617e1
* | | | | | Merge branch 'LA.BF.1.1.3_rb1.11' of git://codeaurora.org/platform/system/bt ↵Steve Kondik2016-03-3023-52/+500
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | into cm-13.0 Change-Id: Ib0f8f87bd5655ce85227bfc016044b1daa09ebe7
| * | | | | Merge AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.010 on remote branchLinux Build Service Account2016-03-070-0/+0
| |\ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | Change-Id: I779368623c8755a9fa329e86d6cdf4bb4c35289d
| | * | | | Merge AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.009 on remote branchLinux Build Service Account2016-02-140-0/+0
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: Ica6605b1d04e7de16a054c6d3ddda9e04b306720
| | | * \ \ \ Merge AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.008 on remote branchLinux Build Service Account2016-01-220-0/+0
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1611d0943ac1c7c7adeb2034017db680a42e6b1f
| * | | \ \ \ \ Merge "Bluetooth: Synchronizing access to hashmap in counter module"Linux Build Service Account2016-03-051-0/+2
| |\ \ \ \ \ \ \
| | * | | | | | | Bluetooth: Synchronizing access to hashmap in counter moduleGurpreet Ghai2016-02-181-0/+2
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hashmap access is not synchronized in counter module. The call for hashmap free is not under motex lock. This may lead to race condition during shut down when hash map is being cleared while in use by another thread. Added mutex lock for hash map free call. CRs-Fixed: 978566 Change-Id: I58dae83a1e483c50f63176df401c02c63e648b8a
| * | | | | | | Merge "Bluetooth: GAP: Setting remove device pending status as FALSE"Linux Build Service Account2016-02-261-0/+32
| |\ \ \ \ \ \ \
| | * | | | | | | Bluetooth: GAP: Setting remove device pending status as FALSEBalraj Selvaraj2016-02-111-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue scenario: - Pair the DUT and HS. (Link Keys get established.) - Now Switch OFF BT on DUT. (DUT still has the Link key of HS) - Reset the paired devices memory in HS and keep HS in pairing mode. (HS loses DUT's link key) - Now switch ON BT on DUT. (DUt starts reconnection with HS, but as HS lost DUT's key, PIN or KEY missing event will come to host) - DUT reconnects to HS (Using newly established link keys) - Now power OFF and ON the HS. - HS will try reconnection with DUT. - While there is an incoming connection from HS to DUT, host is giving negative link key reply always for the multiple link key requests from HS. - HS sends disconnection with "Authentication failure" Fix: Setting the remove device pending status to FALSE from security device DB, when the link key notification event comes. Basically it will avoid deleting the device from security device DB, Which is solving the reconnection initated from remote when we remove the link key at remote side. Change-Id: Ic164d8d5b5c2e0b9cc5f04f993047fb0a8e5d9a9
| * | | | | | | | Merge "Bluetooth: Clean up l2cap socket properly on closure"Linux Build Service Account2016-02-261-0/+5
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Bluetooth: Clean up l2cap socket properly on closureSrinu Jella2016-02-231-0/+5
| | | |_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Clean up l2cap socket properly on closure to free the entry registered with security manager to avoid leak in security manager records. - This change will instruct BTA layer to free it's resources along with security manager's entry. Change-Id: I4f5d6ac92317bcaee5f9285ba71d13eea84c737c CRs-Fixed: 978529
| * | | | | | | | Merge "Bluetooth: Enforce BT state check during GATT operations."Linux Build Service Account2016-02-261-2/+4
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Bluetooth: Enforce BT state check during GATT operations.Pradeep Panigrahi2016-02-021-2/+4
| | | |_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enforce BT state check when BLE Apps call into GATT, to handle scenarios in which delayed call from BLE App to disconnect/close comes after the BT is OFF. This would prevent bluetooth crash in such scenarios. Change-Id: I7bf501abd023e478d25cbe6ee861dfc50eff05db CRs-fixed: 960933
| * | | | | | | | Merge "Bluetooth: GAP: Update Paging and inquiry busy level seperately"Linux Build Service Account2016-02-262-10/+14
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Bluetooth: GAP: Update Paging and inquiry busy level seperatelySrinu Jella2016-01-172-10/+14
| | | |_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While updating the busy level of Paging or inquiry '10' was used as BL for paging and inquiry,this leads to ignore the one of them when both of them are active. Made unique busy level for paging related events and inquiry related events, so that each event will be notified. Change-Id: I7bddcb4901061c450555235717b7d49bab922ae8 CRs-Fixed: 960897
| * | | | | | | | Merge "Stops all BLE timers when BT turn off request is issued to BT stack"Linux Build Service Account2016-02-261-5/+5
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Stops all BLE timers when BT turn off request is issued to BT stackSubramanian Srinivasan2016-02-181-5/+5
| | | |/ / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stops all the BLE timers namely the multi advertisement RPA timers, the local RPA timer and the BLE GAP timers as soon as BT turn off request is issued to the BT stack rather than waiting for the BT turn off callback to stop the timers. This prevents BLE timers from starting when the BT turn off request is in process. CRs-fixed: 974344 Change-Id: I0b47a9ae892b7cb226d2ce7d7e30b41d0ecad582
| * | | | | | | | Merge "Increase number of semaphores for media workqueue"Linux Build Service Account2016-02-261-1/+2
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Increase number of semaphores for media workqueueAyan Ghosh2016-02-181-1/+2
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mediatask allows only 128 pending workqueue enqueue semaphores to be created hence on Suspend confirm delay alarm callbacks run out of that semaphore count and 129th instance of it gets blocked and corresponding alarm_callback gets stuck. Now later on receiving suspend ack, mediatask goes for freeing the media alarm which eventually waits for pending callback to come out. But as that never happens as callback is stuck so eventually mediatask also gets blocked and SUSPEND ACK to Audio HAL also gets blocked. So this phenomenon eventually leads to deadlock and later whosoever tries to make use of audio therad runs into ANR. This fix ensures that the current proposed value of semaphore/ workqueue element cound is made so big that is capable of handling delay of 15s (Max delay entertained for any AV signalling commands) for suspend confirm case. CRs-Fixed: 975638 Change-Id: I65a8fc697e2a2c3decf63b49af017da8be9d9f0f
| * | | | | | | | Merge "Bluetooth: Offload config save functionality to btif thread"Linux Build Service Account2016-02-261-4/+10
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Bluetooth: Offload config save functionality to btif threadSrinu Jella2016-02-161-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offload config save functionality to btif thread from timer thread as timer callback thread is critical in a2dp playback case. If the timer callback thread is busy in config save due to IO operations, it may lead to a2dp audio choppy. Fix to avoid the "bt_config.conf" file corruption from the file system. This will avoid losing the paired information in some corner case, such as abrupt power off and on. This patch will ensure bt_config is saved to NVRAM. CRs-Fixed: 953993 Change-Id: I893e9afefa89cbab6e7ddd8835ca77d3e316874c