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

Commit 3f23873b authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Hearing Aid profile

This is implementation of Hearing Aid Profile that will in future
be connected to Bluetooth Manager - see TODOs in BluetoothHearingAid.java

Bug: 69623109
Test: compilation. Manual test with HA.
Change-Id: I79643ea1e14e9df7f5771169359c964a60c56618
parent cf3cfd33
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2303,6 +2303,9 @@ public final class BluetoothAdapter {
        } else if (profile == BluetoothProfile.HID_DEVICE) {
            BluetoothHidDevice hidDevice = new BluetoothHidDevice(context, listener);
            return true;
        } else if (profile == BluetoothProfile.HEARING_AID) {
            BluetoothHearingAid hearingAid = new BluetoothHearingAid(context, listener);
            return true;
        } else {
            return false;
        }
@@ -2385,6 +2388,9 @@ public final class BluetoothAdapter {
                BluetoothHidDevice hidDevice = (BluetoothHidDevice) proxy;
                hidDevice.close();
                break;
            case BluetoothProfile.HEARING_AID:
                BluetoothHearingAid hearingAid = (BluetoothHearingAid) proxy;
                hearingAid.close();
        }
    }

+693 −0

File added.

Preview size limit exceeded, changes collapsed.

+8 −1
Original line number Diff line number Diff line
@@ -164,13 +164,20 @@ public interface BluetoothProfile {
     */
    public static final int OPP = 20;

    /**
     * Hearing Aid Device
     *
     * @hide
     */
    int HEARING_AID = 21;

    /**
     * Max profile ID. This value should be updated whenever a new profile is added to match
     * the largest value assigned to a profile.
     *
     * @hide
     */
    public static final int MAX_PROFILE_ID = 20;
    int MAX_PROFILE_ID = 21;

    /**
     * Default priority for devices that we try to auto-connect to and
+3 −0
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ public final class BluetoothUuid {
            ParcelUuid.fromString("00001132-0000-1000-8000-00805F9B34FB");
    public static final ParcelUuid SAP =
            ParcelUuid.fromString("0000112D-0000-1000-8000-00805F9B34FB");
    /* TODO: b/69623109 update this value. It will change to 16bit UUID!! */
    public static final ParcelUuid HearingAid =
            ParcelUuid.fromString("7312C48F-22CC-497F-85FD-A0616A3B9E05");

    public static final ParcelUuid BASE_UUID =
            ParcelUuid.fromString("00000000-0000-1000-8000-00805F9B34FB");