MAP: Support MAP Client role on Bluedroid stack.

Implementation changes from BTA and BTIF layer to support
MCE role on Bluedroid stack.

CRs-fixed: 530274

Change-Id: I8547b0f28338e83edabae969121872ca23fdcb36
Bluetooth: Get Scan mode state from storage

After BT turned ON Stack will get the previous scan mode state from
storage.

CRs-Fixed: 519661
Change-Id: I343351621c589dce777bb97455d1c511b84ce5ae
Fixes white list issues on bluedroid

Fixes add device to white list and remove
device from white list features in the
current bluedroid stack implementation.
HCI LE cancel create cmd is not sent from
the host before adding/removing device from
white list if a HCI LE create connection request
is pending. This change fixes this issue.

Change-Id: Iaf03549b662eb9b4318cf74c0786cc5e8d551658
CRs-fixed: 525649
Bluetooth: Set power manager state to active during rfcomm Rx.

Set the BT power manager state to active mode while
receiving  rfcomm data. currently the sniff timer is
not getting reset during incoming data and hence we
were going to sniff mode if the Tx is delayed more than
sniff interval, leading to data stall.

CRs-fixed: 531639

Change-Id: Ie9a7c9606159b7ea05c6a156e2cb82904a281f14
Bluetooth: Ignore A2dp writes based on setparameter in Audio HAL

This change will drop a2dp writes when the setparameter is called with
A2dpSuspended=true and resumes when it gets reset.

Change-Id:  I3bb334373414170254744d9233cbd2e66219bfa0
CRs-Fixed:  503739
Merge "Fixes white list issues on bluedroid"
Bluetooth: Adding Sniff feature for PAN Profile

Sniff feature for PAN profile was not implemented in power
manager module of Bluedroid stack, which was causing this
issue. Adding sniff feature for PANU role & NAP role to solve
this issue.

Change-Id: Idf568f53a317abd536edf34fbdf1733fdf53b7d0
CRs-Fixed: 525517
Merge "Bluetooth: Get Scan mode state from storage"
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.

CRs-fixed: 535245
Change-Id: I4b2156d7101acabb1ded65bd21d49a9c4551f8db
Bluetooth: Fix type of max latency and min timeout used in NVRAM

This patch fixes regression caused by commit
b6264c2464da28359291eb6785479b236bfc11e7 where Max latency and Min timeout
were being stored as 8 bit unsigned integers, instead of 16 bits unsigned
integers, resulting in loss of data. Also the values were not being copied
properly resulting in wrong values being sent during BTA_HH_ADD_DEV_EVT.

Change-Id: Ice29944baf29a7ed05698c9f87c3907f2f962a64
CRs-Fixed: 533988
Merge "Bluetooth: Fix type of max latency and min timeout used in NVRAM"
Merge "Bluetooth: Store local and remote io caps before RNR"
Revert "Bluetooth: Fix type of max latency and min timeout used in NVRAM"

This reverts commit f80d739f6b7ece608cf24bc050b4fb1c4e997a48 as wrong patch
set got merged.
Bluetooth: Fix type of max latency and min timeout used in NVRAM

This patch fixes regression caused by commit
b6264c2464da28359291eb6785479b236bfc11e7 where Max latency and Min timeout
were being stored as 8 bit unsigned integers, instead of 16 bits unsigned
integers, resulting in loss of data. Max Latenency and Min timeout values
were not being copied properly resulting in wrong values being sent during
BTA_HH_ADD_DEV_EVT. Also some other side effects left from the commit that
entry was not being removed from NVRAM and duplicate entry additions have
also been fixed in this patch.

Change-Id: Ia316646ea85c874902a979637a7681dbf492bd2f
CRs-Fixed: 533988
Bluetooth: Update security for HID Devices to Encrypt on BT On.

This patch updates HID Devices security mask to BTA_SEC_ENCRYPT from
BTA_SEC_NONE. Without this change it was observed that on BT Reset,
authentication and encryption were not initiated by DUT for incoming
HID Control L2CAP Connection Request from remote device.

Change-Id: I484fbae1294fde386bd7959467214f9968e381e9
CRs-Fixed: 536042
Merge "Revert "Bluetooth: Fix type of max latency and min timeout used in NVRAM""
Merge "Bluetooth: Fix type of max latency and min timeout used in NVRAM"
Merge "Bluetooth: Ignore A2dp writes based on setparameter in Audio HAL"
Use High bit rate if Remote is EDR capable

Configure A2dp bit rate to high quality if Remote is EDR
capable, else use default medium bit rate.

CRs-Fixed: 537288
Change-Id: Icb3d77a7b11347d9b2ea4d326bba519fd19bd321
Merge "Bluetooth: Update security for HID Devices to Encrypt on BT On."