diff options
-rw-r--r-- | media/java/android/media/AudioManager.java | 13 | ||||
-rw-r--r-- | media/java/android/media/IAudioService.aidl | 2 | ||||
-rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index 7084eba..da89cf4 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -3334,6 +3334,19 @@ public class AudioManager { * Only useful for volume controllers. * @hide */ + public boolean isStreamAffectedByMute(int streamType) { + try { + return getService().isStreamAffectedByMute(streamType); + } catch (RemoteException e) { + Log.w(TAG, "Error calling isStreamAffectedByMute", e); + return false; + } + } + + /** + * Only useful for volume controllers. + * @hide + */ public void disableSafeMediaVolume() { try { getService().disableSafeMediaVolume(); diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl index dabd9c2..17f5b59 100644 --- a/media/java/android/media/IAudioService.aidl +++ b/media/java/android/media/IAudioService.aidl @@ -202,6 +202,8 @@ interface IAudioService { boolean isStreamAffectedByRingerMode(int streamType); + boolean isStreamAffectedByMute(int streamType); + void disableSafeMediaVolume(); int setHdmiSystemAudioSupported(boolean on); diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 4301427..201b1b7 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -3208,6 +3208,7 @@ public class AudioService extends IAudioService.Stub { return false; } + @Override public boolean isStreamAffectedByMute(int streamType) { return (mMuteAffectedStreams & (1 << streamType)) != 0; } |