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

Commit a994119a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AudioService: fix permission for addOnDevicesForAttributesChanged" into main

parents 52b7229d 03a95163
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -471,6 +471,7 @@ interface IAudioService {

    List<AudioDeviceAttributes> getDevicesForAttributesUnprotected(in AudioAttributes attributes);

    @EnforcePermission(anyOf = {"MODIFY_AUDIO_ROUTING", "QUERY_AUDIO_STATE"})
    void addOnDevicesForAttributesChangedListener(in AudioAttributes attributes,
            in IDevicesForAttributesCallback callback);

+2 −0
Original line number Diff line number Diff line
@@ -3567,8 +3567,10 @@ public class AudioService extends IAudioService.Stub
     * @see AudioManager#addOnDevicesForAttributesChangedListener(
     *      AudioAttributes, Executor, OnDevicesForAttributesChangedListener)
     */
    @android.annotation.EnforcePermission(anyOf = { MODIFY_AUDIO_ROUTING, QUERY_AUDIO_STATE })
    public void addOnDevicesForAttributesChangedListener(AudioAttributes attributes,
            IDevicesForAttributesCallback callback) {
        super.addOnDevicesForAttributesChangedListener_enforcePermission();
        mAudioSystem.addOnDevicesForAttributesChangedListener(
                attributes, false /* forVolume */, callback);
    }