summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-04-27HACK: Prevent bluetooth errors from causing boot issuesandroid-etnavivTomeu Vizoso1-0/+2
2016-11-07Mask out HFP 1.7 feature bits if peer version is <1.7Andre Eisenbach2-10/+16
Bug: 32378402 Merged-In: I568e8c4c584d56d744cf7a30273feac1d8d4c4df Change-Id: Iac8684bdfd02b18cce260bedefb829e8f7285361 (cherry picked from commit 1ad2678e2ff5fa3dbfae9dc76ab646db10794e4e) (cherry picked from commit 571f23ca31cdbc87cae8c078b5885246dd779498) (cherry picked from commit ebba3ef2ea5061a48aa0de49ebfdb98df64d803f)
2016-10-26merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-10-24Fix random crashes in HID related codeJakub Pawlowski1-11/+4
Operation on characteristics/descriptors shouldn't access GATT database when it's executed. This could happen while service rediscovery is in progress. Bug: 32240759 Test: connect to HID device Change-Id: Ie2b6e6b451456204b1cea1e500df9a0ff949a9ef (cherry picked from commit d8f09d077d9017a522c17f4b9a49328b0ed3e91e)
2016-10-23merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-10-20Reset device security flags when pairing failsAndre Eisenbach3-13/+36
Bug: 29998634 Test: manual Change-Id: Icd9a76a065de147372df060c0b9555c75bcf46bc
2016-10-05merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-10-03Fix bad GATT client state machine state after successfull cache loadJakub Pawlowski1-0/+1
If the GATT service cache was successfully loaded from a file, the state must be reset to idle. Bug: 31175159 Change-Id: I92ebf1bec9d2e7467d7412b41923614ec5a13b6d
2016-09-29merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-09-28merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-09-28Fix 100 LE device connection limitationAndre Eisenbach3-82/+81
Currently after 100 devices are added to the device security database, any subsequent LE connection to a newly discovered LE device address will fail as entries in the security record database are not reused. This patch removes a device record if the device itself is removed and also ensures that the oldest device security record is deleted if the limit is reached to ensure a new record can be allocated. Bug: 31625900 Change-Id: I22f6c82c64a9a9bfb2a16d79182903e5aa011355
2016-09-26Fix unnecessary error message during GATT discoveryJakub Pawlowski1-0/+6
Bug: 31637098 Change-Id: Ib2545e7827bd338d2e22c88836818fce23e7a057
2016-09-25merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-09-23Fix the BLE connection failure with some micechaoyu.x.wu1-4/+5
If enable the "connection parameters update" during GATT discovery, it may cause some device connection failure due to connection timeout. Since the the "connection parameter update" is enabled again when GATT discovery completed, remove the enable of "connection parameter update" after SMP complete to fix the issue. This issue was already fixed in commit 2d41fe1c, but then it was re-introduced in commit 444a8da8, which also removed comment explaining the issue, added back in this patch. Bug: 29060797 Change-Id: I42b0b36056821c30d887484e22bfcbd04ea7ca03 (cherry picked from commit 1ec17e06c73c67592aeda29e0aaa03580fdecce9)
2016-09-18merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-09-16Add BT_HCI_UNKNOWN_MESSAGE_TYPE log eventPavlin Radoslavov3-12/+21
If the received HCI type is unknown, then log an event and abort. The most likely reason for that to happen is if the UART stream is corrupted. We cannot recover from that, and there is not much else we can do. Also, fixed a bug in an HCI-related unit test that was exposed by the above change. Bug: 31432127 Change-Id: Ia888c485f177af4962268bf8f593b27fd7a4b080 (cherry picked from commit 27ec0c7824cf67b8a36bf5391734e6d2fc6207e2) (cherry picked from commit e1c8ed17c7a35510f00997ca329687f73cd193d8)
2016-09-16Add BT_HCI_UNKNOWN_MESSAGE_TYPE log eventPavlin Radoslavov3-12/+21
If the received HCI type is unknown, then log an event and abort. The most likely reason for that to happen is if the UART stream is corrupted. We cannot recover from that, and there is not much else we can do. Also, fixed a bug in an HCI-related unit test that was exposed by the above change. Bug: 31432127 Change-Id: Ia888c485f177af4962268bf8f593b27fd7a4b080 (cherry picked from commit 27ec0c7824cf67b8a36bf5391734e6d2fc6207e2)
2016-09-16Fix bad address type assumptionJakub Pawlowski1-1/+1
LE related code should not use BTM_ACL_IS_CONNECTED, because it assumes classic transport. In this particular case, connection created event, which was result of advertising, caused cancellation of "LE Create Connection". Attempt to send "LE Create Connection Cancel" was checking if connection is already established, but was failing to do so becuase BTM_ACL_IS_CONNECTED was used instead of btm_bda_to_acl with proper transport. This caused just created connection to be dropped. Bug: 31442085 Change-Id: Ia345a3d00e8567160f4abb2a31c4130ee69d67a3 (cherry picked from commit f5566938ba671329d91c84c30ab126fbcdfc16d7)
2016-09-16Merge "Add a missing case for BTA_DM_SEARCH_CANCEL_CMPL_EVT" into nyc-mr1-devAndre Eisenbach1-0/+4
2016-09-16Add a missing case for BTA_DM_SEARCH_CANCEL_CMPL_EVTJakub Pawlowski1-0/+4
Cancelling discovery was not handled properly in btif_dm_search_services_evt and was causing crashes due to assert in default case. Bug: 31442085 Change-Id: If9a2c203730c9b06df5ff8d8e251f0c35addcb82 (cherry picked from commit 7df43240c4a7cf5ecd58a39f03d235bf52929d79)
2016-09-16Fix NPE in l2cble_notify_le_connectionJakub Pawlowski1-5/+7
Accessing p_lcb must be guarded with NULL check. Bug: 31442085 Change-Id: I0f6e3f8e0247c5e8946c4d098f8a3ba442f5fb28 (cherry picked from commit b4458c93d5b5d7e2c103166d71daff560ee1a978)
2016-09-15Add security record for devices found through LE batch scanAndre Eisenbach1-0/+4
Currently, starting an LE batch scan are not added to the stack internal device database, which means that the address type and device type needed for a connection are not available. This patch ensures that devices found during an LE scan are added to the device database to ensure connection attempts will succeed. Bug: 31309376 Change-Id: Ic52d7eaa03d17dcbbd848af9140038bc84ea3bd0 (cherry picked from commit e0295e2c2eb7cc6eb331d581ed8455d6b30b3bc6)
2016-09-07merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-09-06Updating QDID to reflect the certfication done for N.pkanwar1-3/+3
Change-Id: Ia80cb82c833df341f832d2ab8cc71a868e2c8f5e
2016-09-04merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-09-01Fix HID crashing on reconnectJakub Pawlowski1-1/+20
This patch fixes crashes on reconnection to HID device. All those issues are already fixed in AOSP. Bug: 31221398 Change-Id: I43b64d0b11b1f548cb373332777ea92d8a075466
2016-08-29Merge "Disable auto-pairing for hands-free devices" into nyc-dev am: fb309b3ce7Andre Eisenbach0-0/+0
am: 88cc389d84 Change-Id: I6c325fa710adfefbbe3e448ebc28a0777253d5d3
2016-08-29Disable auto-pairing for hands-free devices am: d2a37effc2Andre Eisenbach0-0/+0
am: f7d632a29d Change-Id: I6cf3f7c2579e0ef395142aa3165c1e608e7e2fbc
2016-08-29Merge "Disable auto-pairing for hands-free devices" into nyc-devAndre Eisenbach0-0/+0
am: fb309b3ce7 Change-Id: Ib7494cc47ff0e93f7f20a12dc79695697d2eecf0
2016-08-29Disable auto-pairing for hands-free devicesAndre Eisenbach0-0/+0
am: d2a37effc2 Change-Id: I87c0ba767d7dcf91cfd6cb4903fea4efd6df392b
2016-08-29Merge "Disable auto-pairing for hands-free devices" into nyc-devTreeHugger Robot1-1/+0
2016-08-29audio_a2dp_hw: Always update frame counter in out_write am: 5274ab7a31Andy Hung0-0/+0
am: 12851e1b46 Change-Id: I16468c6316fc48923e63f9a52276a2307ce0ae56
2016-08-29audio_a2dp_hw: Always update frame counter in out_writeAndy Hung0-0/+0
am: 5274ab7a31 Change-Id: I6f40e0c813cbc7fe9801903f8c2cbfb08e05f6c0
2016-08-29audio_a2dp_hw: Always update frame counter in out_writeAndy Hung1-15/+12
Required now that we always return success. Bug: 30025777 Change-Id: I7db51321672c128039545cc0fb604c615f169bc3 (cherry picked from commit f4a37b255d1d6fa4cf7cefe2aeb1c3f4fdf33f3c)
2016-08-23Make gatt_attr use opportunistic connectionJakub Pawlowski0-0/+0
am: 970d9d18ec Change-Id: Iaff1375e619409afe9570b6fb79867070a339902
2016-08-23GATT: don't update link status for apps that were never connectedJakub Pawlowski0-0/+0
am: aab757d3d6 Change-Id: Id9397aa59aae3570821c9838d428541cfb6a878a
2016-08-23Make gatt_attr use opportunistic connectionJakub Pawlowski10-14/+24
This patch creates new connection mode - opportunistic connection. When such connection is made, no call to gatt_update_app_hold_link_status will be made when it's started. This means that connecting and disconnecting in this mode won't trigger disconnect timer. When other, app creates regular connection and then disconnects, the physical connection might get disconnected. Opportunistic connection is used only for code setting CCC right now. Bug: 30186455 Change-Id: Ia5be7682b6c3dcb4993060f818dee603aef3e19e
2016-08-23GATT: don't update link status for apps that were never connectedJakub Pawlowski1-61/+40
Right now, in GATT_Deregister we make a call to gatt_update_app_use_link_flag, which might result in a call to GATT_SetIddleTimeout on links that this client was never connected to. In order to fix that, we must check if gatt_update_app_hold_link_status made any changes to p_tcb->app_hold_link. If not, then skip updating the timer. Bug: 30186455 Change-Id: I6f18ec7fe4e80e048adc9e360cae703b7d64d62a
2016-08-21merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-08-19Merge "GATT: don't update link status for apps that were never connected" ↵TreeHugger Robot1-61/+40
into nyc-mr1-dev
2016-08-18GATT: don't update link status for apps that were never connectedJakub Pawlowski1-61/+40
Right now, in GATT_Deregister we make a call to gatt_update_app_use_link_flag, which might result in a call to GATT_SetIddleTimeout on links that this client was never connected to. In order to fix that, we must check if gatt_update_app_hold_link_status made any changes to p_tcb->app_hold_link. If not, then skip updating the timer. Change-Id: I6f18ec7fe4e80e048adc9e360cae703b7d64d62a
2016-08-18Make gatt_attr use opportunistic connectionJakub Pawlowski10-14/+24
This patch creates new connection mode - opportunistic connection. When such connection is made, no call to gatt_update_app_hold_link_status will be made when it's started. This means that connecting and disconnecting in this mode won't trigger disconnect timer. When other, app creates regular connection and then disconnects, the physical connection might get disconnected. Opportunistic connection is used only for code setting CCC right now. Bug: 30186455 Change-Id: Ia5be7682b6c3dcb4993060f818dee603aef3e19e
2016-08-10merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-08-09Rvert "Register for Service Changed notifications for untrusted devices"Satomi2-14/+15
This reverts commit 5f0e23d532f4f90d081ccc0e294f404eb5e5b688. Instead of reusing service discovery data, gatt profile initiates discovery by service uuid before regular service discovery is started, and both discovery procedures interfere with each other. As a result, link is dropped. Bug: 30462943 Bug: 30481143 Change-Id: Ic63339f4f46eda70e575a4103974766d54a9d624 Signed-off-by: Satomi <michitsuta@casio.co.jp>
2016-08-05merge in nyc-mr1-release history after reset to nyc-mr1-devgitbuildkicker0-0/+0
2016-08-05Fix APR crashes in read rssi callbackJakub Pawlowski1-0/+3
When read RSSI timeouts, callback is called with NULL result. This was causing crash. Bug: 30562545 Change-Id: If379c2de4ceab48c021601851a8c83f995440460
2016-07-28audio_a2dp_hw: Always update frame counter in out_writeAndy Hung1-15/+12
Required now that we always return success. Bug: 30025777 Change-Id: I7db51321672c128039545cc0fb604c615f169bc3
2016-07-28Merge "audio_a2dp_hw: Always update frame counter in out_write" into nyc-mr1-devAndy Hung1-15/+12
2016-07-28audio_a2dp_hw: Always update frame counter in out_writeAndy Hung1-15/+12
Required now that we always return success. Bug: 30025777 Change-Id: I7db51321672c128039545cc0fb604c615f169bc3
2016-07-27Proper handling of AV connection collisionAyan Ghosh3-2/+16
Use case: 1. Pair to Remote 2. Turn OFF/ON BT on DUT 3. After DUT's BT is turned ON, Remote would reconnect to DUT Failure: Bluetooth settings UI continues to display Connecting when BT was Turned OFF and ON. Root cause: - This is a connection collision case where remote is not responding to DUT initiated SDP attribute fetch request for AV. AV holds outgoing connection for sometime and meanwhile remote starts AV connection from its end. Then DUT disconnects the SDP channel after a second without waiting to fetch requested info, and this confuses DUT's AV state machine. The outgoing connection could not proceed as incoming AV L2CAP connects, because DUT's AV state machine is not equipped with handling this scenario. On incoming connection timer expiry, it does not start AV media channel as it finds AV Open has not been done from upper layer after incoming L2CAP got connected. - When the incoming path 2s timer expires, the DUT checks whether Open has been called after incoming state is set. This is not the case here, because Open was triggered earlier as as part of the outgoing connection. As a result, A2DP cannot connect at all. Fix: - Properly set collision flags for handling AV connection collision. - Update BTA AV handle even when BTIF AV state machine is yet to be built. Bug: 30362987 Change-Id: I02a3adb62479b0f762bc792a5727d06e11eaaa52 (cherry picked from commit db1e3a5fbb41cd1faf572c5f89ec9212c5ff2986)