Bluetooth: Parse Bluetooth IOP file for Photo Vcard

By default no Photo Vcard send to Carkit even Carkit
requests for it. As remote device unable to parse
Photo Vcard. If Customer wants feature can be enabled
by Bluetooth IOP files.

Change-Id: I4a311a5c9e7ce12ebd574851bfac79ac5471808a
CRs-Fixed: 363669
Bluetooth: Implementing finalize() method.

Added finalize() in BluetoothA2dp.java for
clean up in this method.

Change-Id: I4f23333db782f8d9fc6fadb41d0b33fbe694329a
CRs-Fixed: 443585
Bluetooth: Reverted changes to avoid LM_SECURE option for BT Socket.

The LM_SECURE options sets the SECURITY_HIGH for l2cap socket.
Previously this option  is avoided for meeting SAP connection
requirements. As this is required for CTS validation, reverting
back the existing google implementation.

(cherry picked from commit 0b0c7c4cb1c3c557d2d45aaa7b9c21347a338c75)

Change-Id: Ibbeb57bf5984ec0af50441562de70b4ed744a0f0
CRs-Fixed: 387173
Bluetooth: PAN: Remove interface address from list incase of error

Remove Bluetooth address from list of Bluetooth interface addresses
if exception is thrown while configuring the interface.

Change-Id: I6eaca820abfff09564a26c9521bfab7d03051825
CRs-Fixed: 434952
Bluetooth: Clear the device from list only when device is disconnected.

CRs-Fixed: 434789
Change-Id: I6be3ec672d93a3cf550324b917db579576ed8e41
Bluetooth: Modified cancelBondProcess for HID mouse

The patch properly handles the cancelBondProcess for HID
mouse devices. The device creation cancel happens when
paired state of HID mouse device is false.

Change-Id: I962e126f8435724233a78f9c700f3353d4bda588
Bluetooth: GAP: Check for pairingState null before usage

Change-Id: I4bc0cb643d58b8f77d74c4579e470deef4fe04c5
CRs-fixed: 448558
Bluetooth: New implementation of AT command parsing.

Added new implementation for parsing the arguments of
an AT command.

Change-Id: Ieb2d2c25ef2e9d676db00177b5f3931b0b6ac791
CRs-Fixed: 444286
Bluetooth: Add break to avoid wrong fall through

Add break which is needed to avoid wrong fall through while
processing Obex Permission command.

Change-Id: Ifa790ef14751168ad78246514645f864af0c2e6b
CRs-Fixed: 436931

Conflicts:

	btobex/javax/btobex/HeaderSet.java
Bluetooth: Reset alias when device is unpaired.

Reset alias when device is unpaired to undo the remote rename
done (if any).

CRs-Fixed: 368558
Change-Id: Ibdb3319cf8eb989c3074e72aed7ef482d598a4ba
Connectivity: Fixes for tethering.

-Pass network info along with CMD_UPSTREAM_CHANGED
-Handle IllegalStateException on add/remove upstream v6 i/f
-Handle all exceptions when adding/removing upstream v6 interface.

Change-Id: Ic172c3479f78b3df54efc97a16a29ef63f94745e
CRs-Fixed: 347185, 355985
HID: Avoid listing HID mouse as paired device.

This patch avoids listing HID mouse as paired device at BT
turn ON in case device creation is completed and HID mouse
is not paired. The pairstate value is read from
getUpdatedRemoteDeviceProperty which correctly populates
the updated state for HID mouse.

Change-Id: I9cb0d9476e42139ed174400c45a4e19635b45d31
Bluetooth: Multiple gatt service for same service on the device support

Added the following support to allow the creation of multiple
gatt services for the same service on the same device:
1. BluetoothGattService maintains a serviceId which is used
to differentiate the gatt service object on the remote
for the same service
2. The service tracker in BluetoothService that maintains the
gatt service <-> callback mapping takes in object path concatenated
with the serviceId as the key so that we can differentiate
the gatt service to route the callback
3. All the asynchronous gatt client methods stores the serviceId
along with the object path as user data
4. Indications and notifications are routed to all the applications
that registered for the watcher on the characteritics
5. The characteristics watcher is deregistered only when all the
applications who registered for it called deregister
6. Disconnection is initiated on the device only when all the
gatt services on the device are closed.

Change-Id: I149f135a6e4f99cd7fd44a9cf7a059562df93ed8
CRs-fixed: 426328
Fix for Bluetooth Low Energy register GATT server feature

Changes the handling of register GATT server feature if the
server has already been registered to bluez. Returns
immediately from frameworks without checking the bluez layer
if the server has already been registered.

CRs-fixed: 463744

Change-Id: I11afef2e261ee89e9dfceadd9aed02e4577874ff
Bluetooth: Avoid deadlock in aquiring bluetooth service in rare scenarios

While doing quick BT On/Off, at times both On/Off seuence trying
to get the access to bluetoothservice object leading to this issue,
In other case while trying to update the SDP records, if event loop
get the response from the controller very fast or with some reason
thread stuck in updating SDP records this issue is observed.
Removed the syncronization for updating the uuid info to resolve
this issue.

Change-Id: I5e705702c79403870ad201c88740883ece415cef
CRs-fixed: 452659
Bluetooth: Move to proper A2dp state at BT OFF.

When BT is turned OFF, A2dp might get stuck in
DISCONNECTING state. The patch ensures that A2dp state
is properly moved to DISCONNECTED.

Change-Id: I0038732542ad3d5b7b33b9536b2ec9a470919d4b