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

Commit 82b16fed authored by Daniel Chapin's avatar Daniel Chapin
Browse files

Revert "AudioService: fix internal use of getDevicesForAttributes()"

Revert submission 12354482-fix_getDevicesForAttributes_internal

Reason for revert: SC blocking bug: 163642647
Reverted Changes:
I5b58be3e6:Revert "Revert "Fix mute issue when changing audio...
I864e42e69:AudioService: fix internal use of getDevicesForAtt...

Change-Id: I3eefec4a7af2f64ae0e9a6d89544b19610e51643
parent b19192ec
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -1338,7 +1338,7 @@ public class AudioService extends IAudioService.Stub
        }

        // Check if device to be updated is routed for the given audio stream
        List<AudioDeviceAttributes> devicesForAttributes = getDevicesForAttributesInt(
        List<AudioDeviceAttributes> devicesForAttributes = getDevicesForAttributes(
                new AudioAttributes.Builder().setInternalLegacyStreamType(streamType).build());
        for (AudioDeviceAttributes deviceAttributes : devicesForAttributes) {
            if (deviceAttributes.getType() == AudioDeviceInfo.convertInternalDeviceToDeviceType(
@@ -1884,13 +1884,8 @@ public class AudioService extends IAudioService.Stub
    /** @see AudioManager#getDevicesForAttributes(AudioAttributes) */
    public @NonNull ArrayList<AudioDeviceAttributes> getDevicesForAttributes(
            @NonNull AudioAttributes attributes) {
        enforceModifyAudioRoutingPermission();
        return getDevicesForAttributesInt(attributes);
    }

    protected @NonNull ArrayList<AudioDeviceAttributes> getDevicesForAttributesInt(
            @NonNull AudioAttributes attributes) {
        Objects.requireNonNull(attributes);
        enforceModifyAudioRoutingPermission();
        return AudioSystem.getDevicesForAttributes(attributes);
    }