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)
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)
Bluetooth: Add Get/Set socket option to the Bluetooth Socket

Introduced Get/Set socket option to the Bluetooth Socket.
For these APIs it will directly call the APIs of Adapter
Service.The corresponding APIs have been implemented in
the Adapter service of native Bluetooth APK.

CRs-Fixed: 557180
Change-Id: Ic49b66599fb3c4c500e52295895d708dbc172cc7
(cherry picked from commit 80a5a8d9f465458c5417e532cc98970951f2c675)
(cherry picked from commit 5b4c228467074d2b71e02cd36c220584dba818fe)
Bluetooth: DUN: Add framework changes to support DUN

Bluetooth DUN profile APIs added to the framework APIs.
As DUN server supports only disconnection of DUN 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 DUN service which is
implemented in BluetoothExt.APK.

DUN service, and other DUN Application layer are mplemented
in BluetoothExt.APK.

CRs-Fixed: 557180
Change-Id: I6ce1204ac6138e28ad7486f2855f0f7444ad3886
(cherry picked from commit 2e60ff9becce9db20d1714786f74cb29b9ad9c74)
(cherry picked from commit ff766d48a4f6eb1b2efeaefa30f8467deefccfa1)
SystemUI: Fix missing top task in recent panel.

If preloadRecentTasksList was not called or was called too
late and RecentsActivty already started and last top activity has
excludeFromRecents flag setted it might be missing
from recent application list.

Change-Id: Idf7153824805ceea9fcaf04ac645b73a5e93a4d9
Revert "cleanup from last revert"

This reverts commit a132ad0279a07df5336d62aead5a804b643d01c9.
Revert "Revert "Frameworks: Port hardware key rebinding""

This reverts commit f2b54eedeb7638eccb05f3b3b6c720e23154f0f2.

Conflicts:
	core/java/android/provider/Settings.java

Change-Id: I2cc13591122fa53bd7a9da2067fa7e90cd2cab08