frameworks/base: media: add support for DIVX files

Change-Id: I6e922c5d6e17ee590606268af97b7894f35d19ae
(cherry picked from commit 47fea00316203aebba194644f95ca58ef4ff4400)
(cherry picked from commit 1f3ab64cf5bb19ec2e8a996750f44389d4d07187)
(cherry picked from commit 066dff510ec44ee06c3a375e32133e21fbedf9fb)
media: Configure audio encode parameters only for valid audio codec.

Added extra check for audio codec in profile
(Cherrypicked from commit eed39d0053dee6649424867418e511b918b3c634)

Change-Id: Ie1ac5252e3d544ce61af2b3ae5080ec9c6966e44
(cherry picked from commit 81dfde16ffb3fc8f6b110a3df2921a3d3361db10)
(cherry picked from commit 8069457a313853247f2017237e29bcf3b3eb2323)
(cherry picked from commit db4bf86a6b50ce84b5a678476ee08c12f0fe272b)
frameworks/base: Add support for FM feature.

- Added changes for FM device

Change-Id: I61ab748166e3a8703054b664ba9c53da251f6b83
(cherry picked from commit fa1e277978d7bdf139fe2d790ef4a8b413d31c01)
(cherry picked from commit 2df42ca1ad2b04b9b4920d90ee60658150dfb210)
(cherry picked from commit 292b40317c470e9579bf875f43adecccc2f98b3e)
audio: add support for MSM audio formats

- Add support for EVRC, QCELP, and WMA formats
- Add definition for 5.1 channel recording
- Reference change If3676b88fa287b484ef8616c0a6b67177b61a720

Change-Id: I6b6e5ca98921adeadd2a3d76580fe85fb28eeaf0
(cherry picked from commit 10c4f204bb5ac78b9cf3854b536663ccd3d50333)
(cherry picked from commit 3f99cc5f134b0f00a52218ae1c0273cc11ae7702)
(cherry picked from commit 1d35b52c7c9cf1cfd3a3de372391a7a57f593af9)

Conflicts:
	core/jni/android_media_AudioTrack.cpp
audio: Define Proxy device

- Added Proxy device changes

Change-Id: I47921d696171de40bcfc30ebf99d4cafa0d4d4a3
(cherry picked from commit a8b7ed78ec088bc6924854661bacde51d7194ab3)
(cherry picked from commit cff61cfd964a1150919d9bfa7ec0ebfe35d5f247)
(cherry picked from commit bf8f7a2a574cb2e6aafae3efa6e4ee163ef65cf7)
audio: audio enhancements for playback and recording.

- Add playback and record support for EVRC, QCELP,
  WMA, AMRWBPLUS, WAV, ACE, and EC3.
- Add support for 5.1 channel recording.
- Add support for in call music.
- Add constants for call_state and vsid.
- Add definition for FM and proxy audio devices.
- Remove unnecessary format checks in frameworks.

Change-Id: If3676b88fa287b484ef8616c0a6b67177b61a720
(cherry picked from commit 6ca6cc15af88992ea485a458e67a8546b156672e)
(cherry picked from commit f65028d1752969bf43c853c1bb12ecd12055d5e8)
(cherry picked from commit b1952442db41188b74f331bd2397a579424821ab)

Conflicts:
	core/jni/android_media_AudioTrack.cpp
  audio: Support for MSM audio formats

  -Add audio format support for Voip.

Change-Id: Ie045ba926b3e1266afd3fb6fba09af3a55daaeef
(cherry picked from commit d1810964ecd2d50064a1fed51049ddc354b9a788)
(cherry picked from commit cd9c6dc56bedcabca77c2a01c6fb15f4d2e8edd5)
(cherry picked from commit 01c09aeae38716860ef1a806985cc946dca93f60)

Conflicts:
	core/jni/android_media_AudioRecord.cpp
audio: Add ifdefs for QCOM_HARDWARE audio features

Change-Id: I0ea423f9a28934dc1fee73bbb53c0d9d867877ff
MAP: Support MAP Server role on Bluedroid with javax.OBEX lib.

Handle No END OF BODY for MAP 1.0 Server Get request. Only the
last packet need send the 0x49(End of Body). For intermediate
packets, we need to send 0x48 (Body).

Move definitions for MAP or FTP Service Specific UUID and
Request type for CONNECTION_ACCESS_REQUEST intent to
BluetoothExt APK.

Change-Id: I04cfeb8d53b8f8c19160a2de1eb448a7ec1f2c41
CRs-fixed: 504042

Conflicts:

	obex/javax/obex/ClientOperation.java
	obex/javax/obex/ServerOperation.java
(cherry picked from commit 375d8f5e964263eadeeadd312384c1f8ebf9ff21)
(cherry picked from commit 7788ff7b9ff1ff5adbd38d9b7d8584d6a127dad6)
(cherry picked from commit 717672648b06678e3d1f10aa1f5c8791b4add846)
Camera: Add support for QC camera features.

Added APIs and keys for all QC features. This
will enable application to get/set paramters.
(cherrypicked from commit d0c5a0ee7e9af41320fed00ff324c6d0f22eb697)
Change-Id: I68c23aaf7267645efeb4d4743b390a048292b7fd
(cherry picked from commit ad2fd19b7ed6a610cab4bd3ae261178bcafa66af)
(cherry picked from commit cfcebdf9c402bb5f1976f07ba5dc1e15f5811fc2)
(cherry picked from commit 4ef4a5e937b2ec7355c5893c80dbc103d163364d)

