Bluetooth: use different constructor for fast flag

 -  use different constructor

Change-Id: Idbf0b1a4f1d30c454685555e2128436750b92550
CRs-Fixed: 632070
Bluetooth: Handle missing key event

This change handles HCI_ERR_KEY_MISSING event
coming to the stack when user doesn't enter any
key and timeout happens.

Change-Id: If530e8acce3f105e4f1e2841bf350ee5330f389e
CRs-Fixed: 633972
Bluetooth:GAP:Handled LMP Response time out event during SAP connection

Handled LMP Response timeout error case during SAP connection by removing
the remote device from the bonded device list of stack.

Change-Id: Ia7e11fe36cd118e27319d8b5f9682b57ef3de8f7
CRs-Fixed: 637567
Removes bond when user clicks on cancel pairing

When user clicks on cancel pairing in the pairing
dialog pop up, the pairing done for that remote
device in the stack layer is removed.

Change-Id: I69bcf9f3e60ebc5e39cd9cdaa5ef8e6ba6e8d046
CRs-fixed: 626270
Bluetooth: Check for NULL String.

When JNI checks are enabled it checks for
NULL, so check for empty string for ATD.

Change-Id: I8b0cdafeb34737b95041ed6a6ec117fa32effa36
CRs-Fixed: 676866
Bluetooth: HID: Reject incoming connection from unpaired device

This patch rejects incoming HID Control Channel request from unpaired
HID devices. Without this patch it was seen that incoming connection
request was accepted for unpaired devices and connection was later
disconnected by DUT when it checked at upper layers that remote device
is not paired, which resulted in hid movements on DUT because of the
delay. Also handling is done for HID Pointing device to be set as
paired by setting linkkey as known when hid connection is up and vice
versa when hid pointing device connection is unpaired.

Change-Id: I4dda40f1f551e04179310e1dfffadf2692bcc5bb
CRs-Fixed: 568386, 568967
Bluetooth: To disconnect HH profile at device unpair

This change sends a hal callback to the HIDService, to disconnect
the HH profile to make sure that the profile conn state
is correct at the time of successive connections and pairing.

Change-Id: Id8f66b22608cd5154d2e4b8e2217621294d6e339
CRs-Fixed: 573541
HID: Add proper check before accessing connecting bd address

This patch adds check before dereferencing connecting device bd address
as it might have already been cleared. Without this check it was observed
that NULL pointer dereferencing took place in memcmp in corner cases.

Change-Id: I26d99e377b6028519dcd23c9aa5370980c6c544a
CRs-Fixed: 646427
Bluetooth: Delete node properly.

Update connect node when first node is deleted
in multiple node scenario.

Change-Id: Icce618e91405e1eeb5962450fabe350ef7128475
CRs-Fixed: 670102
Bluetooth:GAP: Update Local device name immediately to NV

Local device name not updating to NV immediately and dut is not
visible to remote for first time scan after local name change.

Change-Id: Ic47b17ef366a83da9b374077742c00661a2c3014
CRs-Fixed: 649529
Bluetooth: GAP: Update bonded device Name immediately on NVRAM

Bonded device friendly name not updating incase of battery removal
or adb reboot happens before the actual write onto NVRAM.

Bonded device alias name will be updated onto NVRAM immediately.

Change-Id: I6bb465ce00a7633e694695b8abbfdf31a463bfcf
CRs-Fixed: 654633
Bluetooth:L2CAP: Handled invalid MTU Size and invalid Hci lengths

 Added condition to check invalid MTU Size in L2cap Process Commands
 Handled invalid Hci lengths also from Codenomicon L2cap Test Suite.

Change-Id: I8c503ab77d8fca3728a84c3457d8115e31ee3a13
CRs-Fixed: 623275
Bluetooth:GAP:  Increased max no of SDP records that server can support

Max no of SDP records increased to 25 from 20 as Hid connect fails
with reason SDP_CreateRecord fail, exceed maximum records:20 in
in BTSanity_Bluedroid.

Change-Id: I0613f004766815902ac0a12e5e93f77b9d67580c
CRs-Fixed: 660830
Bluetooth: Initiate SCO after Mode change event.

This change makes sure that BT Host initiates
SCO connection request once host receives Mode
change event. It resolves a corner case where
remote failed to accept SCO connection when
initiated in between unsniff LMP request.

CRs-Fixed: 645701
Change-Id: I062b4bc5a9d9264b96220eff14bfed2373efb91c
Bluetooth: Ignore the Page timeout err for Remote name Request

Ignore the Page Timeout error for Remote name request for the
pairing process.

As part pairing process, it will again ask for the remote name
if the first request fails after receiving the remote device
features.

CRs-Fixed: 644986
Change-Id: I89db95e68d3f533ba89c14c8c46bbf428970a57f
Bluetooth: GAP: Changing the security to general bonding

Changing the security from non bonding to general bonding
in BTM_SEC_OUT_AUTHENTICATE condition.

Change-Id: I65d2ec4466e2bd81df2cc7e2936e05159a8645ed
CRs-Fixed: 676532
Bluetooth: GAP: Avoiding two disconnections from DUT

Avoiding two HCI_DISCs from DUT when remote initiated
connection fails.

Change-Id: Idd05ffbcaac427515a54216adcdd7dbe26cb21c8
CRs-Fixed: 647182
Bluetooth:GAP: Handled collision scenerio with headset

Handled collision scenerio by rejecting remote link key req
when collision occured in the headset reconnection

Change-Id: Ic6383abfc46ecd251ae483af85d8af3031c91cad
CRs-Fixed: 627025
Bluetooth: Add Carkits in Blacklist for AVRCP.

Add Honda Carkit and Denso Carkit address in blacklist
for AVRCP version.

Change-Id: Iec73f5401a41e4c6fc5e43d811cad2fffb19e06a
CRs-Fixed: 638764
Bluetooth: Add Carkits in Blacklist for AVRCP.

Add AVN 3.0 Carkit and Byom Opel Carkit address
in blacklist for AVRCP version.

Change-Id: I39770ad2c806d4dda11783240f7cf778dce05f5f
CRs-Fixed: 652882