diff options
| author | Jaikumar Ganesh <jaikumar@google.com> | 2009-09-11 12:16:19 -0700 |
|---|---|---|
| committer | Jaikumar Ganesh <jaikumar@google.com> | 2009-09-11 12:16:19 -0700 |
| commit | 5e59ca8ae4e29efb77acbd5513dcc109ea5dd2b4 (patch) | |
| tree | cc6707b45e6d0507c600181f86dd721748e60c1b /core/java/android/server | |
| parent | d304ae583d862250a21b5949fc3dbdf3af1febac (diff) | |
| download | frameworks_base-5e59ca8ae4e29efb77acbd5513dcc109ea5dd2b4.zip frameworks_base-5e59ca8ae4e29efb77acbd5513dcc109ea5dd2b4.tar.gz frameworks_base-5e59ca8ae4e29efb77acbd5513dcc109ea5dd2b4.tar.bz2 | |
Handle DisconnectRequested message sent by Bluez.
Diffstat (limited to 'core/java/android/server')
| -rw-r--r-- | core/java/android/server/BluetoothEventLoop.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java index 4c24c50..d0d4b84 100644 --- a/core/java/android/server/BluetoothEventLoop.java +++ b/core/java/android/server/BluetoothEventLoop.java @@ -166,6 +166,17 @@ class BluetoothEventLoop { mContext.sendBroadcast(intent, BLUETOOTH_PERM); } + private void onDeviceDisconnectRequested(String deviceObjectPath) { + String address = mBluetoothService.getAddressFromObjectPath(deviceObjectPath); + if (address == null) { + Log.e(TAG, "onDeviceDisconnectRequested: Address of the remote device in null"); + return; + } + Intent intent = new Intent(BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED); + intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mAdapter.getRemoteDevice(address)); + mContext.sendBroadcast(intent, BLUETOOTH_PERM); + } + private void onCreatePairedDeviceResult(String address, int result) { address = address.toUpperCase(); if (result == BluetoothDevice.BOND_SUCCESS) { |
