diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioManager.java | 9 | ||||
-rw-r--r-- | media/java/android/media/IAudioService.aidl | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index 2c28d8e..3bf8129 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -40,6 +40,7 @@ import android.os.Process; import android.os.RemoteException; import android.os.SystemClock; import android.os.ServiceManager; +import android.os.UserHandle; import android.provider.Settings; import android.util.ArrayMap; import android.util.Log; @@ -872,7 +873,8 @@ public class AudioManager { public void setMasterMute(boolean mute, int flags) { IAudioService service = getService(); try { - service.setMasterMute(mute, flags, getContext().getOpPackageName()); + service.setMasterMute(mute, flags, getContext().getOpPackageName(), + UserHandle.getCallingUserId()); } catch (RemoteException e) { Log.e(TAG, "Dead object in setMasterMute", e); } @@ -1551,10 +1553,11 @@ public class AudioManager { * @param on set <var>true</var> to mute the microphone; * <var>false</var> to turn mute off */ - public void setMicrophoneMute(boolean on){ + public void setMicrophoneMute(boolean on) { IAudioService service = getService(); try { - service.setMicrophoneMute(on, getContext().getOpPackageName()); + service.setMicrophoneMute(on, getContext().getOpPackageName(), + UserHandle.getCallingUserId()); } catch (RemoteException e) { Log.e(TAG, "Dead object in setMicrophoneMute", e); } diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl index c75c7e5..8aebe11 100644 --- a/media/java/android/media/IAudioService.aidl +++ b/media/java/android/media/IAudioService.aidl @@ -55,7 +55,7 @@ interface IAudioService { boolean isMasterMute(); - void setMasterMute(boolean mute, int flags, String callingPackage); + void setMasterMute(boolean mute, int flags, String callingPackage, int userId); int getStreamVolume(int streamType); @@ -65,7 +65,7 @@ interface IAudioService { int getLastAudibleStreamVolume(int streamType); - void setMicrophoneMute(boolean on, String callingPackage); + void setMicrophoneMute(boolean on, String callingPackage, int userId); void setRingerModeExternal(int ringerMode, String caller); |