Initial bringup hardware-libhardware

Change-Id: Icf14dd5ade3e19b761da88adc57c29c3205c687b
(cherry picked from commit adc1fa6fe5b5cc00f87963a2a3ea7a78e5f7660b)
(cherry picked from commit db5af14fed766402f566b54d1878903763744239)
(cherry picked from commit e3207703127c9b8a81cbd5d304ff0f709f448938)
libhardware: Disable rotation animation on External

- Added two new flags to used to inform HWC about
  rotation and roation animation to HWC
- This is used to disable rotation animation on external

Change-Id: I05a9796781dcda088ae6cd64481cd4e581d5cf9e
CRs-fixed: 453747
(cherry picked from commit a2797fab183be9ea7204e08b93b22158d5f47573)
(cherry picked from commit ec20c671ed4d7eb9c509f5ae993fb38afb2027b4)
(cherry picked from commit de0cb7e104a422209560aaf6571013db28297885)
libhardware: Add allocSize hook function.

Add allocSize hook function to support the custom buffer sizes

Change-Id: I0d55195cbc02af1001d6164ce8fd55380750c029
(cherry picked from commit e328b4158b24bca82489b64edda5d8cd22f4ee79)
(cherry picked from commit e7b9626849bff68d4962dddfc375cef2bcc455f6)
(cherry picked from commit 866e905ba565b20713fe62b706f161a03179b9f3)
Bluetooth: HID: Add support for Set Idle and Get Idle commands

This patch adds the relevant callback prototyps for Set Idle and
Get Idle which is used for setting idle time on HID devices.

Change-Id: I4c528a510edd847bc6121ce0b875ae313f090b9c
CRs-Fixed: 522511
(cherry picked from commit e122a1bf6f35809af565d942e18dc1554178f2d7)
(cherry picked from commit a4fea13ce7b26665b42acb0ac476796d4df02eac)
(cherry picked from commit 4fa01b7befaf9c0d565d049b35637b1f0f56a656)
Bluetooth: Add support for set_priority for HID Host

This patch adds support for set_priority for HID Host. With this new
method, btif layer would be informed of remote HID Device priority
and would help in early rejection of HID incoming connection in case
User on DUT has unchecked Input device from Application.

Change-Id: I0c1ac7c8ad010b8d7e8aa5653e69568a45f4af92
CRs-Fixed: 532234
(cherry picked from commit 063afa250f7149884a121d887efb8167fede523c)
(cherry picked from commit 31d260d55ca227a16c94358ce8b34d864f342000)
(cherry picked from commit 38887c1a8e3efbe38014e3348be7a5711ac24036)
Bluetooth: Added new prototype of HFP feature bitmask.

This function will allow to let the BT stack use
the features supported by the Bluetooth HFP app.

CRs-Fixed: 482189
Change-Id: I9d015562e310ed2901ada91e692083dde7ac4614
(cherry picked from commit 3c8dae0b8a4992df535e0f78774131acb622e918)
(cherry picked from commit f0ec694b6ce0da55224519db1a0486897c7a18a8)
(cherry picked from commit 92159de8b07d7c8597509c8b3b0f52f2271736e9)
Bluetooth: Added function prototype for codec.

This function is used to notify the BT APP
about the codec negtiated.

Change-Id: I058a9b6409341d3fc849de1386174207bd9df1e3
(cherry picked from commit d2a4db8855da880f516a3493e2a4f18f5d4d6156)
(cherry picked from commit 09f95c774be3d38c7f38aa0dcb03f03126a18f4e)
(cherry picked from commit f8e01857e295905896645db9c253358027ceedde)
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 a6198fc9a2f6e1f455a7c48489f3aea53cbc5ebe)
(cherry picked from commit 4ce8e3104386a10fe90ef6ee28e52f6bc8719dc5)
(cherry picked from commit dae5474078cfe4aa5f923f07cae2448d32dd2f00)
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 c76541b88b50a9297fa2c036c0922ebb84b6e195)
(cherry picked from commit 99774c9c4d7efaac8905972920d734f8a11225ea)
(cherry picked from commit d8326df5bbd60c22402dcd1c5fdb2a69abfed88c)
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 4f22dec3d0c9a9a495a5c4d652d29ea3c8dc9d30)
(cherry picked from commit b734148bc2dd03ff0d2f1e6cb595064e8c4114cc)
(cherry picked from commit fafb68bb020ee24697fb38caae62e35a71413e00)
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 2a27675aa147d4051570107abe0dfb8a3dd1b0f6)
(cherry picked from commit ad23edab9137d9ac045e135b2faf29bf8ee5ce2c)
(cherry picked from commit 7c1f5bf0f29c40e459e80a659fd22f2faa13466a)
Bluetooth: SAP: Header files changes to support SAP on Bluedroid

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

Change-Id: I463543a45691b54577e145e066f89d46b6afd4be
(cherry picked from commit f5c125dee72ad101735fc9ccdf2a986934d3c8e7)
(cherry picked from commit bab09dff649619019326f0cfb68cef117177ec1b)
(cherry picked from commit 82edd4a84b8375e5a2431d884e1d49d861823188)
audio: audio enhancement in header file

- Add support for Listen feature
- Add audio paramters for FM, FM volume,
  Fluence, surround sound recording, A2DP,
  and proxy.
- update audio_stream_frame_size to support
  more audio formats.

Change-Id: Iacb248e3fcc9952d89b77f79b22462e1f3107f86
(cherry picked from commit b0cb621ec7dd96782d1563ddd00e72eb5d826f5f)
(cherry picked from commit 3afd159bf049ad9d062a0595ea45f06330e44923)
(cherry picked from commit b9969eecce45bdf94cc63ffd63a3d7bc86f11ab6)
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 5fc1e558afb81cf34d531e6a299e43c71224b66f)
(cherry picked from commit 43b5a06a0daaa5a92e20de4717dbc0f194603db8)
(cherry picked from commit 6c7f15741482f80c7a695f4313ffab4ae1d95cea)
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 b665c0ce1ff6f8561f1147d2525985319e64f59a)
(cherry picked from commit bd87a5d8c09a8c7e92ba3910a62c482f167b04fe)
(cherry picked from commit c549c3190adeeadaea5af0cb9d816c16594f3f31)
Bluetooth: Add Get/Set socket option prototypes

Get/set socket option function prototypes added

CRs-Fixed: 557180
Change-Id: Iff7ff159c8cf765416b00ac504fe345492d05088
(cherry picked from commit 5e38db0eec0a69ca1838a43dec23afe1dc441df1)
(cherry picked from commit ae04daff10605692f8dbdbf63968f2882626487b)
libhardware: Add fix for offload playback.

-Offload mode requires frame size to be unity.
-Tunnel encode changes results in a invalid frame size being
 returned to audio flinger.
-Add 24 bit PCM format as exception to linear pcm.

Change-Id: I23d1960b0a493da20f48de788bb13e6f055ebe03
audio: add set_parameters for listen hal

Add listen hal specific set parameters function so that Listen
service can call Listen hal directly, by passing audio hal. This
is needed since set_parameters call in audio hal does not guarantee the
correct return value is returned for any parameters set.

Change-Id: I647b9e7f841c8157e4eb597655166ea863a00925
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
libhardware: Add sound card status parameter

Currently audiod monitoring sound card status instead of adsp status.
This is a bug fix to monitor sound card. Audio HAL is going to use
sound card key to check sound card to status.

Change-Id: If2eba2aad2a70a414c8b258bba1ecd8f3a4b8df1