OBEX: Support BTOBEX lib.

Add javax.btobex lib to support Obex Over L2CAP
features in further steps.

Add base files from AOSP OBEX lib to btobex folder
at frameworks/base/btobex project for now.

CRs-Fixed: 639499
Change-Id: I983830bce32fbd1446500b9656978e090ca9f259
OBEX: OBEX L2CAP feature and bug fix(es).

Squashed commit of the following:

commit 39b512ae6f81de0e972eef1d47e7340e6b7b1e50
Author: Ashwini Munigala <AshwiniM@codeaurora.org>
Date: Wed Jun 18 12:45:09 2014 +0530

    OBEX: Update default OBEX version parameter to 1.0.

    Update default OBEX protocol version to 1.0 for
    OBEX CONNECT Request parameter.

    Change-Id: If38dccc8e9bab1761b9d1e96b18f5dd27dff60b7
    CRs-fixed: 680975

commit 0c17893a272252aa0314494db5a323494ac6dc61
Author: Ashwini Munigala <AshwiniM@codeaurora.org>
Date:   Tue Mar 25 19:04:34 2014 +0530

    OBEX: Support OBEX L2CAP features.

    OBEX Over L2CAP features from javax.btobex.
    Includes SRM and SRMP features support.

    Includes existing issue fixes from javax.obex lib.

    CRs-Fixed: 639499
    Change-Id: I70c2a4bfa3bc66532af56dfdb6e1f762aed8e71e

Change-Id: I673082f036c9abe47536c4723fc96b86ec8ad7df
Bluetooth: Avoid fd leak for Bluetooth server socket connections

-As the close function of local socket implementation is dependent
 on mFdCreatedInternally, it will not be set for bluetooth server
 sockets, this will lead to fd leak on bluetooth socket connection.

-Exposed the API to set mFdCreatedExternally flag to close fd which
 was opened externally, so that when the actual close request comes
 fd will be closed successfully based on flag check.

CRs-Fixed: 638042
Change-Id: I22c6a973b30531407148f9d9e50820422d4427b0
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
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
Conflicts:
core/java/android/bluetooth/IBluetooth.aidl
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

Conflicts:
	core/java/android/bluetooth/BluetoothProfile.java

Change-Id: I3363411ca7547107fd2e832569dd749d1a1432e3
Bluetooth: Fix resource leak in OPP (1/3)

This patch adds support for ACTION_DEVICE_NOT_SELECTED intent to
be broadcasted when no device is selected from DevicePicker activity.

Change-Id: I8e7ef1aaf7631240df794b5cea2bba30ce8bdbac
CRs-Fixed: 662147
Bluetooth: Fix to avoid framework reboot during monkey.

A case where monkey is running & sometimes framework is
disconnected due to unhandled java Exception during the
binding of PAN service on unsuccessful binding. So it never
handled. Handing java exception while binding PAN service
to solve this issue.

Change-Id: Idea710593a3f9496305f636042605303e73e7749
CRs-Fixed: 564709
Bluetooth: Introduce custom APIs for L2cap socket for Obex over L2cap

Introduce custom APIs for the L2CAP socket for the obex over l2cap
feature.

The applications which uses obex over L2cap feature can make use
of these APIs to create L2cap socket.

CRs-Fixed: 639499
Change-Id: I423ae95ec4e1dc02712609e7c25d2274c5816149
BT: HF: Control verbose logging at runtime.

Verbose logging in BluetoothHeadset can be
controlled from adb shell.

Change-Id: If63974402a4fc91065c8007a224388af12f49cf7
CRs-Fixed: 601899
Bluetooth: Add interface for A2DP Sink

 - add new constants
 - add new interfaces

Change-Id: I1b9c9544f186d819a40396b7ebaf512f2c76cfb7
Initial commit for HID Client

This patch is initial commit for HID Client

Change-Id: Ife1f54acce79892414ad71d5488fdb659efede59
Bluetooth: Add support for HID Device Role

This patch adds the HID Device Role support in Bluetooth framework.
Also AIDL and callback related files for HID Device role are added
to provide interface for third party applications to communicate with
HID device Service.

Change-Id: Id03a362b7bcfa2e76056fa0197eaac12ce49b5a2

Conflicts:
	core/java/android/bluetooth/BluetoothProfile.java
Bluetooth: Fix for hash map table entry for Advertisement

Addition of callback to the hash map is been decided based on the
success of multi advertiser callback i.e advertiser callback will be added
iff the advertisment is succesfull.

Conflicts:
	core/java/android/bluetooth/le/BluetoothLeAdvertiser.java

Change-Id: I90e810fdee944c1a82729bdf7fcd9ed26f5eb094
CRs-fixed: 721903
Bluetooth: Adding support to get remote DI record

Adding support to get remote DI record. The local
device can use the Device ID service record from
the remote device, In order to make best use of the
features on the device identified.

Conflicts:
        core/java/android/bluetooth/BluetoothDevice.java

Change-Id: I0349e3bfb2514400a32b099fc806c1fb6f8cd714
CRs-Fixed: 692532
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

Conflicts:
        core/java/android/bluetooth/BluetoothDevice.java

Change-Id: I9bde4d7dfe07d9d63b58a661ed2413f45501bd7b
Bluetooth: Avoid the crash in LEScanClients following BT process restart

Due to sudden crash and restart of BT process, BTLEClient object to call
is not valid and throws the NullPointerException.

Change-Id: Ie3b98149e83afc5b84b042ce61978eb1599dce49
CRs-Fixed: 729372
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
Bluetooth: Changes for LPP

This patch includes implementation of a new Bluetooth
Adapter named QBluetoothAdapter for implementing LE
specific tasks that the default adapter doesnt perform.
This patch also implements Low power proximity.

CRs-Fixed: 581289

Conflicts:
	services/core/java/com/android/server/BluetoothManagerService.java

Change-Id: I63e0593f79c8929d4e18cee0472fcb401c8892e7
Bluetooth-Wipower: Support for Wipower feature.

Wipower feature code is been enabled, This is used to
perform wireless charging over bluetooth low energy.

Change-Id: I47551450a1eac966ae0d2443415888d2fc0c8ef4
CRs-fixed: 698314