frameworks/base/: Fix black wallpaper issue when home pressed.

In the specified usecase, there is a completely new set of
windows that appear on the screen during rotation. And the
existing code in the framework ignores the drawstate of the
hidden windows.

Wait till the drawState is ready for the hidden windows also.

CRs-Fixed: 521758

Change-Id: Ibd96502059c84210ad84ecb03aac5eca28f3c9fe
Camera: Add support for QC camera features.

Added APIs and keys for all QC features. This
will enable application to get/set paramters.

Change-Id: I58a53c7b9133a3acddc34b268dac086c9562d533
Media: Add quality levels for two 4k resolutions for camcorder

Add quality levels for two 4k resoltuions for camcorder
(cherrypicked from commit 96cade18e068306a3d04ec943b4c61e2817ea54b )

Change-Id: I1c9e9d0bafd566071e98d335ca6f2de6eb96a71d
(cherry picked from commit d3ff34920391435de1cda07f1674ac4047b4967e)
(cherry picked from commit 152f78ae3f314a6efb02a4602bce4fba65569c48)
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)
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)
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)
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)
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)
NLP Combo feature : screen network locations

If Combo Provider is listening for network
locations, it will want to screen these locations
before they are sent out to clients.

CRs-fixed: 483398

Change-Id: I3156e85307b40aee9fb06b433c83153c84b8ed42
(cherry picked from commit ddbb57088ac245defa661d377408cb6985e67562)
(cherry picked from commit 53c26d1255ffca867e9446e1f4fd5b9e8cfdb7d0)
(cherry picked from commit ad1c7fe0b66211fcb0749de434a6a939d1bc1978)
Fix: FATAL exception during Autonomus group creation failure

Failure in forming an autonomus group causes FATAL IllegalArgumentException
exception as deviceAddress will be empty in mPeersLostDuringConnection.

Added check to verify if it is autonomus group before trying to remove
any peer or clear device list.

Change-Id: I486463782e85c7f0031b6f62ec5aaf8afb11b652
CRs-fixed:554767
(cherry picked from commit 55bb4f6dd9fc3e5c8aa7c8bc8ece01f0603e0a83)
(cherry picked from commit 3dbbf14276a403841e1d69cd2624dfad74d6f540)
(cherry picked from commit 8642fcd59686e54c1ea215016bfa7562d17b27c0)
gps: added 1021 gid for gpsone_daemon

Gives system_server gps gid to allow for
communication to gpsone_daemon

Change-Id: I59d7e99ec996891b19fa15a3ed66e055e6bccad8
(cherry picked from commit 059dd10116b75d60bc8bc5ee52030e28fcf740a5)
(cherry picked from commit 3dfcb80ede3707eb8dbe7c607b22393b66829ea1)
(cherry picked from commit ea7473eab71834c46e8f61d95bf269abb755f95d)
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)
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)