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.

CRs-Fixed: 481263

Change-Id: I0e1ec0fdb963921629e5c52f495ae2013e679a03
Bluetooth: Bug Fix for Cancel Inquiry

During the interleave scan, the cancel discovery called at
the time of second LE scan was not cancelling the LE scan.

Change-Id: Ife1f939da7a1baf0dec2279ae810081793d47f7a

CRs-Fixed: 533041
Bluetooth: Send Interrupt req only when control is configured

This patch sends HID Interrupt Channel connect request to remote device
only when HID control channel has been fully configured, i.e. both sides
have sent and received configuration request/response for Control channel.
Without this patch it was seen that DUT was initiating Interrupt channel
request as soon as config request was received from remote side and before
sending config request to remote side.

Change-Id: I408f3a6f315c9a308717a138755e4d43a50a4b7a
CRs-Fixed: 532763
Bluetooth: Inform Power Manager about HID Host Connection.

This patch informs Power Manager about HID host connection complete
status which in-turn starts the inactivity timer of 30 seconds for
sending the sniff command on timeout if the ACL mode is still active
on timeout. Without this patch, if remote device is not initiating
sniff on HID ACL, host was also not initiating sniff, resulting in
unnecessary power consumption on ideal HID Link.

Change-Id: Icbe34e855112800b07f98f40dd7c6ae5e91c4cf6
CRs-Fixed: 531573
Bluetooth: Check for codec status before start stream.

On Enabling SCMS_T feature by enabling BTA_AV_CO_CP_SCMST_T,
Crash is seen as Codec setup fails and still DUT sends
AV_STREAM command, media task access pointers which are still NULL
due to failed codec negotiation resulting in Crash.
Fix involves check if codec setup fails AV is disconnected.

Change-Id: Ia6ee25a2c6b696e7ab930d81c0a89a182065032c
CRs-Fixed: 493784
Merge "Bluetooth: Do not go for inquiry in BONDING State"
Merge "Bluetooth: Bug Fix for Cancel Inquiry"
Merge "Bluetooth: Send Interrupt req only when control is configured"
Merge "Bluetooth: Inform Power Manager about HID Host Connection."
Merge "Bluetooth: Check for codec status before start stream."
Merge branch 'jb_mr2' of git://codeaurora.org/platform/external/bluetooth/bluedroid into cm-10.2
Move QCOM enhanced features under QCOM_SW ifdef

Change-Id: Icff5c9c3cafb7b326ae62f85da34f613694ff140
Bluetooth: Add support for disconnecting HID based on priority

This patch adds support for disconnecting the incoming HID connected based
on priority of remote HID Device. If user does not want to connect HID
profile for a particular remote device, priority of remote device would be
set to 0. Based on priority of remote device, incoming connection would be
disconnected if priority is 0.

CRs-Fixed: 532234

Conflicts:

	btif/include/btif_storage.h
	btif/src/btif_storage.c
Change-Id: I97002a46a16d386a6c178445ac825788d6bf40c9
Merge remote-tracking branch 'upstream/cm-10.2' into cm-10.2