From cc8400670b30542f78d2abc3ccb8029a62ecb146 Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Tue, 29 Dec 2015 13:19:21 -0800 Subject: 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 --- framework/java/android/bluetooth/BluetoothDevice.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'framework/java/android/bluetooth/BluetoothDevice.java') 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 { * *

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; } -- cgit v1.2.3