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

Commit 582ccf69 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

AudioService: setMasterMute protected by MODIFY_AUDIO_ROUTING

Require MODIFY_AUDIO_ROUTING system permission to exercise
hidden (non-SDK, non-SystemApi) method setMasterMute

Bug: 141622311
Test: see bug for POC app
Change-Id: I4ee93276daa1285c55c4c838e2b43833135d76f6
parent 45216b4f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -908,6 +908,7 @@ public class AudioManager {

    /** @hide */
    @UnsupportedAppUsage
    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
    public void setMasterMute(boolean mute, int flags) {
        final IAudioService service = getService();
        try {
+1 −0
Original line number Diff line number Diff line
@@ -2784,6 +2784,7 @@ public class AudioService extends IAudioService.Stub
    }

    public void setMasterMute(boolean mute, int flags, String callingPackage, int userId) {
        enforceModifyAudioRoutingPermission();
        setMasterMuteInternal(mute, flags, callingPackage, Binder.getCallingUid(),
                userId);
    }