Bluetooth: GAP: Add NULL check before accessing the Node

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

Change-Id: Iedf1e3550037d2ce5c422ace25c07c05da7329a7
Bluetooth: Clear remote suspend flag on play state change.

Remote device may initiate AVDTP Suspend within 3s of AVRCP pause,
in that case flag is set which prevents further a2dp data.
In case DUT initiates play before standby, remote suspend flag
won't be cleared and start fails.
Change made to ensure on Avrcp play state change event, flag
is cleared.

Change-Id: I1a0f96086030cf06bbebe3de0f2bead7846c19e3
Bluetooth:DUT to initiate Sniff after A2DP Pause.

Host does not initiate Sniff after A2DP pause.
Change is done in HF Power Manager table such
that Sniff timer starts once HF is in idle and
A2DP is paused.

Change-Id: I25608db3e2b8cfe8f44b10894d5d3a7388b54ed5
CRs-Fixed: 545681
Bluetooth:check vendor data pointer while parsing AVRCP command

Changes made in avrcp_pars_vendor_cmd to have NULL check for
vendor data.

CRs-Fixed: 574911

Change-Id: I6faf9ab30fa836087bb1b3c79151f7d0f347015d
Bluetooth: modifies write Client Conf characteristics api

This changes api to use write_request to enable notifications
for hid reports. it ensures notifications enables by
receiving successful  write response for request.

CRs-Fixed: 576382

Change-Id: I4c18f2cb727a7aabddaa5c965b29eca78843fc7a
Bluetooth: Avoid overlapping Disconn commands from Host

In case the host doesnt reply to the pairing request,
and waits for the timeout, the timout causes a "disconnection"
and is folllowed by another one by SMP state machine,
at the pairing complete event. This changed adds a check,
to ignore the disconnect command, in case another one is in progress
to the same link

Change-Id: Ib71740bed80375fb44487e89600f05519cd58b10
CRs-Fixed: 546854
Bluetooth: Handle getCapability failure for Incoming Connection

This change takes care of handling GetCapability failure event for
Incoming Connection. DUT will initiate disconnect if GetCapability
response is failed.

Change-Id: Icc121739cc3da6f999a09f2e576cbfaec3007155
CRs-fixed: 506864
Bluetooth: Allow connection update after conn update request is enabled

This change maintains the PENDING state for connection update
requests sent by the remote. This allows the central to update
the connection parameters requested by the peripheral after the
conn update requests are enabled (after SMP pairing and service
discovery completes).

Change-Id: Ib17730ee011e2457de5d8b1a2c2eba9a88f71bc7
CRs-Fixed: 562319
Merge "Merge "Bluetooth: HID: Cleanup Outgoing connection for Pointing devices""
Merge "Merge "Merge "Bluetooth: HID: Cleanup Outgoing connection for Pointing devices"""
Merge "Merge "Bluetooth: HID: Cleanup Outgoing connection for Pointing devices""
Bluetooth: Check A2dp state inside mutex lock.

In race conditions A2dp state was updated to suspended
after checking and before acquiring mutex lock.A2dp State
should be checked inside mutex lock to avoid checking against
inconsistent state.Prevent overwriting of state
from AUDIO_A2DP_STATE_SUSPENDED to AUDIO_A2DP_STATE_STOPPED
which would again start the data path.With this change we make
sure to check state inside mutex lock and also avoid overwrite
of state in case of write failure.

Change-Id: I1d74490057fea06113dcf4e0666387f4d5224157
CRs-Fixed: 572205
Merge "Merge "Merge "Bluetooth: HID: Cleanup Outgoing connection for Pointing devices"""
Merge "Merge "AVRCP: Proper handling of Fragmented AVCTP packet""
Merge "Merge "Merge "AVRCP: Proper handling of Fragmented AVCTP packet"""
Merge "Bluetooth:DUT to initiate Sniff after A2DP Pause."
Merge "Bluetooth:check vendor data pointer while parsing AVRCP command"
Merge "Bluetooth: Clear remote suspend flag on play state change."
Merge "Merge "Bluetooth:DUT to initiate Sniff after A2DP Pause.""
Merge "Merge "Merge "Bluetooth:DUT to initiate Sniff after A2DP Pause."""