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

Commit 4c4778a6 authored by Atneya Nair's avatar Atneya Nair
Browse files

audio: Fix incorrect userId for setMicMute

Within the manager class, we should be using the context userId, not
a binder callingUserId.

While this works if we are not in a binder context, it could break if
we get a binder call from another user id.

Test: Compiles
Bug: trivial
Flag: EXEMPT trivial
Change-Id: I442111b2acd01b55096baa7daa170a3df8199a24
parent f6002bc0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1136,7 +1136,7 @@ public class AudioManager {
        final IAudioService service = getService();
        try {
            service.setMasterMute(mute, flags, getContext().getOpPackageName(),
                    UserHandle.getCallingUserId(), getContext().getAttributionTag());
                    getContext().getUserId(), getContext().getAttributionTag());
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
@@ -3246,7 +3246,7 @@ public class AudioManager {
        final IAudioService service = getService();
        try {
            service.setMicrophoneMute(on, getContext().getOpPackageName(),
                    UserHandle.getCallingUserId(), getContext().getAttributionTag());
                    getContext().getUserId(), getContext().getAttributionTag());
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }