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

Commit 3bb5367c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AudioDeviceInventory: fix sensor UUUID initialization for LE Audio" into udc-qpr-dev

parents 35e2c094 3270184c
Loading
Loading
Loading
Loading
+18 −20
Original line number Diff line number Diff line
@@ -45,8 +45,10 @@ class UuidUtils {
     *  Generate a headtracking UUID from AudioDeviceAttributes
     */
    public static UUID uuidFromAudioDeviceAttributes(AudioDeviceAttributes device) {
        switch (device.getInternalType()) {
            case AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP:
        if (!AudioSystem.isBluetoothA2dpOutDevice(device.getInternalType())
                && !AudioSystem.isBluetoothLeOutDevice(device.getInternalType())) {
            return null;
        }
        String address = device.getAddress().replace(":", "");
        if (address.length() != 12) {
            return null;
@@ -62,9 +64,5 @@ class UuidUtils {
            Slog.i(TAG, "uuidFromAudioDeviceAttributes lsb: " + Long.toHexString(lsb));
        }
        return new UUID(0, lsb);
            default:
                // Handle other device types here
                return null;
        }
    }
}