Loading Android.mk +3 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,9 @@ LOCAL_SRC_FILES += \ core/java/android/bluetooth/IBluetoothManagerCallback.aidl \ core/java/android/bluetooth/IBluetoothPbap.aidl \ core/java/android/bluetooth/IBluetoothStateChangeCallback.aidl \ core/java/android/bluetooth/IBluetoothGatt.aidl \ core/java/android/bluetooth/IBluetoothGattCallback.aidl \ core/java/android/bluetooth/IBluetoothGattServerCallback.aidl \ core/java/android/content/IClipboard.aidl \ core/java/android/content/IContentService.aidl \ core/java/android/content/IIntentReceiver.aidl \ Loading core/java/android/bluetooth/BluetoothAdapter.java 100755 → 100644 +17 −2 Original line number Diff line number Diff line Loading @@ -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. * Loading Loading @@ -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; } Loading Loading @@ -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; } } Loading Loading
Android.mk +3 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,9 @@ LOCAL_SRC_FILES += \ core/java/android/bluetooth/IBluetoothManagerCallback.aidl \ core/java/android/bluetooth/IBluetoothPbap.aidl \ core/java/android/bluetooth/IBluetoothStateChangeCallback.aidl \ core/java/android/bluetooth/IBluetoothGatt.aidl \ core/java/android/bluetooth/IBluetoothGattCallback.aidl \ core/java/android/bluetooth/IBluetoothGattServerCallback.aidl \ core/java/android/content/IClipboard.aidl \ core/java/android/content/IContentService.aidl \ core/java/android/content/IIntentReceiver.aidl \ Loading
core/java/android/bluetooth/BluetoothAdapter.java 100755 → 100644 +17 −2 Original line number Diff line number Diff line Loading @@ -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. * Loading Loading @@ -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; } Loading Loading @@ -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; } } Loading