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

Commit 92685613 authored by Hyundo Moon's avatar Hyundo Moon Committed by Automerger Merge Worker
Browse files

Merge "Show volume bar when BLE device's volume is changed" am: b5996b0b am:...

Merge "Show volume bar when BLE device's volume is changed" am: b5996b0b am: 964c0162 am: 7be02970 am: b317fc17

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

Change-Id: I7df83ba939105d829f39c0e80097208a98c82702
parents 4f20090b b317fc17
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -2968,8 +2968,9 @@ public class AudioService extends IAudioService.Stub
        int step;

        // skip a2dp absolute volume control request when the device
        // is not an a2dp device
        if (!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
        // is neither an a2dp device nor BLE device
        if ((!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
                && !AudioSystem.DEVICE_OUT_ALL_BLE_SET.contains(device))
                && (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) {
            return;
        }
@@ -3107,7 +3108,8 @@ public class AudioService extends IAudioService.Stub
            }

            if (device == AudioSystem.DEVICE_OUT_BLE_HEADSET
                    && streamType == getBluetoothContextualVolumeStream()) {
                    && streamType == getBluetoothContextualVolumeStream()
                    && (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
                if (DEBUG_VOL) {
                    Log.d(TAG, "adjustSreamVolume postSetLeAudioVolumeIndex index="
                            + newIndex + " stream=" + streamType);
@@ -3707,8 +3709,9 @@ public class AudioService extends IAudioService.Stub
        int oldIndex;

        // skip a2dp absolute volume control request when the device
        // is not an a2dp device
        if (!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
        // is neither an a2dp device nor BLE device
        if ((!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
                && !AudioSystem.DEVICE_OUT_ALL_BLE_SET.contains(device))
                && (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) {
            return;
        }
@@ -3751,7 +3754,8 @@ public class AudioService extends IAudioService.Stub
            }

            if (device == AudioSystem.DEVICE_OUT_BLE_HEADSET
                    && streamType == getBluetoothContextualVolumeStream()) {
                    && streamType == getBluetoothContextualVolumeStream()
                    && (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
                if (DEBUG_VOL) {
                    Log.d(TAG, "adjustSreamVolume postSetLeAudioVolumeIndex index="
                            + index + " stream=" + streamType);