Bluetooth: Allow the HFP app to set features.

This change gives the flexibility to the HFP
APP to update the features supported, rather
than using the hardcoded bitmask in BT stack.
CRs-Fixed: 482189

Change-Id: I2c2be9b71cef94dddb1417d3b924d1d8bb47a759
Bluetooth: Enabling WBS feature in BT app.

Bluetooth HFP statemachine will enable
WBS support based on reading system property.
This will enable Codec negotiation bit mask in
BRSF AT response to claim support of WBS and
codec negotiation.

Change-Id: Ia01212bd11edf5cd53c4d54ea5b9af65737a40b4
Bluetooth: SAP: Add SAP high security support to Bluetooth APP

This change consists of:
High security authentication changes

Change-Id: I01cec39955e2df25be7b7bccd1b0d5b3f22b7d85
Bluetooth: Add send file information before retransmission

This patch adds send file information before retrying failed file transfer.
without this change, file outbound file could not be sent as file
information was missing resulting in error.
CRs-Fixed: 505101

Change-Id: I53e828672d107e80a600fbbcc73c7b0ec7bf0737
Bluetooth: Add docx and xlsx format support.

Add docx and xlsx format to acceptable share inbound types to
send/receive these file format using OPP.

Change-Id: I99bcd644cbbabdfef306604562b0836a86440e58
CRs-fixed: 483041
Bluetooth: Setting bluetooth.isEnabled on BT state change

btwlancoex process starts based on the bluetooth.isEnabled
property which is used to indicate Bluetooth on/off. If BT is
already turned on before rebooting the phone. btwlancoex process
does not start, As  property is not getting set, Even though
bluetooth is turned on successfully after rebooting phone, if
bluedroid stack is enabled. Setting the property from adapter
state,Once BT state change(ON or OFF) is recieved from
abstraction layer in bluedroid stack.
CRs-Fixed: 496729

Change-Id: Ieae4356064e98953287c842e0c60c76c56e7f1c6
Bluetooth:Aquire a wakelock to bring the display up.

Acquire a wakelock during PIN code request to bring up the LCD
display when the remote device requests for pairing.
CRs-fixed: 466069

Change-Id: I9a9f45178ec286d6c6b570625669f5532bfe3d6b
Bluetooth: Proper Connection with multiple Headsets

When paired with multiple Headsets,connecting/disconnecting randomly
between them DUT was connecting HS to one device and A2DP to other device.
CRs-Fixed: 465980

Change-Id: I0aa1bf1c9c75157fd19710beeba69eb680a71439
Bluetooth: OPP Update progress in worker thread

OPP throughput was seen very less because of the progress update
from BT Read/Write path. Moved it to worker thread.

Change-Id: I884356dc8b42a7f7eca1b8581e3118d5ec2ce9e2
Clean up file when file transfer is aborted by remote/local device

Delete File when the transfer is terminated due to
Remote's BT is turned off, remote being taken out of reach or
remote is turned off properly. Also delete the file on the next
reboot while the previous inbound transfer was interrupted by
local device power off.
CRs-Fixed: 506182

Change-Id: I96211e701610322881eda8345d04898ae3f18ab6
Bluetooth: Add support to Receive/Send OPP file with size greater than an int can hold

Change-Id: I5d70718be14c3bbbdccaf52971ce03c0879a6a71
CRs-fixed: 366818, 468659

Conflicts:
	src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java
	src/com/android/bluetooth/opp/BluetoothOppObexServerSession.java
	src/com/android/bluetooth/opp/BluetoothOppReceiveFileInfo.java
	src/com/android/bluetooth/opp/BluetoothOppShareInfo.java
Bluetooth: Query BluetoothPhoneService at BT ON.

This will allow the application to have
updated values of call states.

CRs-fixed: 506853
Change-Id: I0b1e9cdfd7ecac05062c82aa563849f49a5ae520
Bluetooth: Update the roam status.

This change makes sure that roam status
change is updated to headset immediately
instead of updating at network service state
changed.

CRs-Fixed: 503919
Change-Id: Ia5c68e2158241459f48a1718689361ad0cd6fbf8
Bluetooth: Added  Shared Preferences to restore tethering setting

Added a Shared Preferences to have the tethering setting persist,
so that during the BT on/off the value can be restored and based
on the value tethering settings will be restored/altered.

CRs-fixed: 506194
Change-Id: I3fffbb78712f4177178531c6c202b786bfcd9d39
Bluetooth: set apk format as acceptable shareinbound types.

Adding apk format as a acceptable inbound types ,to be able
to receive these file formats from remote device.

Change-Id: I5175b634b88418b0d5c9baaedb84a48fe0d97357
CRs-fixed: 497427
Bluetooth: Send proper track number

As per specification
RegisterNotification - If no track is currently selected
then return 0xFFFFFFFFFFFFFFFF in the interim response.
Changes are made to ensure return above value if play state
is not playing.

Change-Id: Ib27eeeb65fe6659178658e58eb8f875168b236df
CRs-Fixed: 519337
Bluetooth: Send pairing cancel intent only if pairing in progress

This patch sends pairing cancel intent on acl disconnetion only if
pairing is in progress. Without this patch, in case there was an
ongoing pairing while acl disconnect is received for some other
device, ongoing pairing was getting cancelled un-intentionally due
to side-effects caused by dbff9ae0ebdcdf63db6c125331002dbb6f50f953

Change-Id: I859f79a8b7f196fe7617419dbbd6284a47228700
CRs-Fixed: 508911
Bluetooth: Add trust device feature.

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

Change-Id: Iee491db2e5b6090761a4f42467ac36ed53923fc4
CRs-fixed: 523135
Bluetooth: HID : Add support for Set Idle and Get Idle commands

This patch adds support for Get Idle and Set Idle command handling
in jni and HidService which will be used to provide interface for
sending thse commands to HID Remote device.

Change-Id: I066d47c022905a39c11d365a9d26d128f94fe2f6
CRs-Fixed: 522511
Bluetooth: Connect only A2dp Sink devices.

DUT supports only A2DP source role,it should connect
only with A2DP sink devices.RENDERING service must be
supported by A2DP sink devices.Hence try to connect A2DP
source only with these class of devices.

CRs-Fixed: 507306

Change-Id: I93d9d30185444473e79008b47b607802ec5e7f3e