Bluetooth: Add Get/Set socket option to the Rfcomm socket.

Introduced Get/Set socket option support to the Rfcomm socket.
Currently Rfcomm socket supports get/set modem bits socket
options.For other sockets it will return error.

CRs-Fixed: 557180
Change-Id: Ia1779293b643c22d3f754c7f405646d42eb94963
(cherry picked from commit 3e7a06fb96709594d190db0686dfef96237bd6c4)
(cherry picked from commit a151f0fb3b56ac424f89b52f1a00616931b5c401)

Conflicts:
	btif/src/btif_sock_rfc.c
Bluetooth: Added HFP features bitmask function.

This function gets excuted when application
sets the value of HFP features support and
ignore the stack's default bitmask.

CRs-Fixed: 482189
Change-Id: I2e355c4e3aed35ca4d1f65001d4641f94e1f2b46
(cherry picked from commit 8b5fca8e0a01a695e1cb9150dd84fa24f8218e00)
(cherry picked from commit 2739781e3c4d0808f64677cbdd7a27851d9cce14)
(cherry picked from commit 698deaa4fc25a7a03f1954ec5f2995cc1091051e)
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
Bluetooth: Allow Carkit to play just after call

Removing check in stack where AVRCP Play and Pause commands
are being dropped if carkit initiates play or pause within
six seconds.

Change-Id: Ibb04223de746f528b356e78bd65130d3fd526a44
CRs-Fixed: 517806
(cherry picked from commit d0c1d55dc089eee82733129996ce433cf81f0110)
(cherry picked from commit 09e5703c3b140f095611f5169418b1e77256850a)
(cherry picked from commit 4c20c56d3808670eccdf21de2b250f531d5221da)
Bluetooth: Changes to support AVRCP 1.5 feature

Changes in stack for AVRCP 1.5.
- SDP and capability changes.
- Changes done to Register Callback functions with L2CAP
  layer for Browsing channel on a particular PSM.
  L2CAP through callback sends indication to AVCT layer
  of connection, disconnection, data and congestion
  indication.
- Changes made in AVCT and AVRC layer to support AVRCP
  browsing response
- Changes made in BTA layer to handle browsing command
- BTIF changes for Browsing and address player command.
  Added  Address player and available player change
  notification.
- During DUT initiated disconnect,changes made to
  disconnect L2CAP Browsing channel.
- Seprate Queue added in browsing channel to handle
  L2CAP congestion.

Change-Id: I54a052349f672141f24f6e4d5db0f6f929a9c66d
(cherry picked from commit 86086a18f03a0bd7752ee1db6aa0fd8200087bc2)
(cherry picked from commit 68dc0d817e1d2bab37b64fdf398539bf78ddf5d5)
(cherry picked from commit ec20b2c8b2ac90a8edf39ad3e82012f61aadfc35)
Fix btif_dm.c by adding 2 FALSE
Bluetooth: HID: Add support for Set Idle and Get Idle commands

This patch adds support for sending set idle and get idle commands to
remote HID device, on receiving the function call from upper layers.
Also on reception of get idle time from remote device, upper layers
are infrmed using registered callback.

Change-Id: I14bc2dc349354fd87ef8aba25357514398532e87
CRs-Fixed: 522511
(cherry picked from commit df5f7aee169ea9a40b16326d24e54dd56ddbf273)
(cherry picked from commit 67f8323d4249b7d872f0eebcbd4741c08ab45141)
(cherry picked from commit 3bf9c3818076d3f1c40197e0a57f331fae6e5159)
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.

Change-Id: I97002a46a16d386a6c178445ac825788d6bf40c9
CRs-Fixed: 532234
(cherry picked from commit 3cacb2a9b77f32ad8db6af6ae90b8a94707769c4)
(cherry picked from commit b83ce18a9b7bcc9bb70ffc08f8fb44a31390b48e)
(cherry picked from commit f692bf0af2a1383c0dab09fb865f564cfda7afcd)

Conflicts:
	btif/include/btif_storage.h
	btif/src/btif_hh.c
	btif/src/btif_storage.c
Bluetooth: HID: Use dynamic memory instead while sending data

This patch uses dynamic memory allocation while sending HID output data to
remote device depending on size of data to be sent. Without this patch
fixed size static buffer of 200 bytes was being used for sending data to
remote device, which was resulting in crash in case data size to be sent
to remote device was greater than 200 bytes.

Change-Id: I5ed12422355e88d7ef0391668800d7619ca3b685
CRs-Fixed: 566444