Bluetooth: Avoid bluetooth crash due to VS command for clear whitelist

This patch removes the clear AD white list VS command which
needs firmware update to work correctly.

Change-Id: I68124e7f8198456c83c171094ee7807f16e1140a
CRs-Fixed: 586204
Bluetooth: Handle sub system restart gracefully

Before triggering the restart of Bluetooth stack as part of sub-system
restart, make sure of proper cleanup of handles by informing the ssr
case to vendor modules by calling appropriate functions

Change-Id: Ic684ba13815ee21bb1706b6d6792e6bf17fa8286
Bluetooth: Disable Content Protection

Revert change 536691.
Content Protection needs to be disabled by default.

Change-Id: I7ce3fbe7b3b4ed9dba2962ad9b519c9261e2d3d6
Bluetooth: Handle SDP discover failure properly

AVDTP connection Request is sent even when the SDP discover is
failed to get the remote AVDTP capabilities. This change will
avoid the AVDTP connection in this scenario and also starts
pm idle timer for sniff.

CRs-Fixed: 581088

Change-Id: Ie51fcdd9ebea854ed7ca0f9917e244a117ccd764
Bluetooth: GAP: Reject incoming pairing if already in progress

This patch properly rejects incoming pairing request from remote device
if already in pairing state. Without this patch it was observed that in
some corner cases pairing was auto accepted for remote device while
pairing was in progress with another remote device leading to inconsistent
behaviour.

CRs-Fixed: 585463
Change-Id: Ic5489e79d1e41c944648e6064ecd25e0a73df669
Bluetooth: Acquire wake lock to avoid power collapse

This ensures that target wont go into power save mode
when there is an acl is active and timer are running.

Change-Id: I8a5d691760e7c9602f9c4d5d366825302aebd416
CRs-fixed: 576239
Bluetooth: Changes to implement A2DP Sink Support

 - changes in core stack and adaptation layer
 - awareness of sep type

CRs-Fixed: 580884

Change-Id: I9affefdd2d00597545e49c593ef3bddb110d4c9c
Bluetooth: link audioTrack and sbc decoder

 - load sbc decoder library dynammically
 - interaction with audiotrack module
 - buffering mechanism
 - feturize for OSS builds

CRs-Fixed: 580884

Change-Id: I48373c77a02746f406f4a9c790d36dcd4924558c
BT: Absolute Volume feature should be enabled only for A2dp device.

Absolute Volume feature should be enabled only for device which
supports A2DP Sink and AVRCP. This change will make sure this
feature is not enabled for only AVRCP supported devices.

CRs-fixed: 582262
Change-Id: I75509d0b0fd1b06fa08390940a327dd2887d7562
Bluetooth: HID: Reset Idle timeout to 0 while hid disconnection

This patch resets idle l2cap timeout to 0 while disconnecting HID L2CAP's.
without this patch it was observed that after hid l2cap disconnection,
ACL disconnection was taking 4 seconds.

Change-Id: I39f16d3981f4a8b5cdf28cd7865631900007d5b8
CRs-Fixed: 586886
Bluetooth: Move to proper state on SDP failure

After SDP is failed for AVDTP connection, we should move
to proper stable state.

CRs-Fixed: 588108

Change-Id: I58e60cd29e9f2ede98cb514a7f45774a3bc1d8ac
Bluetooth: Updated SCO sniff policy.

This change makes sure that DUT
uses correct Sniff policy when
in SCO connection.

Change-Id: I291a3ebda86eebe8d0b5def271404350a9a91b46
CRs-Fixed: 586744
Bluetooth: Fix for device in paired list after cancelling pairing

This patch adds an additional check before determining the smp
status of the disconn_cmpl event received from the SOC.
In case the disconn_cmpl is sent by the controller, the reason
form smp failure is verified before terminating the smp delay
as a result of authentication failure.

Change-Id: Iaea219077b4f8a64ed346b58380d11fd5dbe2d03
CRs-Fixed: 573572
Bluetooth: Fix timeout causing GattClose

This change increases the timeout between service
discovery completion and GattClose to 3 sec from
1 sec, to prevent disconnection in case of HOGP
profile.

Change-Id: If6fa54be2b7e937307cc63b44ee5f6ad106217b3
CRs-Fixed: 563123
Bluetooth: Remove conn update at conn_cmpl to prevent encruption failure

This patch removes the conn update sent by the host based
on previously stored preferred connection params at the time of
new connection to prevent encryption command being
disallowed by the controller

Change-Id: Id9f14f92cfed27f8e1d8d285475cfd110ef5168e
CRs-Fixed: 585765
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.

CRs-Fixed: 576911
Change-Id: Ia64e1e90aae8c4e0cc52643ce3bbbb1332fe5b66
Fixes host behavior for pin or key missing encryption issue

When the host receives encryption change event with
pin or key missing status, the host was disconnecting
the connection to the remote device. This change
makes the host send Pairing request in this scenario.

CRs-fixed: 562960

Change-Id: Iba2aff00d5e6ef0932570678482054d9748df225
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
Bluetooth: GAP: Properly set btif_pending_mode

This patch properly set value of btif_pending_mode.

Change-Id: I3ac88dc69d3de474516600adfb17f14777d63bed
CRs-Fixed: 538672
Bluetooth: HID: Remove device from nvram on auth failure

This patch removed hid pointing device from nvram on authentication failure
due to pairing timeout or when wrong passkey is entered. Without this patch
it was observed that hid pointing device was always shown in paired list
when DUT was restarted after authentication failure.

Change-Id: I69c43d2ed982d5d5abfd5707db90ef4b5c65b34f
CRs-Fixed: 589376