summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorKenny Guy <kennyguy@google.com>2015-07-09 10:06:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-09 10:06:25 +0000
commit7d170797ac844124b013b77cc220ccf115db12b7 (patch)
treea4df239b1e833a880f64a87c1bda5f0f46b42c06 /media
parent14b503947727d7e58c9f2d50ceada378031fbe59 (diff)
parent70e0c58c2269cd29dfd6420d690da13dc03fd457 (diff)
downloadframeworks_base-7d170797ac844124b013b77cc220ccf115db12b7.zip
frameworks_base-7d170797ac844124b013b77cc220ccf115db12b7.tar.gz
frameworks_base-7d170797ac844124b013b77cc220ccf115db12b7.tar.bz2
Merge "Mute correct user from device policy manager." into mnc-dev
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/AudioManager.java9
-rw-r--r--media/java/android/media/IAudioService.aidl4
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);