diff options
Diffstat (limited to 'core/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r--[-rwxr-xr-x] | core/java/android/bluetooth/BluetoothAdapter.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index 6367e16..1bbfb5d 100755..100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -1136,8 +1136,9 @@ public final class BluetoothAdapter { /** * Get the profile proxy object associated with the profile. * - * <p>Profile can be one of {@link BluetoothProfile#HEALTH}, {@link BluetoothProfile#HEADSET} or - * {@link BluetoothProfile#A2DP}. Clients must implements + * <p>Profile can be one of {@link BluetoothProfile#HEALTH}, {@link BluetoothProfile#HEADSET}, + * {@link BluetoothProfile#A2DP}, {@link BluetoothProfile#GATT}, + * or {@link BluetoothProfile#GATT_SERVER}. Clients must implements * {@link BluetoothProfile.ServiceListener} to get notified of * the connection status and to get the proxy object. * @@ -1166,6 +1167,12 @@ public final class BluetoothAdapter { } else if (profile == BluetoothProfile.HEALTH) { BluetoothHealth health = new BluetoothHealth(context, listener); return true; + } else if (profile == BluetoothProfile.GATT) { + BluetoothGatt gatt = new BluetoothGatt(context, listener); + return true; + } else if (profile == BluetoothProfile.GATT_SERVER) { + BluetoothGattServer gattServer = new BluetoothGattServer(context, listener); + return true; } else { return false; } @@ -1206,6 +1213,14 @@ public final class BluetoothAdapter { BluetoothHealth health = (BluetoothHealth)proxy; health.close(); break; + case BluetoothProfile.GATT: + BluetoothGatt gatt = (BluetoothGatt)proxy; + gatt.close(); + break; + case BluetoothProfile.GATT_SERVER: + BluetoothGattServer gattServer = (BluetoothGattServer)proxy; + gattServer.close(); + break; } } |