aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothDevice.java
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2015-12-29 13:19:21 -0800
committerAndre Eisenbach <eisenbach@google.com>2016-01-15 00:01:02 +0000
commitcc8400670b30542f78d2abc3ccb8029a62ecb146 (patch)
tree75af5eec48b6486370f39cc12b88dffb26410065 /framework/java/android/bluetooth/BluetoothDevice.java
parent25e84d4f5d76fdb421c597752117089b6c73e5b7 (diff)
Implementation of BluetoothDevice.createBondOutOfBand
This patch implements out of band pairing that uses optional data. Currently, it works only for LE transport, using Temporary Key value. In the future fields might be added to OOBData to support other options for optional data. Change-Id: I0811182efb72ac5f80521ed4876b32603cb628c1
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothDevice.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java
index cd5c205d14..f43fb30abb 100644
--- a/framework/java/android/bluetooth/BluetoothDevice.java
+++ b/framework/java/android/bluetooth/BluetoothDevice.java
@@ -879,18 +879,16 @@ public final class BluetoothDevice implements Parcelable {
*
* <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
*
- * @param hash - Simple Secure pairing hash
- * @param randomizer - The random key obtained using OOB
+ * @param transport - Transport to use
+ * @param oobData - Out Of Band data
* @return false on immediate error, true if bonding will begin
*
* @hide
*/
- public boolean createBondOutOfBand(byte[] hash, byte[] randomizer) {
- //TODO(BT)
- /*
+ public boolean createBondOutOfBand(int transport, OobData oobData) {
try {
- return sService.createBondOutOfBand(this, hash, randomizer);
- } catch (RemoteException e) {Log.e(TAG, "", e);}*/
+ return sService.createBondOutOfBand(this, transport, oobData);
+ } catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
}