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

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

Merge "Correct volume control symbol for BLE" am: 200dfd38 am: 50987acb am: 75e156e2

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

Change-Id: I8e1107220e72c25510947a7c570a206e52abdbe0
parents 43fb9c1d 75e156e2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -462,11 +462,15 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
    private boolean checkRoutedToBluetoothW(int stream) {
        boolean changed = false;
        if (stream == AudioManager.STREAM_MUSIC) {
            // Note: Here we didn't use DEVICE_OUT_BLE_SPEAKER and DEVICE_OUT_BLE_BROADCAST
            //       Since their values overlap with DEVICE_OUT_EARPIECE and DEVICE_OUT_SPEAKER.
            //       Anyway, we can check BLE devices by using just DEVICE_OUT_BLE_HEADSET.
            final boolean routedToBluetooth =
                    (mAudio.getDevicesForStream(AudioManager.STREAM_MUSIC) &
                            (AudioManager.DEVICE_OUT_BLUETOOTH_A2DP |
                            AudioManager.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
                            AudioManager.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER)) != 0;
                            AudioManager.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER |
                            AudioManager.DEVICE_OUT_BLE_HEADSET)) != 0;
            changed |= updateStreamRoutedToBluetoothW(stream, routedToBluetooth);
        }
        return changed;