summaryrefslogtreecommitdiffstats
path: root/core/java/android/server/BluetoothEventLoop.java
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-09-13 14:57:59 -0700
committerJaikumar Ganesh <jaikumar@google.com>2010-09-13 14:57:59 -0700
commit20c8f47330e7d4f5f191264f0d7ca67f6532adc2 (patch)
tree9e822ed87448a58738f1144c8b6627b3257e6d96 /core/java/android/server/BluetoothEventLoop.java
parentb6b81f5f39f5ff5b8530717b4c015ef31d43e5d4 (diff)
parent0522f5e9b7dac0dc0229c9ddb07e7e5482846b1a (diff)
downloadframeworks_base-20c8f47330e7d4f5f191264f0d7ca67f6532adc2.zip
frameworks_base-20c8f47330e7d4f5f191264f0d7ca67f6532adc2.tar.gz
frameworks_base-20c8f47330e7d4f5f191264f0d7ca67f6532adc2.tar.bz2
resolved conflicts for merge of 0522f5e9 to master
Change-Id: Ie0a7ece33dced1042948087053e49665f6235fc2
Diffstat (limited to 'core/java/android/server/BluetoothEventLoop.java')
-rw-r--r--core/java/android/server/BluetoothEventLoop.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index fde3769..c066862 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -614,6 +614,17 @@ class BluetoothEventLoop {
mWakeLock.release();
}
+ private void onRequestOobData(String objectPath , int nativeData) {
+ String address = checkPairingRequestAndGetAddress(objectPath, nativeData);
+ if (address == null) return;
+
+ Intent intent = new Intent(BluetoothDevice.ACTION_PAIRING_REQUEST);
+ intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mAdapter.getRemoteDevice(address));
+ intent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT,
+ BluetoothDevice.PAIRING_VARIANT_OOB_CONSENT);
+ mContext.sendBroadcast(intent, BLUETOOTH_ADMIN_PERM);
+ }
+
private boolean onAgentAuthorize(String objectPath, String deviceUuid) {
if (!mBluetoothService.isEnabled()) return false;
@@ -672,6 +683,18 @@ class BluetoothEventLoop {
return false;
}
+ private boolean onAgentOutOfBandDataAvailable(String objectPath) {
+ if (!mBluetoothService.isEnabled()) return false;
+
+ String address = mBluetoothService.getAddressFromObjectPath(objectPath);
+ if (address == null) return false;
+
+ if (mBluetoothService.getDeviceOutOfBandData(
+ mAdapter.getRemoteDevice(address)) != null) {
+ return true;
+ }
+ }
+
private boolean isOtherSinkInNonDisconnectingState(String address) {
BluetoothA2dp a2dp = new BluetoothA2dp(mContext);
Set<BluetoothDevice> devices = a2dp.getNonDisconnectedSinks();