Merge "AudioService: setMasterMute protected by MODIFY_AUDIO_ROUTING" into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot
2019-12-19 00:23:29 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 0 deletions

View File

@@ -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 {

View File

@@ -2790,6 +2790,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);
}