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

Commit 8490abf1 authored by Hemant Gupta's avatar Hemant Gupta Committed by Ricardo Cerqueira
Browse files

Bluetooth: Add support for HID Device Role

This patch adds the HID Device Role support in Bluetooth framework.
Also AIDL and callback related files for HID Device role are added
to provide interface for third party applications to communicate with
HID device Service.

Change-Id: Id03a362b7bcfa2e76056fa0197eaac12ce49b5a2
parent aaa20127
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -113,6 +113,8 @@ LOCAL_SRC_FILES += \
	core/java/android/bluetooth/IBluetoothMap.aidl \
	core/java/android/bluetooth/IBluetoothStateChangeCallback.aidl \
	core/java/android/bluetooth/IBluetoothHeadsetClient.aidl \
	core/java/android/bluetooth/IBluetoothHidDevice.aidl \
	core/java/android/bluetooth/IBluetoothHidDeviceCallback.aidl \
	core/java/android/bluetooth/IBluetoothGatt.aidl \
	core/java/android/bluetooth/IBluetoothGattCallback.aidl \
	core/java/android/bluetooth/IBluetoothGattServerCallback.aidl \
+7 −0
Original line number Diff line number Diff line
@@ -1422,6 +1422,9 @@ public final class BluetoothAdapter {
        } else if (profile == BluetoothProfile.HEADSET_CLIENT) {
            BluetoothHeadsetClient headsetClient = new BluetoothHeadsetClient(context, listener);
            return true;
        } else if (profile == BluetoothProfile.HID_DEVICE) {
            BluetoothHidDevice hidd = new BluetoothHidDevice(context, listener);
            return true;
        } else {
            return false;
        }
@@ -1493,6 +1496,10 @@ public final class BluetoothAdapter {
                BluetoothHeadsetClient headsetClient = (BluetoothHeadsetClient)proxy;
                headsetClient.close();
                break;
            case BluetoothProfile.HID_DEVICE:
                BluetoothHidDevice hidd = (BluetoothHidDevice) proxy;
                hidd.close();
                break;
        }
    }

Loading