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

Commit 3f963157 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AudioDeviceInventory: fix sensor UUUID initialization for LE Audio"...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24546574



Change-Id: I4b0749ad9991e0647034107e50f4697ecb20b351
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 886bddd0 b4381c07
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;
        }
    }
}