summaryrefslogtreecommitdiffstats
path: root/core/java/android/server
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2009-09-11 12:16:19 -0700
committerJaikumar Ganesh <jaikumar@google.com>2009-09-11 12:16:19 -0700
commit5e59ca8ae4e29efb77acbd5513dcc109ea5dd2b4 (patch)
treecc6707b45e6d0507c600181f86dd721748e60c1b /core/java/android/server
parentd304ae583d862250a21b5949fc3dbdf3af1febac (diff)
downloadframeworks_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.java11
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) {