Bluetooth: Do not go for inquiry in BONDING State

This patch fix a special case where DUT is paired & connected
with only one device, which has capbility to intiate paring as
soon as DUT unpair same remote device. As DUT is paired with
only one device, In this case Once DUT unpair remote device. DUT
goes for inquiry & at same time remote device initiates pairing
if Bludroid stack recieve pairing request before the inquiry
start then DUT should not go for inquiry, As DUT is already in
BONDING state.

Change-Id: I0e1ec0fdb963921629e5c52f495ae2013e679a03

SDP: Fix for SDP query in certification test with Invalid PduSize

Bluedroid stack is only checking parameter length and input data length.
Added an extra logic to handle invalid data after getting last valid data.

Change-Id: I47eafb2c24e73b472c31a2fb47e02d48c5e04f6c

Bluetooth: GAP: Don't update short name if the device paired

Don't notify the BT APP about the shortened device name which
will be part of EIR response,incase of device is already
paired.

Incase if the alias name present for that device, it
will notify th BT APP alias name as the actual device name.

Change-Id: Ia64e1e90aae8c4e0cc52643ce3bbbb1332fe5b66

Bluetooth: GAP: Update name as part of Discovery of services

Update the remote device name to upper layers as part of
discovery of remote device services.

Change-Id: I24d899c1f5ccc81d8b0c4257abae16a7bf5d4682

Bluetooth: GAP: Handle security failure with invalid handle

Return NULL incase of invalid handle when finding a device
based on the handle. This will make sure to avoid giving
a invalid entry from the device list.

Also send authentication failure in case of invalid handle.

Change-Id: Ia95d10ae95cfa1750386233ee90f01899061294e

Bluetooth: Handled delayed info rsp from remote during SDP

DUT initiates connection with out waiting for information response
from remote device during SDP.

Change-Id: Iee0251f8f81923b1291983b66b31c78e14d21af0

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

Bluetooth: Store local and remote io caps before RNR

Stores the loc_io_caps nad rmt_io_caps when the remote
name request is called, and these will be retrieved
in the function bta_dm_pinname_cback.

Change-Id: I4b2156d7101acabb1ded65bd21d49a9c4551f8db

Bluetooth:GAP: Remove bonded device info on pairing rejected

Change-Id: Ic9e5e1ed70d304edd3dbca82a73833753fa0093c

Remove bonded device information from the BT-IF layer storage
When authentication failed with reason pairing not allowed from remote.

Change-Id: I71b902ae201e32a0fb18fd3bce52fd86e8cbcdd5
CRs-Fixed: 902577
9 files changed