Merge "Volume: Allow dialog to query "muteable" streams."
This commit is contained in:
committed by
Android (Google) Code Review
commit
7d3cf59227
@@ -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
|
||||
|
||||
@@ -202,6 +202,8 @@ interface IAudioService {
|
||||
|
||||
boolean isStreamAffectedByRingerMode(int streamType);
|
||||
|
||||
boolean isStreamAffectedByMute(int streamType);
|
||||
|
||||
void disableSafeMediaVolume();
|
||||
|
||||
int setHdmiSystemAudioSupported(boolean on);
|
||||
|
||||
@@ -3217,6 +3217,7 @@ public class AudioService extends IAudioService.Stub {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStreamAffectedByMute(int streamType) {
|
||||
return (mMuteAffectedStreams & (1 << streamType)) != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user