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

Commit 93fd3686 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AudioService: fix volume behavior for dock devices" into tm-qpr-dev am: 67f8ff06

parents 628b5260 67f8ff06
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -7055,9 +7055,10 @@ public class AudioService extends IAudioService.Stub
    private @AudioManager.DeviceVolumeBehavior
    private @AudioManager.DeviceVolumeBehavior
            int getDeviceVolumeBehaviorInt(@NonNull AudioDeviceAttributes device) {
            int getDeviceVolumeBehaviorInt(@NonNull AudioDeviceAttributes device) {
        // translate Java device type to native device type (for the devices masks for full / fixed)
        // Get the internal type set by the AudioDeviceAttributes constructor which is always more
        final int audioSystemDeviceOut = AudioDeviceInfo.convertDeviceTypeToInternalDevice(
        // exact (avoids double conversions) than a conversion from SDK type via
                device.getType());
        // AudioDeviceInfo.convertDeviceTypeToInternalDevice()
        final int audioSystemDeviceOut = device.getInternalType();
        int setDeviceVolumeBehavior = retrieveStoredDeviceVolumeBehavior(audioSystemDeviceOut);
        int setDeviceVolumeBehavior = retrieveStoredDeviceVolumeBehavior(audioSystemDeviceOut);
        if (setDeviceVolumeBehavior != AudioManager.DEVICE_VOLUME_BEHAVIOR_UNSET) {
        if (setDeviceVolumeBehavior != AudioManager.DEVICE_VOLUME_BEHAVIOR_UNSET) {