Bluetooth: Security: Handle authentication rejected error status

Handle authentication rejected error status in failure scenario.

Change-Id: Ibd59d161ee5481ced2cb078a6ee6f4a6b045bcd4
CRs-Fixed: 516087
(cherry picked from commit 8561acde269b3f53dd9ef60cca13d0712e55c8ec)
(cherry picked from commit 0cec185b0d06ded1eee88a8430b10404201f3c7e)
(cherry picked from commit 2fc3517d134e66dde8f802f1980187c535aa15a9)
Add masks for BeiDou and Glonass

Added masks to the GPS interface
for deleting assistance data from
BeiDou and Glonass satellites
CRs-fixed: 498642

Change-Id: I3887338ffcbcd3977473354df9c77dbe834ac45d
(cherry picked from commit 0fc8bdf7b6841ec7395df2ded434a1009e36992d)
(cherry picked from commit 5e64b05c36a9eed4708013ab24bec01ce76d6f41)
(cherry picked from commit 70b149dc90d08e8f9a302445bb229bfbe0a8b15c)
libhardware: Add MSM string parameters.

- Add MSM specific string parameters for
 VoIP, Fluence, SSR, A2DP and ADSP

Change-Id: I3b0dee240c507c4cad14529e4a79404d6902be7a
(cherry picked from commit 24f52207794e7f2c7ab0cbf8cfd933d2f11adf1e)
(cherry picked from commit 4709458913009c131d6f7a3716c72c3f180eca8e)
(cherry picked from commit 3e57aadd82c38d87522121f41e184cea34cb3653)
Bluetooth: Support MAP Client role on Bluedroid.

Implementation of MAP Client (MCE) role on
Bluedroid stack. Include MAP Client Interface ID.

Change-Id: Icdf11b7f09a161e35aa3aa68b9b5fa315e18fd65

CRs-fixed: 539274
(cherry picked from commit 08b7d8403f875a33f108fc78ee65c6365a828a8e)
(cherry picked from commit cb0e99a3b946756709e007fba700911f930f4e67)
(cherry picked from commit 31cc136a0a3b4f6ea15307455497b1fd8cc0ced8)
Bluetooth: SAP: Header files changes to support SAP on Bluedroid

This change consists of:
Header file changes for Bluedroid SAP profile

Change-Id: I3c685967d6ed154f57fcd6f30b2402af9f42ec3f
(cherry picked from commit ff4940b8f32511fb870facc4eb2c36fb27890de0)
(cherry picked from commit d60cdf06d3220127e05a4f0db8fcda8c452b5637)
(cherry picked from commit 8bcadb8fef1f42a930b6bcf44c51cb8da58e9383)
libhardware: Enable MMAP interface in USB Audio HAL

Allow USB Audio HAL to write using MMAP interface
to support USB Audio AoA feature.

Change-Id: If23d2b618277ab64853fc1d778767a95482bedbf
(cherry picked from commit 1dc50e2b4d2bbac5d39edfd408d011cfaf4cd82b)
(cherry picked from commit bff3e5a4d2d0e61e6c35cfb3ef66be51ae98b3c8)
(cherry picked from commit ba5d429fe4817c48c089d34954daea21f321bf11)
usbaudio: fix for out->dev->lock remains locked in error case

-out->dev->lock remains locked in error case in out_write()
-Added pthread_mutex_unlock() in the error case

Change-Id: Ibbbd5ced1f9d469cfba3b33a94414d0b94affa8f
CRs-Fixed: 522054
(cherry picked from commit b68a95c63b87d9975169e2e168e9c7e2ad72f118)
(cherry picked from commit c90dbb369d3e446eec831201e9acb6b69a1222ce)
(cherry picked from commit 7c478ce6b2a4f8e18d4b533a496b021be3411b0b)
Bluetooth: Support  HFP Client role on Bluedroid.

Implementation of HFP Client role on
Bluedroid stack. Include HFP Client Interface ID.

Change-Id: Ib440099de75081b2bd8d5f01f4d9d1bb467294ea
(cherry picked from commit f89e86bf475a2a8431bf9849af6b11d9d9e88852)
(cherry picked from commit 48803a6e179c4d99e8e119e8fe51a91d9014acba)
(cherry picked from commit 0c589e335a23885224d51b14bdea93a6dc649eaf)
libHardware changes to support Avrcp1.5

Provide support for Avrcp1.5 so that remote CT is able to
browse the list of available media players on DUT and select the
media player from the available list of players, from remote.

Change-Id: Ib804efc3a42d14f302d0d1eec7ab34c9f13b5c7d
(cherry picked from commit 930dea418889c07a9ee3e6cfba3a57f7ef79df9f)
(cherry picked from commit 611745ca017c72079d4a3e7a2f7e953cd00350d5)
(cherry picked from commit 169a7fa2f35e68b5cc9a3f924a94b05a01b18614)
Bluetooth: Add BT_PROPERTY_REMOTE_TRUST_VALUE in BT property

Add the above property for device trust feature in bluetooth.

Change-Id: Ieab0dd140ac6080551f162a0517552bd469204f2
CRs-fixed: 523135
(cherry picked from commit 21988a88c838b2f4ceb0620ee13de35ba446520f)
(cherry picked from commit f8a47f7e8b71b44a61e2333bb93140c7bc31d178)
Bluetooth: Add Get/Set socket option prototypes

Get/set socket option function prototypes added

CRs-Fixed: 557180
Change-Id: Iff7ff159c8cf765416b00ac504fe345492d05088
(cherry picked from commit f1e7d32f1432b7e905764d7e163ffdd45ed722e8)
(cherry picked from commit 7596f9e76d77be1a527cbc59f1d7e8223ba50e12)
Bluetooth: Check A2dp device priority.

For incoming connections stack does not check priority
of device.Add support to check priority of device in stack
for incoming connection.

Change-Id: Icc78d22048800bd448a93f96ab31e2673ce28dca
CRs-Fixed: 510957
Merge "Bluetooth: Check A2dp device priority."
Merge tag 'AU_LINUX_ANDROID_KK_2.7_RB1.04.04.00.007.012' from codeaurora into Android-4.4