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

Commit aca4460b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Hearing Aid profile"

parents 2c8456b2 ea580fa1
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");
+4 −0
Original line number Diff line number Diff line
@@ -172,6 +172,10 @@
        android:name="android.bluetooth.headsetclient.profile.action.RESULT" />
    <protected-broadcast
        android:name="android.bluetooth.headsetclient.profile.action.LAST_VTAG" />
    <protected-broadcast
        android:name="android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED" />
    <protected-broadcast
        android:name="android.bluetooth.hearingaid.profile.action.PLAYING_STATE_CHANGED" />
    <protected-broadcast
        android:name="android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED" />
    <protected-broadcast
Loading