Conflicts:
	media/java/android/media/CamcorderProfile.java
Add support for BeiDou and Glonass

Added masks for BeiDou amd Glonass
when deleting aiding data

Change-Id: I2d59f862b5c47204f053787038b3f180adc89eba
CRs-fixed: 498642
(cherry picked from commit 768a780bb1c74b708531257d8a2108c9fc3b62dd)
(cherry picked from commit 5d538b89d43f9c6d7c880ca494d62c0392e5dc0e)
(cherry picked from commit 45d57711ebb9f93ecada25fe5dc657323875fdc9)
Bluetooth: HID: Add support for Set Idle and Get Idle Commands

This patch provides an interface for application to send Set Idle
and Get Idle commands to remote HID Device. Support for these
two commands was missing from exisitng code, so existing code
design is reused to add support for these two commands.

Change-Id: I548362cc328498920b2dae740f1a76b2cc2d6a67
CRs-Fixed: 522511
(cherry picked from commit e98b0a3118b9c7a72f8e65e7e080259e6f032db8)
(cherry picked from commit 14fd26713fa406174f6d770506708dbbfd8c2a2e)
(cherry picked from commit 3a40bbc088c1c09fba649d40a7670760c17d5a38)
Bluetooth: Add trust device feature.

Add set trust feature where the remote device is marked
as a trusted device for subsequent connection.

CRs-fixed: 523135

Change-Id: I9bde4d7dfe07d9d63b58a661ed2413f45501bd7b
(cherry picked from commit 7ba8616bb2ba13558cdf0f00d7e1ae5b38a6ba53)
(cherry picked from commit 9bda1cf301ea06b0873d28fe1b0fcadaf2b1fb73)
(cherry picked from commit 50f4f58ae97f433b68e79a14cb662a7db9b410c9)
OBEX: Implementation of MAP and PBAP client role on Bluedroid.

Implementation changes to support MAP client and PBAP client
role on Bluedroid stack.

Change-Id: Ic75e0bea10b8420aef928d868cc25acd769d5620
CRs-fixed: 530274
(cherry picked from commit 8a9036e632092e7311e5009cb96a016b52bbacca)
(cherry picked from commit 1e4719192c82f89d0b2dba67ec99c72c77060f9a)
(cherry picked from commit abb73fd0ef2dd64c44944cff99dc81c1fd368d36)
Bluetooth: Changes to support AVRCP 1.5

Provide support for AVRCP1.5 so that remote controller
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: Ia1a340d1efaa16091e684f6ff7c738ce0accaee3
(cherry picked from commit 22af77236fccc546c6bec3956b0027fc1642ba1c)
(cherry picked from commit c9bc05d824197921a44d862026b3bc352d0f6a27)
(cherry picked from commit 3fad1502e08b9ccc7ecfd3f35be4b38190d9aa81)
geofence: Low power geofence HW implementation

HW implemntation overwrites the SW implementation

Change-Id: Id738f2808691c35e5507e1d557bc5351456953ad
(cherry picked from commit 8bf22473ed32b2b54698ed7f5ab57c32402cb0f1)
(cherry picked from commit 9f8539ff017acce6de46923377730e8475452aa8)
(cherry picked from commit 335ee83dd9651f9fd8a0d32a78b08890da77ebb6)
gps: LocationManager CTS proximity test fix

CTS proximity tests needs to use
GeoFenceManager for GeoFences to be
able to see mock locations

Change-Id: I7696ac4f0985fe526f1eb2dacd177b4db3c658ae
CRs-Fixed: 452172
(cherry picked from commit 43b1e745e0c05139419a0ba401ac39f2660eb82b)
(cherry picked from commit 1ee5f6effacd2e7eecd05829a81f5ad1614cae4f)
(cherry picked from commit d1c6929760149783e8c4927e8777fc7632ec1989)
Initial bringup frameworks-base

Change-Id: I6139dcf0242cc202d1dcef923047acd826279ecf

Conflicts:
	core/res/res/values/strings.xml
(cherry picked from commit e967ee02698585592bea9a276f4b706302c00da8)
(cherry picked from commit dae69c5768b0096cddccca07c72bf82fc57209eb)
Bluetooth: SAP: Add framework changes to support SAP

Bluetooth SIM access server (SAP) profile APIs added to the
framework APIs. As SAP server supports only disconnection
of SAP profile level connection this API is implemeted
along with other APIs.

It registers bluetooth state changed callback with the
adapter service,once there is a change in the bluetooth
state,it will bind/unbind the SAP service which is
implemented in BluetoothExt.APK.

SAP service, and other SAP Application layer is implemented
in BluetoothExt.APK.

Change-Id: I7215f503244c5ee277e83d60d6960f18559acfb9

Conflicts:
	core/java/android/bluetooth/BluetoothDevice.java
(cherry picked from commit 86d14a60283c2315bea8a34f24dd0c22139a136b)
(cherry picked from commit 718d372656fa7a456247c4909baac6e7104049f8)
Bluetooth: Support  HFP Client role on Bluedroid.

Implementation changes to support HFP Client role
on Bluedroid stack

Change-Id: Ie37e95d3b0e3f785af818fb495c835e420792f4d
(cherry picked from commit 072fad9a9a17c2a31660e7ac6cd6eba82d63fe50)
(cherry picked from commit 559508238c2fe1f8f10049549b8a29053399407c)