diff options
author | Ganesh Ganapathi Batta <ganeshg@broadcom.com> | 2014-04-18 10:00:40 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2014-05-06 19:20:46 -0700 |
commit | ec661918b6b6ac36905fceb26043633f3e8a6a21 (patch) | |
tree | c6f46437b25dae3d1c19a32e96a984baf2342679 /framework/java/android/bluetooth/BluetoothGattServer.java | |
parent | d4c0158b93a98c883245f6abdefb1bf2b828f179 (diff) |
Add transport param to Connect APIs
Support for passing preferred transport for GATT connections as part of
Connect APIs
Change-Id: I93938dce519b8fa12de41d7e8690dc9355ce2dc5
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothGattServer.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothGattServer.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothGattServer.java b/framework/java/android/bluetooth/BluetoothGattServer.java index 0c00c06712..34e86055db 100644 --- a/framework/java/android/bluetooth/BluetoothGattServer.java +++ b/framework/java/android/bluetooth/BluetoothGattServer.java @@ -50,6 +50,7 @@ public final class BluetoothGattServer implements BluetoothProfile { private Object mServerIfLock = new Object(); private int mServerIf; + private int mTransport; private List<BluetoothGattService> mServices; private static final int CALLBACK_REG_TIMEOUT = 10000; @@ -269,12 +270,13 @@ public final class BluetoothGattServer implements BluetoothProfile { /** * Create a BluetoothGattServer proxy object. */ - /*package*/ BluetoothGattServer(Context context, IBluetoothGatt iGatt) { + /*package*/ BluetoothGattServer(Context context, IBluetoothGatt iGatt, int transport) { mContext = context; mService = iGatt; mAdapter = BluetoothAdapter.getDefaultAdapter(); mCallback = null; mServerIf = 0; + mTransport = transport; mServices = new ArrayList<BluetoothGattService>(); } @@ -401,7 +403,7 @@ public final class BluetoothGattServer implements BluetoothProfile { try { mService.serverConnect(mServerIf, device.getAddress(), - autoConnect ? false : true); // autoConnect is inverse of "isDirect" + autoConnect ? false : true,mTransport); // autoConnect is inverse of "isDirect" } catch (RemoteException e) { Log.e(TAG,"",e); return false; |