Merge "Volume: Allow dialog to query "muteable" streams."

This commit is contained in:
John Spurlock
2015-02-17 16:36:41 +00:00
committed by Android (Google) Code Review
3 changed files with 16 additions and 0 deletions

View File

@@ -3330,6 +3330,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

View File

@@ -202,6 +202,8 @@ interface IAudioService {
boolean isStreamAffectedByRingerMode(int streamType);
boolean isStreamAffectedByMute(int streamType);
void disableSafeMediaVolume();
int setHdmiSystemAudioSupported(boolean on);

View File

@@ -3217,6 +3217,7 @@ public class AudioService extends IAudioService.Stub {
return false;
}
@Override
public boolean isStreamAffectedByMute(int streamType) {
return (mMuteAffectedStreams & (1 << streamType)) != 0;
}