Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e0a5668 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 23b046c4: Merge "Initial version of BLE support for Bluedroid" into jb-mr2-dev

* commit '23b046c4':
  Initial version of BLE support for Bluedroid
parents ea104b64 23b046c4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 \
+17 −2
Original line number Diff line number Diff line
@@ -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;
        }
    }

Loading