+-----------------------------------------------+
| /frameworks/base/core/java/android/bluetooth |
| |
| +------------------+ | +--------------------------------------------------------+
| | BluetoothManager | | | /frameworks/base/services/core/java/com/android/server |
| +------------------+ | | |
| +-------------------+ | | +------------------------+ |
| +----------------+ +--> IBluetoothManager +---------> BluetoothManagerService| |
| |BluetoothAdapter| | +-------------------+ | | +------------------------+ |
| +----------------+ | | +----+ mBluetooth | |
| |mService +--+ +-------------+ | | | +------------------------+ |
| |mManagerService | | | | | | | |
| +----------------+ +---> IBluetooth <---------+ +--------------------------------------------------------+
| | | |
| +----------------+ +-------------+-------------------+
| | Profiles | | |
| +----------------+ | |
| | mService | +---------------+ | |
| +---+------------+ |BluetoothGatt | | |
| | +---------------+ | |
| +---v----------------+ +---------------+ | |
+---------> IBluetooth***.aidl | |Bluetooth LE | | |
| | +--------------------+ +---------------+ | |
| | | |
| +-----------------------------------------------+ |
| |
| |
| +------------------------------------------------------------------------------+
| | /android/packages/apps/Bluetooth(apk) | |
| | | |
| | | |
| | +--------------------------------------+ +----------v-----+ |
+------+ ProfileServices(OPP
, PAN, A2DP, etc) | | AdapterService | |
| +----------------+---------------------+ +----------------+ |
| | |
| | +-----------------------+ |
| | | AdapterState(Machine) | |
| +----------------v---------------------+ +-----------------------+ |
| | ProfileStateMachines(A2DP, HFP, etc) | |
| +----------+---------------------------+ +------------------+ |
| | | BondStateMachine | |
| | +------------------+ |
| | |
| +--v----+ |
+-----------|JNI|--------------------------------------------------------------+
+--+----+
|
+--------------+
| Native Layer |
+--------------+