diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2010-09-13 14:57:59 -0700 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2010-09-13 14:57:59 -0700 |
commit | 20c8f47330e7d4f5f191264f0d7ca67f6532adc2 (patch) | |
tree | 9e822ed87448a58738f1144c8b6627b3257e6d96 /core/java/android/server/BluetoothEventLoop.java | |
parent | b6b81f5f39f5ff5b8530717b4c015ef31d43e5d4 (diff) | |
parent | 0522f5e9b7dac0dc0229c9ddb07e7e5482846b1a (diff) | |
download | frameworks_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.java | 23 |
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(); |