Revert "frameworks: add support for bluez stack"

This reverts commit ed27f65bb0384a76d0114de76add082aac3158d0.
frameworks: add support for bluez stack

This is a combination of 19 commits.

bluetooth: Add frameworks support for bluetooth bluez stack

Based on the compilation flag compile either bluetooth frameworks code
from the core directory or the bluetoothmsm directory.

When BOARD_HAVE_BLUETOOTH_BLUEZ is set to true, bluetoothmsm code gets
compiled and if it is not set default bluetooth code under core gets
compiled.

Change-Id: I5fe3ed83c5d12d5fa43c16060756228dec6b5e7b

Conflicts:

	Android.mk
	core/jni/AndroidRuntime.cpp
	data/etc/platform.xml

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: PAN: Tethering code for Bluez solution

CRs-fixed: 444230
Change-Id: Ib18028fdab1e13ab191543e1afdcfa98e0846183

Bluetooth: Implementing finalize() method.

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

Change-Id: I4f23333db782f8d9fc6fadb41d0b33fbe694329a
CRs-Fixed: 443585

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: Added AVRCP1.3 intents in mediaplayer.

Added posting of Metadata Changed intents to BluetoothA2dpService
for updating MediaPlayer status like STOP, PAUSE, PLAY, FWD_SEEK,
REV_SEEK along with metadata of the current song.

Change-Id: I47bbea35c982d07fecdbb9245cc48af58fb1d78a
CRs-fixed: 443134

Conflicts:

	media/java/android/media/MediaPlayer.java

Bluetooth: Update the PLAYSTATUS and METADATA to remote device based on
           Actual state of Music App.

Registered for PLAYSTATUS_CHANGED intent which is provided by Music App
and based this information BluetoothA2dpService is  updating the Play
status and metadata to Remote device.

Change-Id: I5fe865fcdde3e0fd2442d0629e465711696d977a
CRs-fixed: 443134

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: 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

Bluetooth: Cleanup userids array to avoid null pointer exception

This fix null pointer exception during multiple gatt services.

CRs-fixed: 485789
Change-Id: I3d6061ed0a817cdfb4ab8d526c71c569edf2f929

frameworks-bt : Advertise only supported profiles in SDP database

Enable or disable PBAP and NAP profiles based on the system property
variables defined in the BT init shell script.

Change-Id: I88ac0db70d0ee2c5aad56a61ac3ebeaa03479d1c
CRs-Fixed: 405182 481305

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: 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: Fix crash in bluez handler

Fix crash in event handler loop when the underlying dbus
mechanism is not available.

Change-Id: I26670f9d5d0fa738a3c89f1f7d603a307c9d3e04
CRs-Fixed: 471242

Bluetooth: JNI verbose log fix

Fix to avoid compilation errors after enabling JNI verbose logs.

CRs-Fixed: 475950
Change-Id: I3e2d54b0f5f8e0c005742adfc2ffc6f0ac33a33f

Bluetooth: Create A2DP handler with looper

Found an exception due to A2dpHandler whenever Skype tries to load the
MediaPlayer to play Incomming Notification. Associated A2dp handler with
looper.

CRs-fixed: 452283
Change-Id: I73d3a5ff7728383e89da7252ea8db383014feab8

Conflicts:
	media/java/android/media/MediaPlayer.java

Conflicts:
	Android.mk
	core/jni/Android.mk
	core/jni/AndroidRuntime.cpp