Bluetooth: Check A2dp device priority.

Check for device priority in stack before sending connect
request on time-out for remote open event.

Change-Id: I191f5f3089d7945cbd6facc223a341452462421c
CRs-Fixed: 510957
Limit number of sbc frames to fit into single MTU

Calculate number of sbc frames to fit into single MTU
for EDR capable remote. This makes sure the maximum
utilization of available bandwidth keeping the bitrate
as high quality one.

CRs-Fixed: 573451

Change-Id: Ibe917a303284f3eba9f845309083cd08b78680d0
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: A2DP SINK audio focus and state handling changes

 - handle audio concurrencies
 - handle resume stream in A2DP SINK

CRs-Fixed: 584276

Change-Id: I24b0644ba552d5ebaad9a371aa6ae42fcfddee49
Bluetooth: Re-start sniff timer on Signalling connection.

On ACL disconnect switch to idle state if DUT is in
opening state.
Start/Stop sniff timer based on signalling channel
connection / disconnection.

CRs-Fixed: 590614

Change-Id: Ic3f268703067155ffd55a43f320ce199641c6b3f
Bluetooth: A2dpSink handle and update supported configuration

 - updated only mandatory configuration for Sink
 - handle statemachine for unsupported configuration
 - reset decoder only if configuration is accepted

Change-Id: I3542ec1643fddd5e0f992a9fd65176776c0c616c
CRs-Fixed: 584843
Bluetooth: Handle Transient Audio Focus Lost

Changes made to Handler Transient Audio Focus in btif layer.

Change-Id: I7d25a4b9b13ea35784a8232617b9a8c0c55ec5b3
CRs-fixed: 590190
Properly handle outgoing connection request in opened state

Properly handle outgoing connection request in opened state.
This happens in race condition when we try to connect to a remote A2dp
device from Bluetooth Settings UI and simultaneously there is incoming
connection request from previously connected remote. This fix addresses
the scenario where because of incoming a2dp connection from second device
btif moves to opened state and then the outgoing connect request is
received in btif for first device. This scenario is handled by gracefully
rejecting the outgoing connect request from btif layer for first device
if it is already connected by the incoming connect request for second one.

CRs-Fixed: 595148
Change-Id: I308bad99bd26adb528f7b97e6cc5bbdfaf939cbb
Bluetooth: Flush Que during suspend

 - flush remaining packets in que during suspend.
 - call AudioTrack pause and start during suspend
   and resume

CRs-fixed: 597359

Change-Id: I4360c9f5ed15612b5e3c712c6aee204d4251e59b
Bluetooth: Second time stream-setup without signalling connection down

 - handle stream setup events  in Idle State

Change-Id: Ib8b073540ac2d6d392d2cdbccca84f3a35138d33
CRs-Fixed: 584848
Bluetooth: Check for device address.

Do not update app for disconnected state
if device address is same when moved from
idle to opening state.

CRs-Fixed: 619008
Change-Id: I53be400d1d7c9a84ca9d9a75b6b6f010975cf0cf
Bluetooth: Enable saving LE services discovered to NVRAM

These changes allow the LE services discovered to be saved to the
bt_config file and send a HAL callback at the discovery completion
to set the device UUID property, in order to connect to the
service at subsequent connections.

CRs-Fixed: 587389
Change-Id: I8ce145907f58f6711c9c59990aec82187670bd9f
Bluetooth: Reset SSR while in SCO.

Sniff Sub rating should not be used
when Link is in SCO connection since
the subrating value is higher, the link
would take more time to process ACL data
while in SCO connection causing unwanted
results like delay in SCO disonnects.

CRs-Fixed: 589299

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

This patch properly set value of btif_pending_mode.

Change-Id: I3ac88dc69d3de474516600adfb17f14777d63bed
CRs-Fixed: 538672
Bluetooth: Changing vendor ID as Qualcomm for Device ID Profile

As per Specification, Device providers should configure the
vendor ID as the Company Identifier provided by the Bluetooth
SIG. Hence Changing vendor ID as Qualcomm for Device ID Profile.

Change-Id: I852113d2849ea4fd0725396fc92f320101aab0d0
CRs-Fixed: 547495
Bluetooth:Not Implemented rsp for unsupported AVRCP commands.

Changes made to ensure DUT responds as not implemented for AVRCP
pass through commands which are not supported by DUT.

CRs-Fixed: 551638

Change-Id: Ie10e74e2a399bb420f55c55005600c945b53bfc2
Bluetooth: GAP: Add NULL check before accessing the Node

NULL check added before accessing the Bluedroid interface
layer configuration node variables.

Change-Id: Iedf1e3550037d2ce5c422ace25c07c05da7329a7