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

Commit dcb0b4e4 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:...

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

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



Change-Id: If14d0ba72d34c05554dd346b3c35eda22ae8edb8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 48f6972d 93fd3686
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -7099,9 +7099,10 @@ public class AudioService extends IAudioService.Stub
    private @AudioManager.DeviceVolumeBehavior
            int getDeviceVolumeBehaviorInt(@NonNull AudioDeviceAttributes device) {
        // translate Java device type to native device type (for the devices masks for full / fixed)
        final int audioSystemDeviceOut = AudioDeviceInfo.convertDeviceTypeToInternalDevice(
                device.getType());
        // Get the internal type set by the AudioDeviceAttributes constructor which is always more
        // exact (avoids double conversions) than a conversion from SDK type via
        // AudioDeviceInfo.convertDeviceTypeToInternalDevice()
        final int audioSystemDeviceOut = device.getInternalType();
        int setDeviceVolumeBehavior = retrieveStoredDeviceVolumeBehavior(audioSystemDeviceOut);
        if (setDeviceVolumeBehavior != AudioManager.DEVICE_VOLUME_BEHAVIOR_UNSET) {